I Have a really simple obstacle I'm sure you're going to joke about but I'am strugguling against it almost all the afternoon.
I'm looking for a way to do this :
When you press a key (like "i" for exemple), you hide or show the window where the text is writen (by default) (it's the 'say' screen with the 'who, what' parameter).
When you press 'h" by default (hiding interface), you hide or show all the actif screen of the interface to only look at the scene. I'm looking to do almost the same thing but I only want to show/hide the say screen.
In the code it's simple, in a label I know how to do it with the following line : window hide / window show
But I want a key to do that, not a label.
Just to let you know, I what to do this because :
> I have mutiple screen in my interface that's why I don't what to use H
> I have customized a lot my say screen, adding new part and new button on it (like the backpack acces)
So I need a way to hide/show the text box of the say screen even if there is no text currently displaying in it.
For now I tried this, but any of this is working :
(it's not just one screen, it's all the test I've done mixed together)
Code: Select all
# screen story_inv_belt_main_window:
# if objective_window_displayed == True:
# key "i" action [ToggleVariable( "story_inv_belt_main_window_displayed" ), Call("story_inv_belt_main_window_show")]
# else:
# key "i" action [ToggleVariable( "story_inv_belt_main_window_displayed" ), Call("story_inv_belt_main_window_hide")]
#
# if story_inv_belt_main_window_displayed == True:
# key "i" action [ToggleVariable( "story_inv_belt_main_window_displayed" ), Hide("say"())
# else:
# key "i" action [ToggleVariable( "story_inv_belt_main_window_displayed" ), Show("say"())
# if objective_window_displayed == True:
# key "i" action ToggleVariable( "story_inv_belt_main_window_displayed" ), Hide("story_inv_belt_main_window")
# else:
# key "i" action ToggleVariable( "story_inv_belt_main_window_displayed" ), Show("story_inv_belt_main_window")
# if objective_window_displayed == True:
# key "i" action [ToggleVariable( "story_inv_belt_main_window_displayed" ), Call("story_inv_belt_main_window_show")]
# else:
# key "i" action [ToggleVariable( "story_inv_belt_main_window_displayed" ), Call("story_inv_belt_main_window_hide")]
# label story_inv_belt_main_window_show:
# window show
# label story_inv_belt_main_window_hide:
# window hide