I have the following screen, which highlights itself when hovering on a selection
Clicking on it shows a list of personnel of the given selection, however "selection #1" is no longer highlighted
And if I click on a name on the list (to show a third screen), ALL selections from column #2 are highlighted (and I wish just one of them to be) and no choice from column #1 is:
This is the code for the above screens:
Code: Select all
screen reftrai:
imagemap:
ground "gui/reftrai_inactive.png"
idle "gui/reftrai_inactive.png"
hover "gui/reftrai_active.png"
selected_idle "gui/reftrai_inactive.png"
selected_hover "gui/reftrai_active.png"
if selezione == "dr":
selected_idle "gui/reftrai_inactive.png"
hotspot (6, 51, 350, 85) action ShowMenu("reftrai_selection", selezione = "dr")
hotspot (6, 145, 350, 85) action ShowMenu("reftrai_selection", selezione = "nu")
hotspot (6, 234, 350, 85) action ShowMenu("reftrai_selection", selezione = "mw")
hotspot (6, 317, 350, 85) action ShowMenu("reftrai_selection", selezione = "ch")
hotspot (6, 401, 350, 85) action ShowMenu("reftrai_selection", selezione = "te")
hotspot (6, 484, 350, 85) action ShowMenu("reftrai_selection", selezione = "ad")
hotspot (1027, 640, 252, 56) action Return()
transclude
screen reftrai_selection(selezione):
use reftrai
frame:
side ("c r"):
area (424, 68, 338, 504)
viewport id "my_scrollbar":
draggable True mousewheel True
vbox:
xpos 0.52
ypos 0.35
xmaximum 300
if selezione == "dr":
if dr1_hired == True:
textbutton "{b}[DR1_name]" action Show("courses", who="dr",number="1",selezione="dr") text_style "codmedcond_button_text"
if dr2_hired == True:
textbutton "{b}[DR2_name]" action Show("courses", who="dr",number="2",selezione="dr") text_style "codmedcond_button_text"
if dr3_hired == True:
textbutton "{b}[DR3_name]" action Show("courses", who="dr",number="3",selezione="dr") text_style "codmedcond_button_text"
if dr1_hired == True or dr2_hired == True or dr3_hired == True:
textbutton "Every Doctor" action Show("courses", who="dr",number="4",selezione="dr") text_style "codmedcond_button_text"
if selezione == "mw":
if mw1_hired == True:
textbutton "{b}[MW1_name]" action Show("courses", who="mw",number="1",selezione="mw") text_style "codmedcond_button_text"
if mw2_hired == True:
textbutton "{b}[MW2_name]" action Show("courses", who="mw",number="2",selezione="mw") text_style "codmedcond_button_text"
if mw3_hired == True:
textbutton "{b}[MW3_name]" action Show("courses", who="mw",number="3",selezione="mw") text_style "codmedcond_button_text"
if mw1_hired == True or mw2_hired == True or mw3_hired == True:
textbutton "Every Midwife" action Show("courses", who="mw",number="4",selezione="mw") text_style "codmedcond_button_text"
if selezione == "nu":
if nu1_hired == True:
textbutton "{b}[NU1_name]" action Show("courses", who="nu",number="1",selezione="nu") text_style "codmedcond_button_text"
if nu2_hired == True:
textbutton "{b}[NU2_name]" action Show("courses", who="nu",number="2",selezione="nu") text_style "codmedcond_button_text"
if nu3_hired == True:
textbutton "{b}[NU3_name]" action Show("courses", who="nu",number="3",selezione="nu") text_style "codmedcond_button_text"
if nu1_hired == True or nu2_hired == True or nu3_hired == True:
textbutton "Every Nurse" action Show("courses", who="nu",number="4",selezione="nu") text_style "codmedcond_button_text"
if selezione == "ch":
if ch1_hired == True:
textbutton "{b}[CH1_name]" action Show("courses", who="ch",number="1",selezione="ch") text_style "codmedcond_button_text"
if ch2_hired == True:
textbutton "{b}[CH2_name]" action Show("courses", who="ch",number="2",selezione="ch") text_style "codmedcond_button_text"
if ch3_hired == True:
textbutton "{b}[CH3_name]" action Show("courses", who="ch",number="3",selezione="ch") text_style "codmedcond_button_text"
if ch1_hired == True or ch2_hired == True or ch3_hired == True:
textbutton "Every Chief of Staff" action Show("courses", who="ch",number="4",selezione="ch") text_style "codmedcond_button_text"
if selezione == "te":
if te1_hired == True:
textbutton "{b}[TE1_name]" action Show("courses", who="te",number="1",selezione="te") text_style "codmedcond_button_text"
if te2_hired == True:
textbutton "{b}[TE2_name]" action Show("courses", who="te",number="2",selezione="te") text_style "codmedcond_button_text"
if te3_hired == True:
textbutton "{b}[TE3_name]" action Show("courses", who="te",number="3",selezione="te") text_style "codmedcond_button_text"
if te1_hired == True or te2_hired == True or te3_hired == True:
textbutton "Every Technician" action Show("courses", who="te",number="4",selezione="te") text_style "codmedcond_button_text"
if selezione == "ad":
if ad1_hired == True:
textbutton "{b}[AD1_name]" action Show("courses", who="ad",number="1",selezione="ad") text_style "codmedcond_button_text"
if ad2_hired == True:
textbutton "{b}[AD2_name]" action Show("courses", who="ad",number="2",selezione="ad") text_style "codmedcond_button_text"
if ad3_hired == True:
textbutton "{b}[AD3_name]" action Show("courses", who="ad",number="3",selezione="ad") text_style "codmedcond_button_text"
if ad1_hired == True or ad2_hired == True or ad3_hired == True:
textbutton "Every Administrative Personnel" action Show("courses", who="ad",number="4",selezione="ad") text_style "codmedcond_button_text"
vbar value YScrollValue("my_scrollbar")
transclude
screen courses(who,number,selezione):
use reftrai
use reftrai_selection(selezione)
frame:
side ("c r"):
area (770, 69, 502, 497)
viewport id "my_scrollbar":
draggable True mousewheel True
vbox:
xpos 0.52
ypos 0.35
xmaximum 300
imagebutton auto "ui/reftrai_knowledge_%s.jpg" xpos 1 ypos 1 action ui.ChoiceJump("city_pool", "city_pool", location=None, block_all=None) focus_mask True hovered Show("gui_pool") unhovered [Hide("gui_pool")]