Method: Core::GUI::Textfield#initialize

Defined in:
lib/gui/textfield.rb

#initialize(x, y, w, h, txt = "", size = 20, align = :left, fixed = true, maxw = w) ⇒ Textfield

Returns a new instance of Textfield.



8
9
10
11
12
13
14
15
16
# File 'lib/gui/textfield.rb', line 8

def initialize(x, y, w, h, txt="", size=20, align=:left, fixed=true, maxw=w)
  super(x, y, w, h)
  @bg = Core.sprite("gui/container_background")
  @font = Core.font(Core::DEFAULT_FONT, size)
  @align = align
  @fixed = fixed
  @max_width = maxw
  set_text(txt)
end