internal static BitMaskPanel Add( RoadEditorPanel roadEditorPanel, UIComponent container, string label, string hint, FlagDataT flagData) { try { Log.Debug($"BitMaskPanel.Add(container:{container}, label:{label}, enumType:{flagData.EnumType})"); var subPanel = UIView.GetAView().AddUIComponent(typeof(BitMaskPanel)) as BitMaskPanel; subPanel.FlagData = flagData; subPanel.Target = roadEditorPanel.GetTarget(); subPanel.Label.text = label + ":"; subPanel.Hint = hint; subPanel.Initialize(); container.AttachUIComponent(subPanel.gameObject); roadEditorPanel.FitToContainer(subPanel); subPanel.EventPropertyChanged += roadEditorPanel.OnObjectModified; return(subPanel); } catch (Exception ex) { Log.Exception(ex); return(null); } }
public static BitMaskPanel Add( RoadEditorPanel roadEditorPanel, UIComponent container, string label, Type enumType, SetHandlerD setHandler, GetHandlerD getHandler, string hint) { Log.Debug($"BitMaskPanel.Add(container:{container}, label:{label}, enumType:{enumType})"); var subPanel = UIView.GetAView().AddUIComponent(typeof(BitMaskPanel)) as BitMaskPanel; subPanel.EnumType = enumType; subPanel.SetHandler = setHandler; subPanel.GetHandler = getHandler; subPanel.Initialize(); subPanel.Label.text = label + ":"; subPanel.Hint = hint; //if (dark) // subPanel.opacity = 0.1f; //else // subPanel.opacity = 0.3f; container.AttachUIComponent(subPanel.gameObject); roadEditorPanel.FitToContainer(subPanel); return(subPanel); }
public static ButtonPanel Add( RoadEditorPanel roadEditorPanel, UIComponent container, string label, string hint, Action action) { Log.Debug($"ButtonPanel.Add(container:{container}, label:{label})"); var subPanel = UIView.GetAView().AddUIComponent(typeof(ButtonPanel)) as ButtonPanel; subPanel.Enable(); subPanel.Button.text = label; subPanel.hint_ = hint; subPanel.Button.eventClick += (_, __) => action(); container.AttachUIComponent(subPanel.gameObject); roadEditorPanel.FitToContainer(subPanel); return(subPanel); }
public static RangePanel Add( RoadEditorPanel roadEditorPanel, UIComponent container, string label, object target, FieldInfo fieldInfo) { Log.Debug($"RangePanel.Add(container:{container}, label:{label})"); var subPanel = UIView.GetAView().AddUIComponent(typeof(RangePanel)) as RangePanel; subPanel.fieldInfo_ = fieldInfo; subPanel.target_ = target; subPanel.Initialize(); subPanel.Label.text = label + ":"; container.AttachUIComponent(subPanel.gameObject); roadEditorPanel.FitToContainer(subPanel); return(subPanel); }
internal static MultiBitMaskPanel Add( RoadEditorPanel roadEditorPanel, UIComponent container, string label, string hint, params FlagDataT[] flagDatas) { Log.Debug($"BitMaskPanel.Add(container:{container}, label:{label})"); var subPanel = UIView.GetAView().AddUIComponent(typeof(MultiBitMaskPanel)) as MultiBitMaskPanel; subPanel.FlagDatas = flagDatas; subPanel.Label.text = label + ":"; subPanel.Hint = hint; subPanel.Target = roadEditorPanel.GetTarget(); subPanel.Initialize(); container.AttachUIComponent(subPanel.gameObject); roadEditorPanel.FitToContainer(subPanel); subPanel.EventPropertyChanged += roadEditorPanel.OnObjectModified; return(subPanel); }