public override void Update() { IMGUI.Begin(font); IMGUI.BeginWindow("NASTY-ENGINE", Engine.GameWidth / 2 - 70, Engine.GameHeight / 2); //TODO: fill out these scenes if (IMGUI.Button("IMGUI", 140)) { toggle = !toggle; } IMGUI.Separator(); if (IMGUI.Button("COLLISIONS", 140)) { } IMGUI.Separator(); if (IMGUI.Button("INPUT", 140)) { } IMGUI.Separator(); if (IMGUI.Button("TILEMAP", 140)) { } IMGUI.Separator(); IMGUI.EndWindow(); if (toggle) { IMGUI.BeginWindow("IMGUI", Engine.GameWidth / 2 - 70 + 180, Engine.GameHeight / 2); if (IMGUI.Button("BUTTON", 140)) { } IMGUI.TextField("TEXT-FIELD", ref text); IMGUI.EndWindow(); } IMGUI.End(); base.Update(); }
protected override void OnUpdateFrame(FrameEventArgs e) { if (IMGUI.CheckUpdate()) { IMGUI.ProcessInput(this.X, this.Y); //if (IMGUI.Button()) { } //IMGUI.AddRect(0.0f, 0.0f, 150.0f, 50.0f,Color4.Yellow,true); IMGUI.End(); } Console.WriteLine("x is" + OpenTK.Input.Mouse.GetCursorState().X); Console.WriteLine("y is" + OpenTK.Input.Mouse.GetCursorState().Y); }