Anim Editor: added changing of editor settings

This commit is contained in:
Maruno17
2024-04-21 00:53:01 +01:00
parent a80dd5adb2
commit 53eff70d63
6 changed files with 250 additions and 35 deletions

View File

@@ -107,13 +107,13 @@ class UIControls::BaseControl < BitmapSprite
#-----------------------------------------------------------------------------
def draw_text(this_bitmap, text_x, text_y, this_text)
text_size = this_bitmap.text_size(this_text)
this_bitmap.draw_text(text_x, text_y, text_size.width, text_size.height, this_text, 0)
text_size = this_bitmap.text_size(this_text.to_s)
this_bitmap.draw_text(text_x, text_y, text_size.width, text_size.height, this_text.to_s, 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)
text_size = this_bitmap.text_size(this_text.to_s)
this_bitmap.draw_text(text_x, text_y, wid, text_size.height, this_text.to_s, 1)
end
# Redraws the control only if it is invalid.

View File

@@ -155,7 +155,7 @@ class UIControls::List < UIControls::BaseControl
SELECTED_ROW_COLOR
)
end
txt = (val.is_a?(Array)) ? val[1] : val
txt = (val.is_a?(Array)) ? val[1] : val.to_s
text_color = TEXT_COLOR
if txt[/^\\c\[([0-9]+)\]/i]
text_colors = [