Skip to content

Commit

Permalink
localize grab/toss promo
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeskydev committed Dec 2, 2023
1 parent 009da62 commit 2a46961
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
27 changes: 21 additions & 6 deletions Assets/Scenes/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -10783,12 +10783,27 @@ MonoBehaviour:
m_BrushSizeHintShowDistance: 250
m_BrushSizeHintPreventSwipeAmount: 1
m_BrushSizeHintCancelSwipeAmount: 0.3
m_GrabPanelHintText: 'Use Grip To Grab

The Blinking Panel'
m_TossPanelHintText: 'Toss The Panel

To Dismiss It'
m_GrabPanelHintText:
m_TableReference:
m_TableCollectionName: GUID:c84355079ab3f3e4f8f3812258805f86
m_TableEntryReference:
m_KeyId: 6606866780160
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 0
m_LocalVariables: []
m_TossPanelHintText:
m_TableReference:
m_TableCollectionName: GUID:c84355079ab3f3e4f8f3812258805f86
m_TableEntryReference:
m_KeyId: 6887293751296
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 0
m_LocalVariables: []
references:
version: 2
RefIds: []
--- !u!114 &652605569
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
13 changes: 7 additions & 6 deletions Assets/Scripts/Tutorials/PromoManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using UnityEngine;
using System.Linq;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Localization;

namespace TiltBrush
{
Expand Down Expand Up @@ -60,8 +61,8 @@ public class PromoManager : MonoBehaviour
[SerializeField] private float m_BrushSizeHintCancelSwipeAmount = 0.3f;

[Header("Floating Panel Promo")]
[SerializeField, TextArea] private string m_GrabPanelHintText;
[SerializeField, TextArea] private string m_TossPanelHintText;
[SerializeField] private LocalizedString m_GrabPanelHintText;
[SerializeField] private LocalizedString m_TossPanelHintText;

private Dictionary<PromoType, IPromoFactory> m_Factories;
private HashSet<BasePromo> m_RequestedPromos;
Expand All @@ -77,8 +78,8 @@ public class PromoManager : MonoBehaviour
public float BrushSizeHintShowDistance { get { return m_BrushSizeHintShowDistance; } }
public float BrushSizeHintPreventSwipeAmount { get { return m_BrushSizeHintPreventSwipeAmount; } }
public float BrushSizeHintCancelSwipeAmount { get { return m_BrushSizeHintCancelSwipeAmount; } }
public string GrabPanelHintText { get { return m_GrabPanelHintText; } }
public string TossPanelHintText { get { return m_TossPanelHintText; } }
public string GrabPanelHintText { get { return m_GrabPanelHintText.GetLocalizedString(); } }
public string TossPanelHintText { get { return m_TossPanelHintText.GetLocalizedString(); } }

public IEnumerable<BasePromo> RequestedPromos { get { return m_RequestedPromos; } }

Expand Down

0 comments on commit 2a46961

Please sign in to comment.