What I try to do is to have my picture as a background for the HP bar. in my game but nothing happens. it only gives a standard ugly blu box insted of my image.
code is as following;
Code: Select all
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
style.my_bar.background = Frame("",10,10)
style.my_bar.left_bar = Frame("ui/bar_full.png", 0, 0)
style.my_bar.right_bar = Frame("ui/bar_empty.png", 0, 0)
style.my_bar.hover_left_bar = Frame("ui/bar_hover.png", 0, 0)
Code: Select all
if show_playerHP:
ui.frame(
xpos = 10, #centered
ypos = 10,) #10 px Down from the Top
ui.vbox(xalign = 0.5)
ui.text ("Player HP: %d" %HP,
xalign = 0.5)
ui.text ("Re rolls: %d" %re_roll,
xalign = 0.8)
ui.bar(max_HP, HP,
style="my_bar")
ui.close()
which makes me all kinds of sad... >_<
Is there perhaps someone who could help me past this silly stage? (explanations helps me not doing it again as well ^_^)