Skip to content

Commit

Permalink
fixed minor ui problems with gamepads
Browse files Browse the repository at this point in the history
  • Loading branch information
ipodtouch0218 committed Mar 15, 2022
1 parent 3c7aff9 commit e4b975a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 64 deletions.
106 changes: 43 additions & 63 deletions Assets/Scenes/MainMenu.unity
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: -1
m_Mode: 2
m_WrapAround: 0
m_SelectOnUp: {fileID: 1362432724}
m_SelectOnDown: {fileID: 161100438}
Expand Down Expand Up @@ -729,7 +729,7 @@ RectTransform:
m_Father: {fileID: 1947854095}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.00049591064}
m_AnchorMin: {x: 0, y: 0.00078982115}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
Expand Down Expand Up @@ -2340,7 +2340,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_Mode: 2
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
Expand Down Expand Up @@ -2421,7 +2421,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 4
m_Mode: 2
m_WrapAround: 0
m_SelectOnUp: {fileID: 2036188050}
m_SelectOnDown: {fileID: 1362432724}
Expand Down Expand Up @@ -3216,7 +3216,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36.7
m_fontSize: 36.65
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1
Expand Down Expand Up @@ -12444,7 +12444,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 566761496}
m_Enabled: 0
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0eb16fed5fde3a4448b1c0b4192cbce3, type: 3}
m_Name:
Expand Down Expand Up @@ -12500,7 +12500,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 452697243}
m_FirstSelected: {fileID: 1324877902}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!1 &571112099
Expand Down Expand Up @@ -14956,7 +14956,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &749373549
RectTransform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -15953,7 +15953,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36.8
m_fontSize: 36.75
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
Expand Down Expand Up @@ -16709,7 +16709,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36.7
m_fontSize: 36.65
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1
Expand Down Expand Up @@ -17288,6 +17288,7 @@ MonoBehaviour:
createLobbySelected: {fileID: 1375833479}
creditsSelected: {fileID: 1722575666}
errorBox: {fileID: 276608278}
errorButton: {fileID: 1139030223}
errorText: {fileID: 997536057}
region: {fileID: 947074750}
roomSettings:
Expand Down Expand Up @@ -18010,10 +18011,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: -1
m_WrapAround: 0
m_SelectOnUp: {fileID: 1362432724}
m_SelectOnDown: {fileID: 161100438}
m_Mode: 2
m_WrapAround: 1
m_SelectOnUp: {fileID: 1949357579}
m_SelectOnDown: {fileID: 1949357579}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
Expand Down Expand Up @@ -19357,7 +19358,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_Mode: 2
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
Expand Down Expand Up @@ -22750,7 +22751,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 4
m_Mode: 2
m_WrapAround: 0
m_SelectOnUp: {fileID: 161100438}
m_SelectOnDown: {fileID: 2036188050}
Expand Down Expand Up @@ -23193,8 +23194,8 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 47220571}
m_HandleRect: {fileID: 47220570}
m_Direction: 2
m_Value: 1.0001539
m_Size: 0.9995041
m_Value: 1.0001932
m_Size: 0.9992102
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
Expand Down Expand Up @@ -46618,9 +46619,11 @@ CompositeCollider2D:
Y: -680000000
- X: -255000000
Y: -680000000
- - X: -244999900
Y: -720000041
- X: -244999900
- - X: -280000000
Y: -695312512
- X: -250000000
Y: -695312512
- X: -250000000
Y: -720000000
- X: -220000000
Y: -720000000
Expand Down Expand Up @@ -46648,22 +46651,6 @@ CompositeCollider2D:
Y: -720000000
- X: -280000000
Y: -720000000
- X: -280000000
Y: -695312512
- X: -250000000
Y: -695312512
- X: -250000000
Y: -714999900
- X: -250000041
Y: -714999900
- X: -250000100
Y: -714999959
- X: -250000100
Y: -720000041
- X: -250000041
Y: -720000100
- X: -244999959
Y: -720000100
- - X: -160000000
Y: -685000000
- X: -170000000
Expand Down Expand Up @@ -46761,6 +46748,8 @@ CompositeCollider2D:
- X: -200000000
Y: -776249984
- - X: -275000000
Y: -825000000
- X: -275000000
Y: -815312512
- X: -250000000
Y: -815312512
Expand Down Expand Up @@ -46834,8 +46823,6 @@ CompositeCollider2D:
Y: -812187520
- X: -285000000
Y: -825000000
- X: -275000000
Y: -825000000
- - X: -357187488
Y: -791249984
- X: -355000000
Expand Down Expand Up @@ -46904,18 +46891,18 @@ CompositeCollider2D:
Y: -812812480
- X: -354062496
Y: -812812480
- - X: -281249984
Y: -815000000
- X: -283750016
Y: -812812480
- X: -285000000
- - X: -285000000
Y: -812187520
- X: -285000000
Y: -811875008
- X: -283437504
Y: -812499968
- X: -280937504
Y: -815000000
- X: -281249984
Y: -815000000
- X: -283750016
Y: -812812480
m_CompositePaths:
m_Paths:
- - {x: -48.5, y: 5.5}
Expand Down Expand Up @@ -47172,8 +47159,9 @@ CompositeCollider2D:
- {x: -27.5, y: -67.5}
- {x: -27.5, y: -68}
- {x: -25.5, y: -68}
- - {x: -24.49999, y: -72.00001}
- {x: -24.49999, y: -72}
- - {x: -28, y: -69.53125}
- {x: -25, y: -69.53125}
- {x: -25, y: -72}
- {x: -22, y: -72}
- {x: -22, y: -68.5}
- {x: -23, y: -68.5}
Expand All @@ -47187,14 +47175,6 @@ CompositeCollider2D:
- {x: -30.5, y: -70}
- {x: -30.5, y: -72}
- {x: -28, y: -72}
- {x: -28, y: -69.53125}
- {x: -25, y: -69.53125}
- {x: -25, y: -71.499985}
- {x: -25.000006, y: -71.499985}
- {x: -25.00001, y: -71.49999}
- {x: -25.00001, y: -72.00001}
- {x: -25.000006, y: -72.000015}
- {x: -24.499996, y: -72.000015}
- - {x: -16, y: -68.5}
- {x: -17, y: -68.5}
- {x: -17, y: -70}
Expand Down Expand Up @@ -48558,7 +48538,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -257, y: -100.93802}
m_SizeDelta: {x: -257, y: -100.901276}
m_Pivot: {x: 0, y: 0}
--- !u!114 &1603668786
MonoBehaviour:
Expand Down Expand Up @@ -50345,10 +50325,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_Mode: 4
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnUp: {fileID: 1911492857}
m_SelectOnDown: {fileID: 250558581}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
Expand Down Expand Up @@ -51073,7 +51053,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1141870934}
m_HandleRect: {fileID: 1141870933}
m_Direction: 2
m_Value: 1
m_Value: 0
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
Expand Down Expand Up @@ -55152,10 +55132,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_Mode: 4
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnUp: {fileID: 1450387490}
m_SelectOnDown: {fileID: 1782708238}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 0
Expand Down Expand Up @@ -57147,7 +57127,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: -1
m_Mode: 2
m_WrapAround: 0
m_SelectOnUp: {fileID: 1362432724}
m_SelectOnDown: {fileID: 161100438}
Expand Down
3 changes: 2 additions & 1 deletion Assets/Scripts/UI/Menu/MainMenuManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class MainMenuManager : MonoBehaviour, ILobbyCallbacks, IInRoomCallbacks,
public Slider musicSlider, sfxSlider, masterSlider, lobbyPlayersSlider;
public GameObject mainMenuSelected, optionsSelected, lobbySelected, currentLobbySelected, createLobbySelected, creditsSelected;
private int prevWidth = 1280, prevHeight = 720;
public GameObject errorBox;
public GameObject errorBox, errorButton;
public TMP_Text errorText;
public TMP_Dropdown region;

Expand Down Expand Up @@ -372,6 +372,7 @@ public void OpenInLobbyMenu(RoomInfo room) {
public void OpenErrorBox(string text) {
errorBox.SetActive(true);
errorText.text = text;
EventSystem.current.SetSelectedGameObject(errorButton);
}

public void ConnectToDropdownRegion() {
Expand Down

0 comments on commit e4b975a

Please sign in to comment.