Tidied up TODO comments, misc tweaks to Anim Editor

This commit is contained in:
Maruno17
2023-12-03 23:47:38 +00:00
parent b4e7b765d1
commit 2f231a25bb
203 changed files with 813 additions and 852 deletions

View File

@@ -4,9 +4,6 @@
class UIControls::Label < UIControls::BaseControl
attr_reader :text
LABEL_END_X = 80
TEXT_OFFSET_Y = 5
def initialize(width, height, viewport, text)
super(width, height, viewport)
@text = text
@@ -27,8 +24,10 @@ class UIControls::Label < UIControls::BaseControl
super
if @header
draw_text_centered(self.bitmap, 0, TEXT_OFFSET_Y, width, @text)
# Draw underline
text_size = self.bitmap.text_size(@text)
self.bitmap.fill_rect((width - text_size.width) / 2, TEXT_OFFSET_Y + text_size.height, text_size.width, 1, TEXT_COLOR)
self.bitmap.fill_rect((width - text_size.width) / 2, TEXT_OFFSET_Y + text_size.height,
text_size.width, 1, TEXT_COLOR)
else
draw_text(self.bitmap, 4, TEXT_OFFSET_Y, @text)
end