Implemented list control and basic animation-choosing screen for editor

This commit is contained in:
Maruno17
2023-08-31 23:03:47 +01:00
parent 1041883992
commit d4077875a4
7 changed files with 367 additions and 59 deletions

View File

@@ -85,6 +85,11 @@ class UIControls::BaseControl < BitmapSprite
this_bitmap.draw_text(text_x, text_y, text_size.width, text_size.height, this_text, 0)
end
def draw_text_centered(this_bitmap, text_x, text_y, wid, this_text)
text_size = this_bitmap.text_size(this_text)
this_bitmap.draw_text(text_x, text_y, wid, text_size.height, this_text, 1)
end
# Redraws the control only if it is invalid.
def repaint
return if !invalid?