mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-22 22:36:03 +00:00
Anim Editor: added dark colour scheme
This commit is contained in:
@@ -59,12 +59,13 @@ class UIControls::TextBoxDropdownList < UIControls::TextBox
|
||||
@dropdown_menu_bg.x = self.x + @text_box_rect.x
|
||||
@dropdown_menu_bg.y = self.y + @text_box_rect.y + @text_box_rect.height
|
||||
@dropdown_menu_bg.z = self.z + 1
|
||||
@dropdown_menu_bg.bitmap.fill_rect(0, 0, @dropdown_menu_bg.width, @dropdown_menu_bg.height, Color.white)
|
||||
@dropdown_menu_bg.bitmap.fill_rect(0, 0, @dropdown_menu_bg.width, @dropdown_menu_bg.height, background_color)
|
||||
# Create menu
|
||||
@dropdown_menu = UIControls::List.new(@text_box_rect.width + @button_rect.width, menu_height, self.viewport, @options)
|
||||
@dropdown_menu.x = @dropdown_menu_bg.x
|
||||
@dropdown_menu.y = @dropdown_menu_bg.y
|
||||
@dropdown_menu.z = self.z + 2
|
||||
@dropdown_menu.color_scheme = @color_scheme
|
||||
@dropdown_menu.set_interactive_rects
|
||||
@dropdown_menu.repaint
|
||||
end
|
||||
@@ -83,10 +84,10 @@ class UIControls::TextBoxDropdownList < UIControls::TextBox
|
||||
def draw_area_highlight
|
||||
highlight_color = nil
|
||||
if @captured_area == :text_box && !@hover_area && Input.press?(Input::MOUSELEFT)
|
||||
highlight_color = CAPTURE_COLOR
|
||||
highlight_color = capture_color
|
||||
elsif !@captured_area && [:text_box, :button].include?(@hover_area)
|
||||
# Draw mouse hover over area highlight
|
||||
highlight_color = HOVER_COLOR
|
||||
highlight_color = hover_color
|
||||
end
|
||||
return if !highlight_color
|
||||
[:text_box, :button].each do |area|
|
||||
@@ -102,21 +103,22 @@ class UIControls::TextBoxDropdownList < UIControls::TextBox
|
||||
if disabled?
|
||||
self.bitmap.fill_rect(@button_rect.x, @button_rect.y,
|
||||
@button_rect.width, @button_rect.height,
|
||||
DISABLED_COLOR)
|
||||
disabled_fill_color)
|
||||
end
|
||||
# Draw button outline
|
||||
self.bitmap.outline_rect(@button_rect.x, @button_rect.y,
|
||||
@button_rect.width, @button_rect.height,
|
||||
self.bitmap.font.color)
|
||||
line_color)
|
||||
# Draw down arrow
|
||||
arrow_area_x = @button_rect.x + @button_rect.width - @button_rect.height + 1
|
||||
arrow_area_width = @button_rect.height - 2
|
||||
arrow_color = (disabled?) ? disabled_text_color : text_color
|
||||
# self.bitmap.fill_rect(arrow_area_x, @button_rect.y + 1, arrow_area_width, arrow_area_width,
|
||||
# (@hover_area && @captured_area != :button) ? HOVER_COLOR : Color.white)
|
||||
# (@hover_area && @captured_area != :button) ? hover_color : background_color)
|
||||
6.times do |i|
|
||||
self.bitmap.fill_rect(arrow_area_x + (arrow_area_width / 2) - 5 + i,
|
||||
@button_rect.y + (arrow_area_width / 2) - 1 + i,
|
||||
11 - (2 * i), 1, (disabled?) ? DISABLED_COLOR_DARK : self.bitmap.font.color)
|
||||
11 - (2 * i), 1, arrow_color)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user