public int AddGroup(Object item, ProgrammingElement param, UiSelector selectorGroup) { int idx = items.Count; items.Add(new GroupData(item, param, selectorGroup)); return(idx); }
List <GameObject> childList = null; // List of children, must be of type GameObject // c'tor public UIShim(AddChildren addChildren, out UiSelector uiSelector, bool ignorePaths) { shared = new Shared(); renderObj = new RenderObj(ref shared); InGame.inGame.SetUIShim(renderObj); updateObj = new UpdateObj(ref shared); childList = new List <GameObject>(); this.ignorePaths = ignorePaths; addChildren(childList, out uiSelector, ignorePaths); } // end of UIShim c'tor
public bool RefreshSubSelector(List <UpdateObject> updateList, List <RenderObject> renderList) { bool result = false; if (this.activeSubSelector != null) { result = this.activeSubSelector.Refresh(updateList, renderList); if (result) { this.activeSubSelector = null; } } return(result); }
public virtual void OnCancel(Object sender, EventArgs args) { HideCursor(); if (this.parentSelector != null) { this.Deactivate(); this.parentSelector.ShowCursor(); this.parentSelector = null; } if (this.Cancel != null) { this.Cancel(this); } }
public void OnUnHighlight(UiSelector owner) { if ((progElement != null) && (owner.WhileHighlit != null)) { if (progElement.WhileHighlitDel != null) { owner.WhileHighlit -= progElement.WhileHighlitDel; } if (progElement.OnUnHighlightDel != null) { progElement.OnUnHighlightDel(); } } }
public virtual void OnSelect(Object sender, EventArgs args) { HideCursor(); if (this.indexDefaultItem == this.indexSelectedItem || indexCenteredItem == this.indexSelectedItem) { if (this.parentSelector != null) { this.Deactivate(); this.parentSelector.ShowCursor(); this.parentSelector = null; } if (this.Cancel != null) { this.Cancel(this); } } else { GroupData groupData = SelectedItem as GroupData; if (groupData != null) { // group was activated this.activeSubSelector = groupData.selectorGroup; groupData.selectorGroup.parentSelector = this; this.activeSubSelector.Activate(); this.activeSubSelector.ShowCursor(); } else { if (this.parentSelector != null) { this.Deactivate(); this.parentSelector.ShowCursor(); this.parentSelector = null; } } // item was activated if (this.Select != null) { this.Select(this); } } }
public override void Deactivate() { base.Deactivate(); if (state != States.Inactive && pendingState != States.Inactive) { pendingState = States.Inactive; this.composedObjectPending = null; BokuGame.objectListDirty = true; for (int i = 0; i < Count; ++i) { GroupData groupData = this[i] as GroupData; if (groupData != null) { UiSelector uiSelector = groupData.selectorGroup as UiSelector; if (uiSelector != null) { uiSelector.Deactivate(); } } } if (typePicker != null) { typePicker.OnGetType = holdOnGet; typePicker.OnSetType = holdOnSet; typePicker.OnPickType = holdOnPick; typePicker.Active = false; typePicker.Hidden = true; typePicker.UseAltOverlay = false; typePicker = null; } HelpOverlay.Pop(); } } // end of Deactivate()
public int AddGroup(Object item, UiSelector selectorGroup) { return(this.AddGroup(item, null, selectorGroup)); }
public GroupData(Object item, ProgrammingElement param, UiSelector selectorGroup) : base(item, param) { this.selectorGroup = selectorGroup; }