Skip to content

Commit

Permalink
Small refactory and re-linked buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
robbobby committed Feb 25, 2021
1 parent dbd7194 commit 2e91a10
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 38 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 25 additions & 25 deletions Emerald/Assets/Scenes/GameScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.12731749, g: 0.13414757, b: 0.1210787, a: 1}
m_IndirectSpecularColor: {r: 0.12732536, g: 0.13415338, b: 0.121077195, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -30589,11 +30589,11 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1439063042}
m_MethodName: OptionWindowStateHandler
m_Mode: 1
m_MethodName: TogglePriorityWindowActiveState
m_Mode: 2
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_ObjectArgument: {fileID: 332477668}
m_ObjectArgumentAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
Expand Down Expand Up @@ -77148,11 +77148,11 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1439063042}
m_MethodName: GuildWindowStateHandler
m_Mode: 1
m_MethodName: ToggleWindowActiveState
m_Mode: 2
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_ObjectArgument: {fileID: 647342740}
m_ObjectArgumentAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
Expand Down Expand Up @@ -86335,11 +86335,11 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1439063042}
m_MethodName: SkillWindowStateHandler
m_Mode: 1
m_MethodName: ToggleWindowActiveState
m_Mode: 2
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_ObjectArgument: {fileID: 2033180754}
m_ObjectArgumentAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
Expand Down Expand Up @@ -87817,11 +87817,11 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1439063042}
m_MethodName: PartyWindowStateHandler
m_Mode: 1
m_MethodName: ToggleWindowActiveState
m_Mode: 2
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_ObjectArgument: {fileID: 2084991254}
m_ObjectArgumentAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
Expand Down Expand Up @@ -90518,11 +90518,11 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1439063042}
m_MethodName: InventoryWindowStateHandler
m_Mode: 1
m_MethodName: ToggleWindowActiveState
m_Mode: 2
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_ObjectArgument: {fileID: 2121219932}
m_ObjectArgumentAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
Expand Down Expand Up @@ -100825,11 +100825,11 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1439063042}
m_MethodName: CharacterWindowStateHandler
m_Mode: 1
m_MethodName: ToggleWindowActiveState
m_Mode: 2
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_ObjectArgument: {fileID: 227496102}
m_ObjectArgumentAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
Expand Down
22 changes: 11 additions & 11 deletions Emerald/Assets/Scripts/UiControllers/UiWindowController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ private void Awake() {
chatActions.Newaction.performed += _ => ToggleChat();

// Window Action Handlers //
uiInput.Options.performed += _ => PriorityWindowStateHandler(optionsMenu);
uiInput.Inventory.performed += _ => WindowStateHandler(inventoryMenu);
uiInput.Character.performed += _ => WindowStateHandler(characterMenu);
uiInput.Skills.performed += _ => WindowStateHandler(skillsMenu);
uiInput.Guild.performed += _ => WindowStateHandler(guildMenu);
uiInput.Party.performed += _ => WindowStateHandler(partyWindow);
uiInput.Options.performed += _ => TogglePriorityWindowActiveState(optionsMenu);
uiInput.Inventory.performed += _ => ToggleWindowActiveState(inventoryMenu);
uiInput.Character.performed += _ => ToggleWindowActiveState(characterMenu);
uiInput.Skills.performed += _ => ToggleWindowActiveState(skillsMenu);
uiInput.Guild.performed += _ => ToggleWindowActiveState(guildMenu);
uiInput.Party.performed += _ => ToggleWindowActiveState(partyWindow);
uiInput.MiniMap.performed += _ => MiniMapWindowStateHandler();
uiInput.Escape.performed += _ => HandleEscapePress();

Expand Down Expand Up @@ -101,19 +101,19 @@ private void HandleEscapePress()
for (int i = 0; i < priorityWindowCloseList.Count; i++)
{
if (!priorityWindowCloseList[i].activeSelf) continue;
PriorityWindowStateHandler(priorityWindowCloseList[i]);
TogglePriorityWindowActiveState(priorityWindowCloseList[i]);
return;
}
}

if (activeWindows.Count > 0) {
WindowStateHandler(activeWindows.Last());
ToggleWindowActiveState(activeWindows.Last());
return;
}
PriorityWindowStateHandler(optionsMenu); // No other windows open, open the options menu
TogglePriorityWindowActiveState(optionsMenu); // No other windows open, open the options menu
}

private void WindowStateHandler(GameObject window) {
public void ToggleWindowActiveState(GameObject window) {
window.SetActive(!window.activeSelf);
if (window.activeSelf) {
activeWindows.Add(window);
Expand All @@ -122,7 +122,7 @@ private void WindowStateHandler(GameObject window) {
}
}

private void PriorityWindowStateHandler(GameObject window) {
public void TogglePriorityWindowActiveState(GameObject window) {
window.SetActive(!window.activeSelf);
if (window.activeSelf) {
priorityWindowCount++;
Expand Down
2 changes: 1 addition & 1 deletion Emerald/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ PlayerSettings:
webGLThreadsSupport: 0
webGLWasmStreaming: 0
scriptingDefineSymbols:
1: AURA_IN_PROJECT;UNITY_POST_PROCESSING_STACK_V2;TERRAINPACKAGE_EXIST;__MICROSPLAT__;__MICROSPLAT_ALPHAHOLE__;__MICROSPLAT_DETAILRESAMPLE__;__MICROSPLAT_GLOBALTEXTURE__;__MICROSPLAT_SNOW__;__MICROSPLAT_STREAMS__;__MICROSPLAT_TERRAINBLEND__;__MICROSPLAT_TESSELLATION__;__MICROSPLAT_TEXTURECLUSTERS__;__MICROSPLAT_TRIPLANAR__;__MICROSPLAT_WINDGLITTER__;AURA_IN_SCENEVIEW
1: AURA_IN_PROJECT;UNITY_POST_PROCESSING_STACK_V2;TERRAINPACKAGE_EXIST;__MICROSPLAT__;__MICROSPLAT_ALPHAHOLE__;__MICROSPLAT_DETAILRESAMPLE__;__MICROSPLAT_GLOBALTEXTURE__;__MICROSPLAT_SNOW__;__MICROSPLAT_STREAMS__;__MICROSPLAT_TERRAINBLEND__;__MICROSPLAT_TESSELLATION__;__MICROSPLAT_TEXTURECLUSTERS__;__MICROSPLAT_TRIPLANAR__;__MICROSPLAT_WINDGLITTER__
4: UNITY_POST_PROCESSING_STACK_V2
7: UNITY_POST_PROCESSING_STACK_V2
13: UNITY_POST_PROCESSING_STACK_V2
Expand Down

0 comments on commit 2e91a10

Please sign in to comment.