mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-26 22:10:17 +00:00
StartGame and JoinGame windows better behave with different font sizes
This commit is contained in:
parent
46d9529277
commit
d58482d524
2 changed files with 13 additions and 5 deletions
|
@ -44,7 +44,12 @@ namespace SanAndreasUnity.UI
|
|||
GUILayout.Label ("Port:");
|
||||
m_portStr = GUILayout.TextField(m_portStr, GUILayout.Width(100));
|
||||
|
||||
GUILayout.Space(40);
|
||||
}
|
||||
|
||||
protected override void OnWindowGUIAfterContent()
|
||||
{
|
||||
|
||||
GUILayout.Space(40);
|
||||
|
||||
// label with status
|
||||
string strStatus = "Disconnected";
|
||||
|
@ -76,7 +81,7 @@ namespace SanAndreasUnity.UI
|
|||
buttonAction = () => {};
|
||||
}
|
||||
|
||||
if (GUILayout.Button(buttonText, GUILayout.MinWidth(80), GUILayout.MinHeight(30), GUILayout.ExpandWidth(false)))
|
||||
if (GUIUtils.ButtonWithCalculatedSize(buttonText))
|
||||
buttonAction();
|
||||
|
||||
}
|
||||
|
|
|
@ -55,11 +55,14 @@ namespace SanAndreasUnity.UI
|
|||
GUILayout.Label("Map:");
|
||||
m_selectedSceneIndex = GUILayout.SelectionGrid(m_selectedSceneIndex, m_availableScenes, 4);
|
||||
|
||||
GUILayout.Space(40);
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Start", GUILayout.MinWidth(80), GUILayout.MinHeight(30), GUILayout.ExpandWidth(false)))
|
||||
protected override void OnWindowGUIAfterContent()
|
||||
{
|
||||
GUILayout.Space(40);
|
||||
|
||||
if (GUIUtils.ButtonWithCalculatedSize("Start"))
|
||||
StartGame();
|
||||
|
||||
}
|
||||
|
||||
void StartGame()
|
||||
|
|
Loading…
Reference in a new issue