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