Class: GGLib::Label
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Attributes inherited from Widget
#buttonId, #defimage, #id, #name, #sleeping, #theme, #window, #zfocus
Attributes inherited from Tile
#id, #inclusive, #x1, #x2, #y1, #y2
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize(name, text, x, y, theme = Themes::blank) ⇒ Label
constructor
A new instance of Label.
Methods inherited from Widget
#blur, #button, #clicked?, #del, #event, #feedText, #focus, #hasFocus?, #hasStickyFocus?, #intDraw, #onClick, #onDelete, #onDrag, #onInitialize, #onKeyPress, #onMouseOut, #onMouseOver, #onRightClick, #onRightDrag, #onStickyBlur, #onStickyFocus, #over?, #sleep, #sleeping?, #stickFocus, #unstickFocus, #wakeUp
Methods inherited from Tile
#centerOn, #del, deleteAllInstances, deleteById, #each, #eachBorder, getAllInstances, getById, #height, #iTile, #intersect?, intersect?, #isInTile?, #move, setAllInstances, #setCoordinates, #setTile, #width, #xTile
Constructor Details
#initialize(name, text, x, y, theme = Themes::blank) ⇒ Label
Returns a new instance of Label.
340 341 342 343 |
# File 'lib/ext/widgets.rb', line 340 def initialize(name, text, x, y, theme = Themes::blank) @text = text super(name,x,y,x+100,y+30,theme) end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
339 340 341 |
# File 'lib/ext/widgets.rb', line 339 def text @text end |
Instance Method Details
#draw ⇒ Object
344 345 346 |
# File 'lib/ext/widgets.rb', line 344 def draw @theme.font.default.draw(@text, x, y, ZOrder::Text, 1, 1, @theme.font.color) end |