示例#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);
 }