public override void Construct(MultiformTransmissionData args) { if (args.SenderName == LevelMultiform.MultiformName) { LevelNameInfo = args.GetAttr<LevelNameInfo>("LevelNameInfo"); } else { throw new MultiformException( String.Format("Unknown multiform layout: '{0}' -> '{1}'.", args.SenderName, MultiformName) ); } Construct_Text(); Construct_Buttons(); RegisterForm(new ClickParticleSpawnerForm()); FadeIn(20, Color.White, Update_Main, Render_Main); }
public void Update_Main() { if (HasScrollBar) { UpdateForm(ScrollBarFormName); } UpdateFormsExcept(ScrollBarFormName); if (buttonPressed) { var data = new MultiformTransmissionData(MultiformName); var LevelNameInfo = new LevelNameInfo(selectedLevelNumber); data.SetAttr<LevelNameInfo>("LevelNameInfo", LevelNameInfo); FadeOutAndClose( 20, Color.White, LevelLoadMultiform.MultiformName, data, true, () => { UpdateForms(); }, Render_Main); } else if (GetForm<GUIButton>(BackButtonFormName).IsReleased(MouseButtons.Left)) { FadeOutAndClose( 20, Color.White, MainMenu.MainMenuMultiform.MultiformName, new MultiformTransmissionData(MultiformName), true, () => { UpdateForms(); }, Render_Main); } }