// Standalone Memory Editor window internal void DrawWindow(string title, byte[] mem_data, int mem_size, int base_display_addr = 0x0000) { Sizes s = new Sizes(); CalcSizes(ref s, mem_size, base_display_addr); LGui.Begin(); LGui.BeginFrame(title, new LGuiVec2(s.WindowWidth, 500)); DrawContents(mem_data, mem_size, base_display_addr); LGui.EndFrame(); LGui.Slider("Cols", ref Cols, 4, 32, 1, true, "{0}", 200.0f); LGui.SameLine(); OptShowAscii = LGui.CheckBox("OptShowAscii", OptShowAscii); LGui.SameLine(); OptShowDataPreview = LGui.CheckBox("OptShowDataPreview", OptShowDataPreview); if (OptShowDataPreview && DataPreviewAddr == -1) { DataPreviewAddr = 0; } LGui.End(); }
internal void Render(Graphics Device) { Executor_.SetDevice(Device); WinConvert.SetDevice(Device); LGui.Begin(); if (DemoIndex_ != -1) { DemoList_[DemoIndex_].Render(); } else { Device.FillRectangle(BrushCache.GetOrCreate(LGuiColor.Red), 0, 0, WinSize.X, WinSize.Y); } LGui.End(); Device.DrawString($"DrawCall : {LGui.GetDrawCall()}", TextFont_, Brushes.White, 800, 520); }