Hi everyone, I wanted to add simple feature to my character panel.
I would love to add textbutton/imagebutton that will display menu with clothing options for each character (like school, daily, sport etc) but probably my braincells can't find solution to how to implement it in my code.
I use screen that displays certain characters depending on selected panel. I have not idea how could I add choice menu in something like that.
I thought about using very basic if outfit_a = 1 add school_outfit_a or something like that and then displaying choices that will modify that value. No idea how to make it work, without redoing a lot of code or making code very ugly.
I know that 'technically' I should be able to make a ton of labels, use jump option, change each label depending on time of the day player was in that panel but then, by doing it that way I have no idea how could I return to the exactly that character's panel. Plus it sounds super tedious and ineffective.
Probably it all comes down to my little-to-noone knowledge about more advanced Python stuff.
Thanks in advance for any help regarding my problem.
Here is the single character panel code, I deleted all unimportant stuff like text displaying info about character etc. Code is little modified version of the one that one of good folks helped me make. Ofcourse after "test" characters I have bunch of my characters but that's the main working code.
I would love to add textbutton/imagebutton that will display menu with clothing options for each character (like school, daily, sport etc) but probably my braincells can't find solution to how to implement it in my code.
I use screen that displays certain characters depending on selected panel. I have not idea how could I add choice menu in something like that.
I thought about using very basic if outfit_a = 1 add school_outfit_a or something like that and then displaying choices that will modify that value. No idea how to make it work, without redoing a lot of code or making code very ugly.
I know that 'technically' I should be able to make a ton of labels, use jump option, change each label depending on time of the day player was in that panel but then, by doing it that way I have no idea how could I return to the exactly that character's panel. Plus it sounds super tedious and ineffective.
Probably it all comes down to my little-to-noone knowledge about more advanced Python stuff.
Thanks in advance for any help regarding my problem.
Here is the single character panel code, I deleted all unimportant stuff like text displaying info about character etc. Code is little modified version of the one that one of good folks helped me make. Ofcourse after "test" characters I have bunch of my characters but that's the main working code.
Python:
screen characters():
tag menu
default character_page_info = "Characters"
use game_menu(_("Characters")):
fixed:
order_reverse True
text character_page_info + " info":
style "page_label_text"
xalign 0.5
if character_page_info == "Characters":
grid 6 2:
style_prefix "character_slot"
xalign 0.0 yalign 0.1
spacing 50
for i in my_characters_list:
vbox:
imagebutton:
idle "cha_" + str(i.lower()) + "_info_idle.png"
hover "cha_" + str(i.lower()) + "_info_hover.png"
action SetScreenVariable("character_page_info", i + "'s"))
else:
if character_page_info == "test's":
text "Affection: [test_affection]" xalign 0.1 yalign 0.35
imagebutton xalign 0.1 yalign 0.7:
idle "cha_events"
hover "cha_test_events"
action ShowMenu('test_eventlist')
add "cha_replays" xalign 0.5 yalign 0.7