Skip to content

Commit

Permalink
NPBruce#859 [MoM] Improve button bar look and placement
Browse files Browse the repository at this point in the history
Change the arrow, and tweak border to have a proper alignement.
This is because Unity does not properly align vertically this character.
  • Loading branch information
BenRQ committed Jul 18, 2018
1 parent f857c20 commit 66421de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion unity/Assets/Scripts/Content/CommonStringKeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class CommonStringKeys
public static readonly StringKey PLUS = new StringKey(null,"+", false);
public static readonly StringKey MINUS = new StringKey(null,"-", false);
public static readonly StringKey HASH = new StringKey(null,"#", false);
public static readonly StringKey TAB = new StringKey(null, "", false);
public static readonly StringKey TAB = new StringKey(null, "", false);
public static readonly StringKey EVENT = new StringKey(VAL, "EVENT");
public static readonly StringKey OK = new StringKey(VAL, "OK");
public static readonly StringKey CANCEL = new StringKey(VAL, "CANCEL");
Expand Down
8 changes: 6 additions & 2 deletions unity/Assets/Scripts/Quest/NextStageButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,18 @@ public void Update()
ui.SetFontStyle(FontStyle.Italic);

// Next phase button
// Tweak border size so that arrow is centered, should be changed if using another character or picture
ui = new UIElement(Game.UIPHASE);
ui.SetLocation(UIScaler.GetRight(-4f), UIScaler.GetBottom(-2.5f), 3, 2);
ui.SetLocation(UIScaler.GetRight(-4f), UIScaler.GetBottom(-2.5f), 3f, 2.25f);
new UIElementBorder(ui);
// make button slightly smaller so it does not overlap border
ui = new UIElement(Game.UIPHASE);
ui.SetLocation(UIScaler.GetRight(-3.95f), UIScaler.GetBottom(-2.45f), 2.9f, 1.9f);
ui.SetText(CommonStringKeys.TAB);
ui.SetFont(Game.Get().gameType.GetHeaderFont());
ui.SetFontSize(UIScaler.GetLargeFont());
ui.SetButton(Next);
ui.SetBGColor(bgColor);
new UIElementBorder(ui);
}

// Button pressed
Expand Down

0 comments on commit 66421de

Please sign in to comment.