parent
993b5c845a
commit
3a77f89fab
@ -5,17 +5,11 @@ init python:
|
||||
else:
|
||||
return str(round(points/1000.0, 1))+"{size=-2}k{/size}"
|
||||
|
||||
default toggle_menu = False
|
||||
|
||||
label update_ui_points:
|
||||
# Debug
|
||||
|
||||
# Temp variables
|
||||
$ toggle_points = False
|
||||
$ toggle_menu = False
|
||||
|
||||
# Outline settings
|
||||
#TODO Refactor interface_color dependent styles to definitions
|
||||
$ points_outline = [ (1, "#000", 0, 0) ]
|
||||
|
||||
#If points variable value exceedes one thousand make it a decimal number instead and round to x.x
|
||||
#Remember, "slytherin_points" is a string! If you need points integer use i.e. "slytherin" variable instead.
|
||||
$ slytherin_points = text_points(slytherin)
|
||||
@ -118,6 +112,8 @@ screen ui_top_bar():
|
||||
screen ui_points():
|
||||
tag ui
|
||||
|
||||
default toggle_points = False
|
||||
|
||||
fixed:
|
||||
xalign 0.5
|
||||
xsize 162
|
||||
@ -136,24 +132,34 @@ screen ui_points():
|
||||
add "interface/topbar/ravenclaw_empty.webp" yanchor 0
|
||||
add "interface/topbar/hufflepuff_empty.webp" yanchor 0
|
||||
# Show points
|
||||
text "{size=-5}{color=#FFF}[slytherin_points]{/color}{/size}" outlines points_outline xpos 17 ypos 30 xanchor 0.5
|
||||
text "{size=-5}{color=#FFF}[gryffindor_points]{/color}{/size}" outlines points_outline xpos 58 ypos 30 xanchor 0.5
|
||||
text "{size=-5}{color=#FFF}[ravenclaw_points]{/color}{/size}" outlines points_outline xpos 98 ypos 30 xanchor 0.5
|
||||
text "{size=-5}{color=#FFF}[hufflepuff_points]{/color}{/size}" outlines points_outline xpos 139 ypos 30 xanchor 0.5
|
||||
text "{size=-5}[slytherin_points]{/size}" xpos 17 style "housepoints"
|
||||
text "{size=-5}[gryffindor_points]{/size}" xpos 58 style "housepoints"
|
||||
text "{size=-5}[ravenclaw_points]{/size}" xpos 98 style "housepoints"
|
||||
text "{size=-5}[hufflepuff_points]{/size}" xpos 139 style "housepoints"
|
||||
# Show placement number
|
||||
text "{size=16}{color=#FFF}[slytherin_place]{/color}{/size}" outlines points_outline xpos 17 ypos 10 xanchor 0.5
|
||||
text "{size=16}{color=#FFF}[gryffindor_place]{/color}{/size}" outlines points_outline xpos 58 ypos 10 xanchor 0.5
|
||||
text "{size=16}{color=#FFF}[ravenclaw_place]{/color}{/size}" outlines points_outline xpos 98 ypos 10 xanchor 0.5
|
||||
text "{size=16}{color=#FFF}[hufflepuff_place]{/color}{/size}" outlines points_outline xpos 139 ypos 10 xanchor 0.5
|
||||
text "[slytherin_place]" xpos 17 style "houseplaces"
|
||||
text "[gryffindor_place]" xpos 58 style "houseplaces"
|
||||
text "[ravenclaw_place]" xpos 98 style "houseplaces"
|
||||
text "[hufflepuff_place]" xpos 139 style "houseplaces"
|
||||
|
||||
if room_menu_active:
|
||||
imagebutton:
|
||||
idle "interface/topbar/hover_zone.webp"
|
||||
tooltip "House Points\n{size=-2}Click to toggle style display{/size}"
|
||||
hovered SetVariable("toggle_points", True)
|
||||
unhovered SetVariable("toggle_points", False)
|
||||
hovered SetLocalVariable("toggle_points", True)
|
||||
unhovered SetLocalVariable("toggle_points", False)
|
||||
action ToggleVariable("persistent.toggle_points", True, False)
|
||||
|
||||
style housepoints:
|
||||
outlines [(1, "#000", 0, 0)]
|
||||
color "#FFF"
|
||||
xanchor .5
|
||||
ypos 30
|
||||
|
||||
style houseplaces is housepoints:
|
||||
size 16
|
||||
ypos 10
|
||||
|
||||
screen ui_stats():
|
||||
tag ui
|
||||
fixed:
|
||||
|
Loading…
Reference in New Issue
Block a user