Class: LUIT::ScannerInput
- Inherits:
-
Object
- Object
- LUIT::ScannerInput
- Defined in:
- lib/luit.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#scanning ⇒ Object
readonly
Returns the value of attribute scanning.
Instance Method Summary collapse
-
#initialize(holder, id) ⇒ ScannerInput
constructor
A new instance of ScannerInput.
- #scan ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(holder, id) ⇒ ScannerInput
Returns a new instance of ScannerInput.
169 170 171 172 173 174 |
# File 'lib/luit.rb', line 169 def initialize(holder, id) @field = Gosu::TextInput.new @window = LUIT.window @holder = holder @id = id end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
168 169 170 |
# File 'lib/luit.rb', line 168 def field @field end |
#scanning ⇒ Object (readonly)
Returns the value of attribute scanning.
168 169 170 |
# File 'lib/luit.rb', line 168 def scanning @scanning end |
Instance Method Details
#scan ⇒ Object
181 182 183 184 |
# File 'lib/luit.rb', line 181 def scan @scaning = true @window.text_input = @field end |
#stop ⇒ Object
176 177 178 179 |
# File 'lib/luit.rb', line 176 def stop @scaning = false @window.text_input = nil if @window.text_input == @field end |