better behaviour for some windows with dynamic font size

This commit is contained in:
in0finite 2019-07-27 01:34:55 +02:00
parent 12e37dc2fe
commit f70680aeb7
5 changed files with 8 additions and 7 deletions

View file

@ -76,7 +76,7 @@ namespace SanAndreasUnity.UI
buttonAction = () => {};
}
if (GUILayout.Button(buttonText, GUILayout.MinWidth(80), GUILayout.Height(30), GUILayout.ExpandWidth(false)))
if (GUILayout.Button(buttonText, GUILayout.MinWidth(80), GUILayout.MinHeight(30), GUILayout.ExpandWidth(false)))
buttonAction();
}

View file

@ -529,10 +529,10 @@ namespace SanAndreasUnity.UI {
// first row - controls
GUILayout.BeginHorizontal (GUILayout.MaxWidth (infoAreaRect.width));
if (GUILayout.Button ("Focus on player [F]", GUILayout.Height(25))) {
if (GUILayout.Button ("Focus on player [F]", GUILayout.MinHeight(25))) {
this.FocusOnPlayer ();
}
if (GUILayout.Button ("Teleport to waypoint [T]", GUILayout.Height(25))) {
if (GUILayout.Button ("Teleport to waypoint [T]", GUILayout.MinHeight(25))) {
this.TeleportToWaypoint ();
}
GUILayout.Space (5);

View file

@ -57,7 +57,7 @@ namespace SanAndreasUnity.UI
GUILayout.Space(40);
if (GUILayout.Button("Start", GUILayout.Width(80), GUILayout.Height(30)))
if (GUILayout.Button("Start", GUILayout.MinWidth(80), GUILayout.MinHeight(30), GUILayout.ExpandWidth(false)))
StartGame();
}

View file

@ -22,7 +22,8 @@ namespace SanAndreasUnity.UI {
this.RegisterButtonInPauseMenu ();
// adjust rect
this.windowRect = new Rect(Screen.width / 2 - 100, 10, 200, 180);
float width = 240;
this.windowRect = new Rect(Screen.width / 2 - width / 2, 10, width, 210);
}

View file

@ -27,9 +27,9 @@
- Chat
- Android: maybe add "/storage/" as predefined path ; predefined IP address in JoinGame window ? ;
- Android: set font size to 18 ? ;
- Touch input: repeat buttons don't work - cursor locking is probably the cause - don't lock the cursor, only hide it ; ignore mouse move input, and use panel which detects OnDrag event ; wider scrollbars ;
- Touch input: repeat buttons don't work - cursor locking is probably the cause - don't lock the cursor, only hide it ; ignore mouse move input, and use panel which detects OnDrag event ; adapt to dynamic font size: JoinGame, StartGame, main menu, utilities, map, vehicle spawner, ;
- Play sounds: horn ; empty weapon slot ; ped damage ; footsteps in run and sprint states ;