ID:273959
 
I made an entry in a menu in the interface and i made it function and all but i cant find its var to make a button enable and disable it. Can u help me?

Thnx in advance!
When you edit a menu entry, you can set the ID, with that ID you can alter it's properties using winset(), as you would with other interface objects.
In response to Megablaze
Megablaze wrote:
When you edit a menu entry, you can set the ID, with that ID you can alter it's properties using winset(), as you would with other interface objects.

i made the id soltourn and then i put the code like this:

mob
verb
ToggleMenu(var/name as text)
if(winget(src,"soltourn","is-disabled")=="true")
winset(src,"soltourn","is-disable=false")
else
winset(src,"soltourn","is-disable=true")

but it gets out a textbox
In response to Uzumaki naruto 1998
Uzumaki naruto 1998 wrote:
Megablaze wrote:
When you edit a menu entry, you can set the ID, with that ID you can alter it's properties using winset(), as you would with other interface objects.

i made the id soltourn and then i put the code like this:

mob
> verb
> ToggleMenu(var/name as text)
> if(winget(src,"soltourn","is-disabled")=="true")
> winset(src,"soltourn","is-disable=false")
> else
> winset(src,"soltourn","is-disable=true")
>

but it gets out a textbox

It's because you have ToggleMenu(var/name as text), if you don't sent text to the verb, then a pop up forcibly opens to retrieve text. If you don't need "name" for anything, then don't put it as an argument.
In response to Megablaze
It's because you have ToggleMenu(var/name as text), if you don't sent text to the verb, then a pop up forcibly opens to retrieve text. If you don't need "name" for anything, then don't put it as an argument.

Tried it that way the verb didnt do anything.
In winset do i have to put "soltourn.something?" or it should just be the id?
In response to Uzumaki naruto 1998
If "soltourn" is a unique ID, meaning you didn't call any other menu item or window control "soltourn", then it shouldn't give you any trouble. You can try doing "[menu name].soltourn" if you want.
In response to Megablaze
Megablaze wrote:
If "soltourn" is a unique ID, meaning you didn't call any other menu item or window control "soltourn", then it shouldn't give you any trouble. You can try doing "[menu name].soltourn" if you want.

No luck....

Anyways thnx alot for trying to help!
I really appreciate it.