public override bool Refresh(List <UpdateObject> updateList, List <RenderObject> renderList) { bool result = false; if (state != pendingState) { if (pendingState == States.Active) { updateList.Add(updateObj); updateObj.Activate(); renderList.Add(renderObj); renderObj.Activate(); BokuGame.Audio.PlayStartupSound(); } else { updateObj.Deactivate(); updateList.Remove(updateObj); renderObj.Deactivate(); renderList.Remove(renderObj); // Since we never come back to this object, flush the device dependent textures. UnloadContent(); } state = pendingState; } return(result); } // end of TitleScreen Refresh()
public void Activate(OnEditDone doneCallback, string original, ValidateText validateTextCallback = null) { SetText(original); shared.blob.End(); // Start with cursor at end of existing string. if (state != States.Active) { shared.onEditDone = doneCallback; shared.validateTextCallback = validateTextCallback; //------------------ Copied from other implementation -------------- // Do stack handling here. If we do it in the update object we have no // clue which order things get pushed and popped and madness ensues. CommandStack.Push(commandMap); HelpOverlay.Push(@"TextLineEditor"); //------------------ Copied from other implementation END -------------- state = States.Active; //shared.blob.s updateObj.Activate(); } }
} // end of VideoOutput c'tor public override bool Refresh(List <UpdateObject> updateList, List <RenderObject> renderList) { bool result = false; if (state != pendingState) { if (pendingState == States.Active) { updateList.Add(updateObj); updateObj.Activate(); renderList.Add(renderObj); renderObj.Activate(); } else { renderObj.Deactivate(); renderList.Remove(renderObj); updateObj.Deactivate(); updateList.Remove(updateObj); } state = pendingState; } return(result); } // end of VideoOutput Refresh()
} // end of UIShim c'tor public override bool Refresh(List <UpdateObject> updateList, List <RenderObject> renderList) { bool result = false; // Did we delete ourself? // Check if state has changed. if (pendingState != state) { if (pendingState == States.Active) { updateList.Add(updateObj); updateObj.Activate(); /// Don't add it to the renderlist, it's handed directly to the /// InGame so that it can be rendered at the right time. *** renderObj.Activate(); } else if (pendingState == States.Inactive) { renderObj.Deactivate(); updateObj.Deactivate(); updateList.Remove(updateObj); } state = pendingState; } // Refresh children. for (int i = 0; i < childList.Count; i++) { GameObject obj = (GameObject)childList[i]; obj.Refresh(updateObj.updateList, renderObj.renderList); } return(result); }
} // end of MainMenu OnCancel() public override bool Refresh(List <UpdateObject> updateList, List <RenderObject> renderList) { bool result = false; if (state != pendingState) { if (pendingState == States.Active) { updateList.Add(updateObj); updateObj.Activate(); renderList.Add(renderObj); renderObj.Activate(); shared.menu.Active = true; shared.timer.Reset(BokuGame.bokuGame.rnd.NextDouble()); } else { shared.menu.Active = false; renderObj.Deactivate(); renderList.Remove(renderObj); updateObj.Deactivate(); updateList.Remove(updateObj); } state = pendingState; } return(result); } // end of MainMenu Refresh()
public override bool Refresh(ArrayList updateList, ArrayList renderList) { bool result = false; if (state != pendingState) { if (pendingState) { updateList.Add(updateObj); updateObj.Activate(); renderList.Add(renderObj); renderObj.Activate(); } else { BokuGame.gameListManager.RemoveObject(this); updateObj.Deactivate(); updateList.Remove(updateObj); renderObj.Deactivate(); renderList.Remove(renderObj); result = true; } state = pendingState; } // call refresh on child list return(result); } // end of LightColumn Refresh()
public override bool Refresh(List <UpdateObject> updateList, List <RenderObject> renderList) { bool result = false; if (state != pendingState) { if (pendingState == States.Active) { updateList.Add(updateObj); updateObj.Activate(); renderList.Add(renderObj); renderObj.Activate(); // Do stack handling here. If we do it in the update object we have no // clue which order things get pushed and popped and madness ensues. // If we do this in the Activate/Deactivate calls then we get garbaged // handling if we're polling. What can happen is that we pop ourselves // because of a 'B' button that we polled but then we no longer have input // focus and the next object in the update list may also look for and // find the B button being pressed. CommandStack.Push(commandMap); } else { renderObj.Deactivate(); renderList.Remove(renderObj); updateObj.Deactivate(); updateList.Remove(updateObj); // Do stack handling here. If we do it in the update object we have no // clue which order things get pushed and popped and madness ensues. // If we do this in the Activate/Deactivate calls then we get garbaged // handling if we're polling. What can happen is that we pop ourselves // because of a 'B' button that we polled but then we no longer have input // focus and the next object in the update list may also look for and // find the B button being pressed. CommandStack.Pop(commandMap); } state = pendingState; } return(result); }
public override bool Refresh(List <UpdateObject> updateList, List <RenderObject> renderList) { bool result = false; if (state != pendingState) { if (pendingState == States.Active) { updateList.Add(updateObj); updateObj.Activate(); renderList.Add(renderObj); renderObj.Activate(); shared.menu.Active = true; // If we were in first person mode, reset things as needed. Need to // do this here instead of in Activate since there we still need to // render another frame. if (CameraInfo.FirstPersonActive) { CameraInfo.FirstPersonActor.SetFirstPerson(false); CameraInfo.ResetAllLists(); CameraInfo.Mode = CameraInfo.Modes.Edit; InGame.inGame.Camera.FollowCameraDistance = 10.0f; } } else { shared.menu.Active = false; renderObj.Deactivate(); renderList.Remove(renderObj); updateObj.Deactivate(); updateList.Remove(updateObj); } state = pendingState; } return(result); }
} // end of LoadLevelMenu SetToDownloadsTab() #endregion #region Internal public override bool Refresh(ArrayList updateList, ArrayList renderList) { bool result = false; if (state != pendingState) { if (pendingState == States.Active) { updateList.Add(updateObj); updateObj.Activate(); renderList.Add(renderObj); renderObj.Activate(); UIGrid grid = shared.GetGridFromCurTab(); if (grid != null) { grid.Active = true; } } else { UIGrid grid = shared.GetGridFromCurTab(); if (grid != null) { grid.Active = false; } renderObj.Deactivate(); renderList.Remove(renderObj); updateObj.Deactivate(); updateList.Remove(updateObj); } state = pendingState; } return(result); }
} // end of DoneLoadingContent() public override bool Refresh(List <UpdateObject> updateList, List <RenderObject> renderList) { bool result = false; if (state != pendingState) { if (pendingState) { updateList.Add(updateObj); updateObj.Activate(); renderList.Add(renderObj); renderObj.Activate(); } else { BokuGame.gameListManager.RemoveObject(this); renderObj.Deactivate(); renderList.Remove(renderObj); updateObj.Deactivate(); updateList.Remove(updateObj); titleScreen.Deactivate(); logonDialog.Deactivate(); result = true; } state = pendingState; } // call refresh on child list. titleScreen.Refresh(updateObj.updateList, renderObj.renderList); logonDialog.Refresh(updateObj.updateList, renderObj.renderList); return(result); } // end of TitleScreenMode Refresh()