Пример #1
0
 public Builder(bool toggleableAndStartsClosed, bool menuPausesGame, PaletteConfig paletteConfig)
 {
     _toggleable     = toggleableAndStartsClosed;
     _startsOpen     = !toggleableAndStartsClosed;
     _menuPausesGame = menuPausesGame;
     _paletteConfig  = paletteConfig;
 }
Пример #2
0
 public override void SetColors(PaletteConfig config)
 {
     base.SetColors(config);
     config.ApplyToSelectable(TextButton);
     config.ApplyToSelectable(LeftButton);
     config.ApplyToSelectable(RightButton);
 }
Пример #3
0
 public PanelObjectConfig(InitObject initObject)
 {
     Key = initObject.Key;
     CreationCallback  = initObject.CreationCallback;
     OnDisplayCallback = initObject.OnDisplayCallback;
     PaletteConfig     = initObject.PaletteConfig;
     Prefab            = initObject.Prefab;
 }
Пример #4
0
 public InitObject(string key, GameObject prefab, Action <GameObject> creationCallback = null,
                   Action <GameObject, UIElementManager> onDisplayCallback             = null, PaletteConfig paletteConfig = null)
 {
     Key = key;
     CreationCallback  = creationCallback;
     OnDisplayCallback = onDisplayCallback;
     PaletteConfig     = paletteConfig;
     Prefab            = prefab;
 }
Пример #5
0
 public MenuConfig(bool toggleable, bool startsOpen, bool menuPausesGame, string mainPanelKey, PaletteConfig paletteConfig, PanelConfig[] panelConfigs, List <System.Action <string, string> > panelChangeCallbacks = null, MenuAttributes?menuAttributesOverride = null)
 {
     Toggleable     = toggleable;
     StartsOpen     = startsOpen;
     MenuPausesGame = menuPausesGame;
     MainPanelKey   = mainPanelKey;
     PaletteConfig  = paletteConfig;
     PanelConfigs   = panelConfigs;
     MenuAttributes = menuAttributesOverride.HasValue ? menuAttributesOverride.Value
                         : (menuPausesGame ? MenuAttributes.StandardPauseMenu() : MenuAttributes.StandardNonPauseMenu());
     PanelChangeCallbacks = panelChangeCallbacks ?? new List <System.Action <string, string> >();
 }
Пример #6
0
 public virtual void SetColors(PaletteConfig config)
 {
     if (config != null)
     {
         foreach (Selectable select in GetComponentsInChildren <Selectable>())
         {
             config.ApplyToSelectable(select);
         }
         foreach (HighlightTextWhenSelected highlight in GetComponentsInChildren <HighlightTextWhenSelected>())
         {
             highlight.SelectColor = config.SelectedColor;
         }
     }
 }
Пример #7
0
 public override void SetColors(PaletteConfig config)
 {
     base.SetColors(config);
 }
Пример #8
0
 public TBuilder SetPaletteConfigOverride(PaletteConfig config)
 {
     _paletteConfig = config;
     return(_builderInstance);
 }
Пример #9
0
 public override void SetColors(PaletteConfig config)
 {
     base.SetColors(config);
     config?.ApplyToSelectable(Template);
 }