public override void InitState() { base.InitState(); SUI = new UI(); var bg = new ImageForm().Set(0, 0, AppInfo.W, AppInfo.H).SetImage(new Texture2D("FoomED/bg2.jpg", LoadMethod.Single, false)); SUI.Root.Add(bg); var edit_win = new Forms.EditMapForm().Set(30, 200, AppInfo.W - 80, AppInfo.H - 250, "Edit:" + MapName) as Forms.EditMapForm; bg.Add(edit_win); var tool_win = new WindowForm().Set(30, 10, 600, 120, "Tools"); bg.Add(tool_win); CurMap = new InvaderEng.Map.Map(); CurMap.WallBox(0, 0, 200, 30); edit_win.EditMap = CurMap; edit_win.RenderMap(); var mapRen = new Forms.MapRenderForm().Set(300, 80, 512, 512, "Map Preview") as Forms.MapRenderForm; mapRen.Map = edit_win.EditMap; mapRen.Render = new InvaderEng.Render.MapRenderer(); mapRen.Render.Map = mapRen.Map; bg.Add(mapRen); }
public override void InitState() { SUI = new UI(); var bg = new ImageForm().Set(0, 0, AppInfo.W, AppInfo.H, "").SetImage(new Texture2D("FoomED/bg1.jpg", LoadMethod.Single, false)); SUI.Root.Add(bg); var back = new ButtonForm().Set(5, 5, 80, 30, "Back"); bg.Add(back); back.Click = (b) => { FusionApp.PopState(); }; var lab = new LabelForm().Set(25, 80, 200, 30, "Map Title:"); bg.Add(lab); TextBoxForm map_name = new TextBoxForm().Set(120, 75, 200, 30, "") as TextBoxForm; bg.Add(map_name); map_name.Enter = (txt) => { Directory.CreateDirectory("Game/Maps/" + txt + "/"); var edit_state = new EditMapState(txt); FusionApp.PushState(edit_state); }; }
public override void InitState() { base.InitState(); MenuSongSrc = new VSoundSource("Foom/Song/menu1.mp3"); //e2 MenuSongSound = MenuSongSrc.Play2D(true); SUI = new FusionEngine.Resonance.UI(); var TitleBG = new ImageForm().Set(0, 0, AppInfo.W, AppInfo.H).SetImage(new Texture2D("Foom/Img/titlebg1.jpg", LoadMethod.Single, false)); var foomLab = new ImageForm().Set(AppInfo.W / 2 - 350, 40, 700, 356).SetImage(new Texture2D("Foom/Img/foom1.png", LoadMethod.Single, true)); TitleBG.Add(foomLab); var StartGame = new ButtonForm().Set(AppInfo.W / 2 - 120, 380, 260, 40, "Begin..."); var ExitGame = new ButtonForm().Set(AppInfo.W / 2 - 120, 430, 260, 40, "Leave..."); TitleBG.Add(StartGame); TitleBG.Add(ExitGame); SUI.Root.Add(TitleBG); StartGame.Click = (b) => { MenuSongSound.Stop(); FusionApp.PushState(new IntroState(), true); }; }
public WelcomeScreen() { SUI = new UI(); bg_img = new FusionEngine.Texture.Texture2D("data/ui/skin/windowbg1.png", FusionEngine.Texture.LoadMethod.Single, true); BG = (ImageForm) new ImageForm().Set(0, 0, FusionEngine.App.AppInfo.W, FusionEngine.App.AppInfo.H); BG.SetImage(bg_img); MainForm = (WelcomeForm) new WelcomeForm().Set(450, 200, FusionEngine.App.AppInfo.W - 900, 250, "Welcome to Fusion"); BGForm = (BackgroundForm) new BackgroundForm(20).Set(0, 0, FusionEngine.App.AppInfo.W, FusionEngine.App.AppInfo.H); var bgi = new ImageForm().Set(0, 0, FusionEngine.App.AppInfo.W, FusionEngine.App.AppInfo.H, ""); bgi.SetImage(new FusionEngine.Texture.Texture2D("data/ui/bg1.jpg", FusionEngine.Texture.LoadMethod.Single, false)); bgi.Add(BGForm); SUI.Root.Add(bgi); BGForm.Add(MainForm); // SUI.Top = MainForm; MainForm.Create = (user, pass) => { Console.WriteLine("Creating new account. User:"******" Pass:" + pass); }; Com = new FusionEngine.Composition.Composite(); BloomUI = new FusionEngine.Composition.Compositers.BloomUICompositer(); dynamic ui = BloomUI.InputFrame; ui.GUI = SUI; Com.AddCompositer(BloomUI); int t = System.Environment.TickCount + 8000; while (System.Environment.TickCount < t) { } }
public override void InitState() { SUI = new UI(); var code_bg = new ImageForm().Set(0, 0, AppInfo.W, AppInfo.H, "").SetImage(new Texture2D("data/ui/codebg1.jpg", LoadMethod.Single, false)); EditWin = (CodeEditorForm) new CodeEditorForm().Set(10, 50, AppInfo.W - 20, AppInfo.H - 60, "Fusion - Code Editor"); code_bg.Add(EditWin); SUI.Root.Add(code_bg); script.Scripts.ScanMods(); base.InitState(); }
public override void InitState() { base.InitState(); MenuSongSrc = new VSoundSource("Foom/Song/intro1.mp3"); MenuSongSound = MenuSongSrc.Play2D(true); var img = new ImageForm().Set(300, 800, 300, 300, "").SetImage(new Texture2D("Foom/Img/Intro/img1.jpg", LoadMethod.Single, true)); UI.BootAlpha = 0.0f; int tc = 0; void ImgUp1() { img.Y = img.Y - 3; } bool ImgUpR() { if (img.Y < 200) { return(true); } return(false); } void Img1Text() { } bool Img1TextD() { if (Environment.TickCount > (tc + 3000)) { return(true); } return(false); } //int tc = 0; void FadeUi1() { } void UI3() { } bool UI3D() { if (Environment.TickCount > (tc + 3500)) { return(true); } return(false); } void UI4S() { SUI.Root.Forms.Clear(); var img1 = new ImageForm().Set(50, 50, 600, 600).SetImage(new Texture2D("Foom/Img/Intro/img3.jpg", LoadMethod.Single, false)); var tex1 = new ImageForm().Set(100, 300, 600, 250).SetImage(new Texture2D("Foom/Img/Intro/text2.png", LoadMethod.Single, true)); SUI.Root.Forms.Add(img1); SUI.Root.Add(img1); img1.Add(tex1); UI.TarAlpha = 1.0f; } bool FadeDone1() { if (Environment.TickCount > (tc + 3500)) { UI.TarAlpha = 0.0f; if (UI.BootAlpha < 0.01f) { UI.TarAlpha = 1.0f; return(true); } } return(false); } void UI3S() { tc = Environment.TickCount; SUI.Root.Forms.Clear(); var img2 = new ImageForm().Set(100, 100, 400, 400).SetImage(new Texture2D("Foom/Img/Intro/img2.jpg", LoadMethod.Single, true)); SUI.Root.Add(img2); var log1 = new ImageForm().Set(220, 350, 500, 250).SetImage(new Texture2D("Foom/Img/Intro/text1.png", LoadMethod.Single, true)); SUI.Root.Add(log1); Logics.When(FadeDone1, UI4S); UI.TarAlpha = 1.0f; Logics.Do(UI3, UI3D); } // bool UI3D() // { // return false; //} bool FadeUID() { if (UI.BootAlpha < 0.01f) { return(true); } return(false); } void FadeUI() { UI.TarAlpha = 0.0f; Logics.Do(FadeUi1, FadeUID, UI3S); // UI.BootAlpha += (0.0f - UI.BootAlpha) * 0.1f; } void NextImg() { tc = Environment.TickCount; Logics.Do(Img1Text, Img1TextD, FadeUI); var text = new LabelForm().Set(600, 250, 200, 80, "The Dawn Of Hell..."); SUI.Root.Forms.Add(text); } Logics.Do(ImgUp1, ImgUpR, NextImg); SUI = new UI(); SUI.Root.Add(img); }