Skip to content

Commit 96c7b81

Browse files
committed
Prevent HUD to be right clicked ingame
1 parent c6d8511 commit 96c7b81

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/kotlin/com/lambda/gui/components/HudGuiLayout.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,17 +195,17 @@ object HudGuiLayout : Loadable, Configurable(HudConfig) {
195195
}
196196
with(hud) { buildLayout() }
197197

198-
popupContextWindow("##ctx-${hud.name}") {
199-
menuItem("Remove HUD Element") {
200-
hud.disable()
201-
SnapManager.unregisterElement(hud.name)
198+
if (ClickGuiLayout.open) {
199+
popupContextWindow("##ctx-${hud.name}") {
200+
menuItem("Remove HUD Element") {
201+
hud.disable()
202+
SnapManager.unregisterElement(hud.name)
203+
}
204+
separator()
205+
buildConfigSettingsContext(hud)
202206
}
203-
separator()
204-
buildConfigSettingsContext(hud)
205-
}
206207

207-
if (ClickGuiLayout.open && !isLocked) {
208-
drawHudCornerArcs(windowDrawList, windowPos.x, windowPos.y, windowSize.x, windowSize.y)
208+
if (!isLocked) drawHudCornerArcs(windowDrawList, windowPos.x, windowPos.y, windowSize.x, windowSize.y)
209209
}
210210
val rect = RectF(windowPos.x, windowPos.y, windowSize.x, windowSize.y)
211211
SnapManager.registerElement(hud.name, rect)

0 commit comments

Comments
 (0)