Skip to content

Commit 0bf784b

Browse files
authored
Merge pull request #24 from steamclock/set-visiblity-for-buttons
set visibility for buttons
2 parents 32144c2 + 15387a6 commit 0bf784b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

debugmenu-codegen/src/main/java/com/steamclock/codegen/ClassBuilder.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ internal class MenuClassBuilder(
1111
is ActionWrapper -> {
1212
if (option.isGlobal) {
1313
val actionText =
14-
"Action(title = \"${option.title}\", onClick = { ${option.functionName}() })"
14+
"Action(title = \"${option.title}\", onClick = { ${option.functionName}() }, isVisible = ${option.isVisible})"
1515
"DebugMenu.instance.addOptions(key, $actionText)"
1616
} else {
1717
""
@@ -174,7 +174,7 @@ internal class MenuClassBuilder(
174174
"""
175175
val ${it.functionName}Action = Action(title = "${it.title}", onClick = {
176176
instance.${parentName}Ref?.get()?.${it.functionName}()
177-
})
177+
}, isVisible = ${it.isVisible})
178178
DebugMenu.instance.addOptions(key, ${it.functionName}Action)
179179
"""
180180
}

0 commit comments

Comments
 (0)