The final concept is that outlined text displaying the current health moves in from the top, updates (decreases or increases and reflects that in a number change) then moves out back to the top.
A quick mockup of the text style with outline: http://prntscr.com/7clkzv
This would currently display the text in the default font and default colour. It would then move out at the appropriate time with the 'hide text' and 'with moveouttop' functions
Code: Select all
show text "Health":
xalign 0.1 yalign 0.1
with moveintop
Code: Select all
# defined the style before label start:
style healthui is text:
color '000000'
font 'osaka.ttf'
outlines [(20, "FFFFFF", 1, 1)] # this value is not final, just trying to see some results
Code: Select all
show text "{=healthui}Health{/=healthui}": # Edit to code adding in tags
xalign 0.1 yalign 0.1
with moveintop
Another method I had tried was using a character with a predefined style, the issue with this is that I couldn't get the animation (moveintop) to apply to text that a character says:
Code: Select all
#Mockup
health_ui "Health"
with moveintop # <- doesn't work, and I didn't expect it to
Code: Select all
def health_tag(tag, argument, contents):
return [
(renpy.TEXT_TAG, u"font={}".format('osaka.ttf')),
] + contents + [
(renpy.TEXT_TAG, u"/font"),
]
config.custom_text_tags["health"] = health_tag


