Hello thar, Meinos Kaen here!
So, I'm currently working on a custom Agenda Screen for my MHA management based game. Now, everything is working smoothly except for one thing.
To explain what's happening here: you select the heroine, the time of day you want to alter and then from the boxes below you choose the activity for the time of day. The screen changes all variables seamlessly, the activity panel at the bottom even lights up as selected_idle but...!
The image above displaying the chosen activity only changes after switching to a different heroine and then back, it doesn't update in real time.
Is there a way to force the image to refresh itself upon button press? (I've already tried a couple of things while researching on this forum and others but I'm open to all suggestions anyway). This is the code I'm using.
So, I'm currently working on a custom Agenda Screen for my MHA management based game. Now, everything is working smoothly except for one thing.
To explain what's happening here: you select the heroine, the time of day you want to alter and then from the boxes below you choose the activity for the time of day. The screen changes all variables seamlessly, the activity panel at the bottom even lights up as selected_idle but...!
The image above displaying the chosen activity only changes after switching to a different heroine and then back, it doesn't update in real time.
Is there a way to force the image to refresh itself upon button press? (I've already tried a couple of things while researching on this forum and others but I'm open to all suggestions anyway). This is the code I'm using.
Python:
image activity_rest = "gui/ag/activity_rest_hover.jpg"
image activity_school = "gui/ag/activity_school_hover.jpg"
image activity_patrol = "gui/ag/activity_patrol_hover.jpg"
image mina_morn_panel = ConditionSwitch(
"mina_morn == 'School'", "activity_school",
"mina_morn == 'Rest'", "activity_rest",
"mina_morn == 'Patrol'", "activity_patrol",
)
image hero_activity_morn = ConditionSwitch(
"heroine_name == 'Ikuyo Midoriya'", "ikuyo_morn_panel",
"heroine_name == 'Toru Hagakure'", "toru_morn_panel",
"heroine_name == 'Remi Usagiyama'", "miruko_morn_panel",
"heroine_name == 'Ochaco Uraraka'", "ochaco_morn_panel",
"heroine_name == 'Mina Ashido'", "mina_morn_panel")
screen agenda():
tag menu
add "gui/ag/agenda_bg.png"
add "hero_image" xpos 1041 ypos 270
#Selected Activities
add "hero_activity_morn" xpos 1870 ypos 547
add "hero_activity_aft" xpos 2391 ypos 547
add "hero_activity_eve" xpos 2917 ypos 547
##Rest
imagebutton:
auto "gui/ag/activity_rest_%s.jpg" xpos 1222 ypos 1167 focus_mask None hover_sound "audio/SFX/hover_rare.ogg" activate_sound "audio/SFX/click_rare.ogg"
if heroine_name == "Ikuyo Midoriya":
if activity_time == "Morning":
action [SetVariable("ikuyo_morn", "Rest"), SetVariable("activity_time", "Afternoon")]
elif activity_time == "Afternoon":
action [SetVariable("ikuyo_aft", "Rest"), SetVariable("activity_time", "Evening")]
elif activity_time == "Evening":
action [SetVariable("ikuyo_eve", "Rest"), SetVariable("activity_time", "Morning")]
elif heroine_name == "Mina Ashido":
if activity_time == "Morning":
action [SetVariable("mina_morn", "Rest"), SetVariable("activity_time", "Afternoon")]
elif activity_time == "Afternoon":
action [SetVariable("mina_aft", "Rest"), SetVariable("activity_time", "Evening")]
elif activity_time == "Evening":
action [SetVariable("mina_eve", "Rest"), SetVariable("activity_time", "Morning")]