1717
1818package com.lambda.gui.components
1919
20- import com.lambda.Lambda.LOG
2120import com.lambda.Lambda.mc
2221import com.lambda.config.Configurable
2322import com.lambda.config.configurations.GuiConfig
@@ -41,10 +40,8 @@ import com.lambda.util.KeyCode
4140import com.lambda.util.NamedEnum
4241import com.lambda.util.WindowUtils.setLambdaWindowIcon
4342import imgui.ImGui
44- import imgui.ImVec2
4543import imgui.extension.implot.ImPlot
4644import imgui.flag.ImGuiCol
47- import imgui.flag.ImGuiCond
4845import imgui.flag.ImGuiHoveredFlags
4946import imgui.flag.ImGuiWindowFlags
5047import net.minecraft.SharedConstants
@@ -203,8 +200,6 @@ object ClickGuiLayout : Loadable, Configurable(GuiConfig) {
203200 val navWindowingDimBg by setting(" Nav Windowing Dim Background" , Color (204 , 204 , 204 , 51 )).group(Group .Colors )
204201 val modalWindowDimBg by setting(" Modal Window Dim Background" , Color (20 , 20 , 20 , 89 )).group(Group .Colors )
205202
206- var firstRender = true
207-
208203 init {
209204 listen<GuiEvent .NewFrame > {
210205 if (! open) return @listen
@@ -225,7 +220,12 @@ object ClickGuiLayout : Loadable, Configurable(GuiConfig) {
225220 // for this use case so for the time being we will leave the positions fixed. Too bad!
226221 ImGui .setNextWindowPos(nextX, baseY)
227222
228- window(tag.name, flags = ImGuiWindowFlags .AlwaysAutoResize ) {
223+ // FixMe:
224+ // Due to the auto resize of windows, if a tag has no module names that is at least the
225+ // same length as the tag name, the title of the window will clip out the window box.
226+ // For the time being I have removed the ability to collapse the windows so the titles
227+ // have more space lol.
228+ window(tag.name, flags = ImGuiWindowFlags .AlwaysAutoResize or ImGuiWindowFlags .NoCollapse ) {
229229 ModuleRegistry .modules
230230 .filter { it.tag == tag }
231231 .forEach { with (ModuleEntry (it)) { buildLayout() } }
@@ -240,8 +240,6 @@ object ClickGuiLayout : Loadable, Configurable(GuiConfig) {
240240 ImGui .showDemoWindow()
241241 ImPlot .showDemoWindow()
242242 }
243-
244- firstRender = false
245243 }
246244 }
247245
0 commit comments