- Sep 26, 2018
- 3,130
- 3,194
I have trying to put a status bar that's you can't adjust but all I found is bars that you can adjust
I'm using this code here and I have already ask there
here is the code
I'm using this code here and I have already ask there
You must be registered to see the links
here is the code
Code:
init python:
#This controls when the love-points floater appears.
show_amber=False
show_arthur=False
show_shino=False
## ------------ Love Points Floater ----------------------
def stats_overlay():
# --- Amber's Love Bar -------
if show_amber:
ui.frame(
xalign = 0.5, #centered
ypos = 400,) #400 px Down from the Top
ui.vbox(xalign = 0.5)
ui.text ("Amber's Love Points: %d" %amber_love,
xalign = 0.5)
ui.bar(max_love, amber_love,
style="my_bar")
ui.close()
# --- Samber's Love Bar -------
if show_samber:
ui.frame(
xalign = 0.5,
ypos = 400,)
ui.vbox()
ui.text ("Samber's Love Points: %d" %samber_love,
xalign = 0.5)
ui.bar(max_love, samber_love,
style="my_bar")
ui.close()
# --- Mother's Love Bar -------
if show_mother:
ui.frame(
xalign = 0.5,
ypos = 400,)
ui.vbox()
ui.text ("Mother's Love Points: %d" %mother_love,
xalign = 0.5)
ui.bar(max_love, mother_love,
style="my_bar")
ui.close()
config.overlay_functions.append(stats_overlay)
init -2 python:
amber_love = 10
max_love = 300
samber_love = 10
max_love = 150
mother_love = 10
max_love = 150
init -5 python:
#custom bar
style.my_bar = Style(style.default)
style.my_bar.xalign = 0.5
style.my_bar.xmaximum = 315 # bar width
style.my_bar.ymaximum = 30 # bar height
style.my_bar.left_gutter = 5
style.my_bar.right_gutter = 5
# I have all my User Interface graphics stored in one file called ui.
# To access them in my code, I put ui/ in front of all images in that file.
style.my_bar.left_bar = Frame("gui/bar_full.png", 0, 0)
style.my_bar.right_bar = Frame("gui/bar_empty.png", 0, 0)
style.my_bar.hover_left_bar = Frame("gui/bar_hover.png", 0, 0)
style.my_bar.thumb = "gui/thumb.png"
style.my_bar.thumb_shadow = None
style.my_bar.thumb_offset = 5