//zakomentovane, nebude se asi pouzivat (cisla zatim staci).pokud se odkomentuje, je treba pridat k widgetu sprite pro ikonu ("GadgetIcon"). /*void SetGadgetsSprites() * { * //TODO: zobrazovani itemu muze byt matouci, pokud je obsazeno mene slotu tak se to v gadgetech collapsuje a obsazuji se nejprve prvni, pak druhy, etc (i dyz je v equipu obsazen napr druhy a treti) * //zjisti ktery item je ve kterem slotu. * //GuiHUD.Instance.Gadgets jeste nejsou inicializovene takze to zjistitme z ppi * List<PPIItemData> equipedItems = PPIManager.Instance.GetLocalPPI().EquipList.Items; * for(int i = 0; i < GuiOptions.GadgetButtons.Length; i++) * { * string gName = gadgetDummnyName + (i+1); * CustomControl c = m_Controls.Find(f => f.m_Name == gName); * //E_ItemID itemID = GuiHUD.Instance.Gadgets.Gadgets[i]; * PPIItemData itmData = equipedItems.Find(f => f.EquipSlotIdx == i); * E_ItemID itemID = itmData.ID; * GUIBase_Sprite s = GuiBaseUtils.GetChildSprite( c.m_WidgetDummy, "GadgetIcon" ); * if(itemID != E_ItemID.None) * { * ItemSettings itmSet = ItemSettingsManager.Instance.Get(itemID); * s.Widget.CopyMaterialSettings(itmSet.HudWidget); * s.Widget.FadeAlpha = 1.0f; //Show * } * else * { * s.Widget.FadeAlpha = 0f; //hide * } * } * }*/ protected override void OnViewHide() { GuiBaseUtils.RegisterButtonDelegate(m_ScreenLayout, "ResetButton", null, null); GuiBaseUtils.RegisterButtonDelegate(m_ScreenLayout, "Back_Button", null, null); GuiMenu menu = Owner as GuiMenu; if (menu != null) { menu.SetOverlaysVisible(true); menu.SetBackgroundVisibility(true); } }
protected override void OnViewHide() { RegisterButtonDelegate(CLOSE_BUTTON, null, null); GuiMenu menu = Owner as GuiMenu; if (menu != null) { menu.SetOverlaysEnabled(true); menu.SetBackgroundVisibility(true); } base.OnViewHide(); }
protected override void OnViewShow() { base.OnViewShow(); GuiMenu menu = Owner as GuiMenu; if (menu != null) { menu.SetOverlaysEnabled(false); menu.SetBackgroundVisibility(false); } RegisterButtonDelegate(CLOSE_BUTTON, null, (inside) => { Owner.Back(); }); }
protected override void OnViewShow() { GuiMenu menu = Owner as GuiMenu; if (menu != null) { menu.SetBackgroundVisibility(false); menu.SetOverlaysVisible(false); } InitTempPositions(); //SetGadgetsSprites(); //TODO: nefunguje tak jak bych si predstavoval, doresit logiku ShowSchemeSpecificSprites(); GuiBaseUtils.RegisterButtonDelegate(m_ScreenLayout, "ResetButton", null, ResetButtonDelegate); GuiBaseUtils.RegisterButtonDelegate(m_ScreenLayout, "Back_Button", null, ConfirmButtonDelegate); }
protected override void OnViewShow() { base.OnViewShow(); GuiMenu menu = Owner as GuiMenu; if (menu != null) { menu.SetOverlaysVisible(false); menu.SetBackgroundVisibility(false); } m_Prize = 0; m_SlotMachine.Activate(); m_ChipsLabel = GuiBaseUtils.GetControl <GUIBase_Label>(Layout, CHIPS_LABEL); m_GoldsLabel = GuiBaseUtils.GetControl <GUIBase_Label>(Layout, GOLDS_LABEL); m_JackpotLabel = GuiBaseUtils.GetControl <GUIBase_Label>(Layout, JACKPOT_LABEL); m_CloseButton = GuiBaseUtils.RegisterButtonDelegate(Layout, CLOSE_BUTTON, () => { StartCoroutine(Close_Coroutine()); }, null); m_SpinButton = GuiBaseUtils.RegisterButtonDelegate(Layout, SPIN_BUTTON, () => { StartCoroutine(Spin_Coroutine()); }, null); m_BuyChipsButton = GuiBaseUtils.RegisterButtonDelegate(Layout, BUYCHIPS_BUTTON, () => { StartCoroutine(BuyChips_Coroutine()); }, null); PlayerPersistantInfo ppi = PPIManager.Instance.GetLocalPPI(); m_CloseButton.IsDisabled = false; if (ppi.Chips <= 0) { StartCoroutine(BuyChips_Coroutine()); } // make sure we have correct value displayed Jackpot = m_Jackpot; RefreshValues(); UpdateButtons(); }
protected override void OnViewHide() { StopAllCoroutines(); // allow update next time m_UpdatingJackpot = false; GuiBaseUtils.RegisterButtonDelegate(Layout, CLOSE_BUTTON, null, null); GuiBaseUtils.RegisterButtonDelegate(Layout, SPIN_BUTTON, null, null); GuiBaseUtils.RegisterButtonDelegate(Layout, BUYCHIPS_BUTTON, null, null); m_SlotMachine.Deactivate(); GuiMenu menu = Owner as GuiMenu; if (menu != null) { menu.SetOverlaysVisible(true); menu.SetBackgroundVisibility(true); } base.OnViewHide(); }