mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Rearranged and renamed Animation Editor-related script files
This commit is contained in:
24
Data/Scripts/801_UI controls/Control elements/002_Label.rb
Normal file
24
Data/Scripts/801_UI controls/Control elements/002_Label.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class UIControls::Label < UIControls::BaseControl
|
||||
attr_reader :label
|
||||
|
||||
LABEL_END_X = 80
|
||||
TEXT_OFFSET_Y = 5
|
||||
|
||||
def initialize(width, height, viewport, label)
|
||||
super(width, height, viewport)
|
||||
@label = label
|
||||
end
|
||||
|
||||
def label=(value)
|
||||
@label = value
|
||||
refresh
|
||||
end
|
||||
|
||||
def refresh
|
||||
super
|
||||
draw_text(self.bitmap, 4, TEXT_OFFSET_Y, @label)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user