yes, I'm aware that in Renpy's Screen Action document, and in Screen document,
it does say that we can make button's area to run actions, such as [action, hovered, unhovered, etc...] and we can make Screen Actions when button's actions are invoked.
So what I want to do is, when I unhover the button, the screen should disappear. Thought this would be easier when I use unhovered... but I got stuck here
there are 2 screens above, the home menu screen involving 4 options(get out, computer, sleep, inventory), and the main schedule screen involving 2 options (training room, library.)
When I toggle, or hover the 4 optioned screen, the 2 optioned screen should appear. __ I could easily progress by using hovered or action ToggleScreen.
Now, 2 optioned screen has appeared and I want to make the screen disappear when the mouse unhovers the 2 optioned screen area.
The first method I've thought is
when I use unhovered in each 2 textbuttons(training room, library) and Hide the 2 optioned screen, it hides the 2 optioned screen when each buttons are unhovered, but with this method, I can't move my mouse freely in 2 optioned screen because even when it unhovers one of the button, the 2 optioned screen disappears. I want my 2 optioned screen appear untill the mouse unhovers the 2 optioned screen's area.
so I tried another method with buttons and vbox
Code: Select all
screen homeMain:
frame:
align(0.25,0.3)
button:
vbox:
textbutton "go out":
action ToggleScreen("homeSchedule")
textbutton "computer":
action NullAction()
textbutton "inventory":
action NullAction()
textbutton "sleep":
action Return(True)
screen homeSchedule():
frame:
align(0.35,0.3)
button:
unhovered Hide("homeSchedule")
vbox:
textbutton "training room":
action NullAction()
textbutton "library":
action NullAction()
I thought this method would work, but it doesn't.... and I can't find a reason why. Should there be a NullAction such as below?
[code][file][/file]
button:
action NullAction()
unhovered Hide("homeSchedule")
vbox:
textbutton "training room":
action NullAction()
textbutton "library":
action NullAction()
the third method I tried to use is make a variable ("menuHover") using bool/flag and when an hover/unhover occurs, I set the variable to True/Fasle. Then , When the variable is fasle, it hides the screen. But... It doens't seem to work either, and other probelm with this is that every time I have to use this GUI, I have to make other flags, and it takes more effort to make it oraganized.
so... That's all I've tried and nothing worked.
maybe there's more methods but I can't think of it now... maybe I'm a newbie to programming.. So I came here, to forum to question about it cuz there are a lot of experienced coders in this forum...
sorry for bad English... I really tried to make it understandable