Skip to content

Commit

Permalink
Merge pull request #24 from steamclock/set-visiblity-for-buttons
Browse files Browse the repository at this point in the history
set visibility for buttons
  • Loading branch information
munl authored Feb 12, 2024
2 parents 32144c2 + 15387a6 commit 0bf784b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal class MenuClassBuilder(
is ActionWrapper -> {
if (option.isGlobal) {
val actionText =
"Action(title = \"${option.title}\", onClick = { ${option.functionName}() })"
"Action(title = \"${option.title}\", onClick = { ${option.functionName}() }, isVisible = ${option.isVisible})"
"DebugMenu.instance.addOptions(key, $actionText)"
} else {
""
Expand Down Expand Up @@ -174,7 +174,7 @@ internal class MenuClassBuilder(
"""
val ${it.functionName}Action = Action(title = "${it.title}", onClick = {
instance.${parentName}Ref?.get()?.${it.functionName}()
})
}, isVisible = ${it.isVisible})
DebugMenu.instance.addOptions(key, ${it.functionName}Action)
"""
}
Expand Down

0 comments on commit 0bf784b

Please sign in to comment.