I'm creating a game with a built-in phone menu. The player can take out their phone at any time and read social media posts. The phone menu and the main game screen are both active at once, so the player can read new posts that pop up while clicking through the text of the main game at the same time. Like this:
All images are placeholder, obviously.
I want to add a search bar to this menu. The idea is that the player can type in keywords, and based on the keyword they type, specific articles will pop up in the phone - like this:
The question: How can i do this?
I know how to achieve what I want in a normal label, but I can't for the life of me figure out how to do it in a screen. This is the relevant bit of my code at the moment:
Code: Select all
screen search:
tag computer
window style style.window["computer"]:
vbox:
hbox:
button action Show("search") xmaximum 50 xminimum 50 ymaximum 50 yminimum 50 ypadding 10:
has hbox spacing 10
add "images/gui/searchGlass.png"
input default "" xmaximum 200 xminimum 200
if _return == "1":
text "1 Test success!!!"
else:
text "{b}Article Title{/b}" style style.text["phone"]
text "[_return]"
text "test Article!" style style.text["phone"]