From d8fda32bb62dbc02e4e881e5e5a2b865aa862493 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Wed, 3 Jun 2026 17:24:53 -0400 Subject: Small cleanup for 4.1_beta1 Signed-off-by: Andrew Opalach --- Plugin.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Plugin.cs') diff --git a/Plugin.cs b/Plugin.cs index 7f88d07..0451ea8 100755 --- a/Plugin.cs +++ b/Plugin.cs @@ -1,4 +1,4 @@ -#define ENABLE_ASSERTS +//#define ENABLE_ASSERTS //#define HOOK_ORDER_ASSERTS //#define LOG_DEBUG_MESSAGES #define MOUSE_AND_KEYBOARD_LAYER @@ -53,6 +53,7 @@ using SharpPluginLoader.Core.Configuration; // - Attempt to document all test cases I can think of. // - Centralize all bindings to get a better idea of how to structure custom binds. // - Pass on ImGui flicker. +// - Simplify setting ImGui width. // - WASD for ignore camera direction. // - Make audio like waterfall follow camera position instead of player position. // - Audio high/lowpass possible? @@ -3341,9 +3342,9 @@ namespace NewCamera int lodCount = MemoryUtil.Read(partsAddr + 0xD0); const int lodStructSize = 0x50; const int partsPerLine = 10; - bool allOn = ImGui.Button("All On"); + bool allOn = ImGui.Button("Show All"); ImGui.SameLine(); - bool allOff = ImGui.Button("All Off"); + bool allOff = ImGui.Button("Hide All"); for (int i = 0; i < numParts; i++) { ref int lodOffset = ref MemoryUtil.GetRef(baseOffset + (i * 0x4)); @@ -3626,6 +3627,7 @@ namespace NewCamera private void drawViewportInfo(int i, float width, Config config, bool debug) { + ImGui.PushItemWidth(width * 0.75f); Viewport vp = CameraSystem.GetViewport(i); if (debug) { @@ -3885,6 +3887,7 @@ namespace NewCamera } } } + ImGui.PopItemWidth(); } private void drawAnimationInfo(Entity entity, float width, bool debug) @@ -5296,6 +5299,7 @@ namespace NewCamera if (timeAddr != 0x0) { float gameTime = MemoryUtil.Read(timeAddr + 0x38); + ImGui.SetNextItemWidth(width * 0.75f); if (ImGui.SliderFloat("Time of Day", ref gameTime, 0.0f, 24.0f)) { MemoryUtil.GetRef(timeAddr + 0x38) = gameTime; -- cgit v1.2.3-101-g0448