/// <summary> /// Updates the panel states as needed. /// </summary> void UpdatePanelStates() { EnableDisableControl(RuneBagPanel, RuneBagEnabled); if (RuneBagEnabled == true) { RuneSlot.UpdateRuneDisplay(); } EnableDisableControl(StatsDisplayPanel, StatsEnabled); EnableDisableControl(InventoryPanel, InventoryEnabled); EnableDisableControl(PaperDollFemalePanel, InventoryEnabled && UWCharacter.Instance.isFemale); EnableDisableControl(PaperDollMalePanel, InventoryEnabled && !UWCharacter.Instance.isFemale); EnableDisableControl(ConversationPanel, ConversationEnabled); EnableDisableControl(MapPanel, MapEnabled); EnableDisableControl(DragonLeftPanel, (((InventoryEnabled) || (StatsEnabled) || (RuneBagEnabled) || (ConversationEnabled)) && (UWHUD.instance.window.FullScreen == false))); EnableDisableControl(DragonRightPanel, (((InventoryEnabled) || (StatsEnabled) || (RuneBagEnabled) || (ConversationEnabled)) && (UWHUD.instance.window.FullScreen == false))); EnableDisableControl(CutsceneSmallPanel, CutSceneSmallEnabled); EnableDisableControl(CutsceneFullPanel, CutSceneFullEnabled); EnableDisableControl(editorPanel, EditorMode); }
/// <summary> /// Updates the panel states as needed. /// </summary> void UpdatePanelStates() { EnableDisableControl(RuneBagPanel, RuneBagEnabled); if (RuneBagEnabled == true) { RuneSlot.UpdateRuneDisplay(); } EnableDisableControl(ContextMenu.gameObject, WindowDetectUW.ContextUIEnabled); EnableDisableControl(StatsDisplayPanel, StatsEnabled); EnableDisableControl(InventoryPanel, InventoryEnabled); EnableDisableControl(PaperDollFemalePanel, InventoryEnabled && UWCharacter.Instance.isFemale); EnableDisableControl(PaperDollMalePanel, InventoryEnabled && !UWCharacter.Instance.isFemale); EnableDisableControl(ConversationPanel, ConversationEnabled); EnableDisableControl(ChainsControl.gameObject, (RuneBagEnabled || StatsEnabled || InventoryEnabled) && ConversationEnabled == false); EnableDisableControl(UW2ConversationBG.gameObject, ConversationEnabled && _RES == GAME_UW2); EnableDisableControl(UW1ScrollTop, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1ScrollBottom, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1ScrlEdgeLeft1, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1ScrlEdgeLeft2, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1ScrlEdgeLeft3, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1ScrlEdgeRight1, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1ScrlEdgeRight2, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1ScrlEdgeRight3, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1PortraitFramePC, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1PortraitFrameNPC, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1PCNameFrame, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1NPCNameFrame, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1PCTradeArea, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1NPCTradeArea, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(UW1ConversationPaperBackground, ConversationEnabled && _RES != GAME_UW2); EnableDisableControl(MapPanel, MapEnabled); EnableDisableControl(DragonLeftPanel, ((_RES != GAME_UW2) && (((InventoryEnabled) || (StatsEnabled) || (RuneBagEnabled) || (ConversationEnabled)) && (UWHUD.instance.window.FullScreen == false)))); EnableDisableControl(DragonRightPanel, ((_RES != GAME_UW2) && (((InventoryEnabled) || (StatsEnabled) || (RuneBagEnabled) || (ConversationEnabled)) && (UWHUD.instance.window.FullScreen == false)))); EnableDisableControl(CutsceneSmallPanel, CutSceneSmallEnabled); EnableDisableControl(CutsceneFullPanel, CutSceneFullEnabled); EnableDisableControl(MonsterEyes.gameObject, ((((InventoryEnabled) || (StatsEnabled) || (RuneBagEnabled)) && (!ConversationEnabled)) && (UWHUD.instance.window.FullScreen == false))); EnableDisableControl(HudCompass.gameObject, !ConversationEnabled); EnableDisableControl(powergem.gameObject, !ConversationEnabled); EnableDisableControl(InteractionControlUW1.gameObject, !ConversationEnabled && (RuneBagEnabled || StatsEnabled || InventoryEnabled) && (_RES != GAME_UW2)); EnableDisableControl(InteractionControlUW2.gameObject, !ConversationEnabled && (RuneBagEnabled || StatsEnabled || InventoryEnabled) && (_RES == GAME_UW2)); EnableDisableControl(ContextMenu.gameObject, !ConversationEnabled); if ((_RES == GAME_UW2) && (ConversationEnabled)) { ConversationPanel.transform.SetSiblingIndex(5); MessageScrollBackground.GetComponent <RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, 300f); MessageScrollBackground.GetComponent <RectTransform>().anchoredPosition = new Vector2(-40.8f, -64.8f); //MessageScroll.GetComponent<RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, 250f); SetUIElementPosition(MessageScroll, 33f, 250f, new Vector2(4f, -62.4f)); EnableDisableControl(MessageLogScrollEdgeLeft, false); EnableDisableControl(MessageLogScrollEdgeRight, false); EnableDisableControl(MessageScrollBackground, false); EnableDisableControl(activeRunes[0].gameObject, false); EnableDisableControl(activeRunes[1].gameObject, false); EnableDisableControl(activeRunes[2].gameObject, false); } else { EnableDisableControl(MessageLogScrollEdgeLeft, true); EnableDisableControl(MessageLogScrollEdgeRight, true); EnableDisableControl(MessageScrollBackground, true); EnableDisableControl(activeRunes[0].gameObject, true); EnableDisableControl(activeRunes[1].gameObject, true); EnableDisableControl(activeRunes[2].gameObject, true); if (_RES == GAME_UW2) { MessageScrollBackground.GetComponent <RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, 208.68f); MessageScrollBackground.GetComponent <RectTransform>().anchoredPosition = new Vector2(-40.8f, -64.8f); //MessageScroll.GetComponent<RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, 172f); SetUIElementPosition(MessageScroll, 33f, 174f, new Vector2(-40.93f, -62.4f)); } } //additional tradeslots for uw2 EnableDisableControl(playerTrade[4], ConversationEnabled && _RES == GAME_UW2); EnableDisableControl(playerTrade[5], ConversationEnabled && _RES == GAME_UW2); EnableDisableControl(npcTrade[4], ConversationEnabled && _RES == GAME_UW2); EnableDisableControl(npcTrade[5], ConversationEnabled && _RES == GAME_UW2); EnableDisableControl(editorPanel, EditorMode); }