I was wondering if anyone has come up with a better way to put that checkmark next to menu items in the WindowMenu function.
I have different settings that can be changed and when they are changed, it puts a checkmark in the menu next to whatever you changed, however it is making the code massive.
Currently I have it so it runs through a bunch of if statements before doing the WindowMenu function so it can build the menu with the checkmarks in the right spots depending on what all they've selected.
Here's a small part of it so you can see what I mean.
I just cannot think of an efficient way to do this with the checkmarks. I have tried a few different ways for it to know what all has a checkmark, but still ended up with a massive code.
Any ideas?
I have different settings that can be changed and when they are changed, it puts a checkmark in the menu next to whatever you changed, however it is making the code massive.
Currently I have it so it runs through a bunch of if statements before doing the WindowMenu function so it can build the menu with the checkmarks in the right spots depending on what all they've selected.
Here's a small part of it so you can see what I mean.
elseif GetVariable("avatar_checked") == "one" and GetVariable("castle_checked") == "two" and GetVariable("bgColour") == nil then
menustring_settings ="! >Avatar Image | +Default | - | Browse... | < | >Background Image | Castle 1 | +Castle 2 | Castle 3 | - | Browse... | < | - | Background Color | - | List equipment stats "
elseif GetVariable("avatar_checked") == "one" and GetVariable("castle_checked") == "one" and GetVariable("bgColour") == nil then
menustring_settings ="! >Avatar Image | +Default | - | Browse... | < | >Background Image | +Castle 1 | Castle 2 | Castle 3 | - | Browse... | < | - | Background Color | - | List equipment stats "
elseif GetVariable("avatar_checked") == "one" and GetVariable("castle_checked") == "three" and GetVariable("bgColour") == nil then
menustring_settings ="! >Avatar Image | +Default | - | Browse... | < | >Background Image | Castle 1 | Castle 2 | +Castle 3 | - | Browse... | < | - | Background Color | - | List equipment stats "
elseif GetVariable("avatar_checked") == "one" and GetVariable("castle_checked") == "browse" and GetVariable("bgColour") == nil then
menustring_settings ="! >Avatar Image | +Default | - | Browse... | < | >Background Image | Castle 1 | Castle 2 | Castle 3 | - | +Browse... | < | - | Background Color | - | List equipment stats "
I just cannot think of an efficient way to do this with the checkmarks. I have tried a few different ways for it to know what all has a checkmark, but still ended up with a massive code.
Any ideas?