Module: LUIT
- Defined in:
- lib/luit.rb
Defined Under Namespace
Classes: Button, ClickArea, ClickPoint, Icon, LUITElement, List, ScannerInput, Slider, TextArea, Toggle, VerticalSlider
Class Attribute Summary collapse
-
.touchDown ⇒ Object
Returns the value of attribute touchDown.
-
.uiColor ⇒ Object
Returns the value of attribute uiColor.
-
.uiColorLight ⇒ Object
Returns the value of attribute uiColorLight.
-
.window ⇒ Object
readonly
Returns the value of attribute window.
-
.z ⇒ Object
readonly
Returns the value of attribute z.
Class Method Summary collapse
- .config(window:, uiColor: 0xff_555555, uiColorLight: 0xff_888888, z: 100) ⇒ Object
- .mX ⇒ Object
- .mY ⇒ Object
- .to_roman(number) ⇒ Object
-
.updateTouch ⇒ Object
Raspberry pi touchscreen hack.
Class Attribute Details
.touchDown ⇒ Object
Returns the value of attribute touchDown.
13 14 15 |
# File 'lib/luit.rb', line 13 def touchDown @touchDown end |
.uiColor ⇒ Object
Returns the value of attribute uiColor.
13 14 15 |
# File 'lib/luit.rb', line 13 def uiColor @uiColor end |
.uiColorLight ⇒ Object
Returns the value of attribute uiColorLight.
13 14 15 |
# File 'lib/luit.rb', line 13 def uiColorLight @uiColorLight end |
.window ⇒ Object (readonly)
Returns the value of attribute window.
14 15 16 |
# File 'lib/luit.rb', line 14 def window @window end |
.z ⇒ Object (readonly)
Returns the value of attribute z.
14 15 16 |
# File 'lib/luit.rb', line 14 def z @z end |
Class Method Details
.config(window:, uiColor: 0xff_555555, uiColorLight: 0xff_888888, z: 100) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/luit.rb', line 17 def self.config(window:, uiColor: 0xff_555555, uiColorLight: 0xff_888888, z: 100) @window = window @uiColor = uiColor @uiColorLight = uiColorLight @z = z @touchDown = false end |
.mX ⇒ Object
25 26 27 |
# File 'lib/luit.rb', line 25 def self.mX @window.mouse_x end |
.mY ⇒ Object
29 30 31 |
# File 'lib/luit.rb', line 29 def self.mY @window.mouse_y end |
.to_roman(number) ⇒ Object
401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/luit.rb', line 401 def self.to_roman(number) return '0' if number == 0 romanized = '' for index in 0...@decimalValue.length do while @decimalValue[index] <= number do romanized += @romanNumeral[index] number -= @decimalValue[index] end end return romanized end |
.updateTouch ⇒ Object
Raspberry pi touchscreen hack
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/luit.rb', line 34 def self.updateTouch() if @touchDown @window.mouse_x = 0 @window.mouse_y = 0 @touchDown = false else if @window.mouse_x != 0 or @window.mouse_y != 0 @touchDown = true end end end |