public void Switcher_OnCategorySelect(int obj) { UISubpanel panel = null; switch (Mode) { case UIMainPanelMode.LIVE: switch (obj) { case 0: panel = new UIMotiveSubpanel(Game); break; case 1: panel = new UIJobSubpanel(Game); break; case 2: panel = new UIPersonalitySubpanel(Game); break; case 3: panel = new UIRelationshipSubpanel(Game); break; case 4: panel = new UIInventorySubpanel(Game); break; } break; case UIMainPanelMode.BUY: panel = new UIBuyBrowsePanel(Game, (sbyte)obj, GetLotType(false)); break; case UIMainPanelMode.BUILD: panel = new UIBuyBrowsePanel(Game, (sbyte)obj, UICatalogMode.Build); break; case UIMainPanelMode.OPTIONS: panel = new UIButtonSubpanel(Game, new UICatFunc[] { new UICatFunc(GameFacade.Strings.GetString("145", "3"), "opt_save.png", () => { Game.Save(); }), new UICatFunc(GameFacade.Strings.GetString("145", "1"), "opt_neigh.png", () => { Game.ReturnToNeighbourhood(); }), new UICatFunc(GameFacade.Strings.GetString("145", "5"), "opt_quit.png", () => { Game.CloseAttempt(); }), }); break; } SetSubpanel(panel); }
public void Switcher_OnCategorySelect(int obj) { UISubpanel panel = null; switch (obj) { case 0: panel = new UIMotiveSubpanel(Game); break; case 1: panel = new UIJobSubpanel(Game); break; case 2: panel = new UIPersonalitySubpanel(Game); break; case 3: panel = new UIRelationshipSubpanel(Game); break; case 4: panel = new UIInventorySubpanel(Game); break; } SetSubpanel(panel); }