Class: UI::Bar
- Defined in:
- docs/01450_Systems_00000_General_00100_UI_Generics.rb
Overview
Class that display a bar on screen using the whole texture to display the bar component
Instance Attribute Summary collapse
-
#data_source
Return the data source to get the rate info through data=.
-
#rate ⇒ Numeric
Returns the rate of the bar.
Instance Method Summary collapse
-
#data=(data)
Change the data value (for SpriteStack usage).
-
#dispose
Dispose the bar.
-
#initialize(viewport, x, y, bmp, bw, bh, bx, by, nb_states, background_width = nil) ⇒ Bar
constructor
Create a new bar.
-
#set_position(x, y)
Change the position of the bar.
-
#visible ⇒ Boolean
Returns the visible state of the bar.
-
#visible=(value)
Change the visible state of the bar.
-
#x ⇒ Integer
Returns the x position of the bar.
-
#x=(value)
Change the x position of the bar.
-
#y ⇒ Integer
Returns the y position of the bar.
-
#y=(value)
Change the y position of the bar.
-
#z ⇒ Integer
Returns the z position of the bar.
-
#z=(value)
Change the z position of the bar.
Constructor Details
#initialize(viewport, x, y, bmp, bw, bh, bx, by, nb_states, background_width = nil) ⇒ Bar
Create a new bar
319 320 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 319 def initialize(, x, y, bmp, bw, bh, bx, by, nb_states, background_width = nil) end |
Instance Attribute Details
#data_source
Return the data source to get the rate info through data=
307 308 309 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 307 def data_source @data_source end |
#rate ⇒ Numeric
Returns the rate of the bar
305 306 307 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 305 def rate @rate end |
Instance Method Details
#data=(data)
Change the data value (for SpriteStack usage)
367 368 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 367 def data=(data) end |
#dispose
Dispose the bar
363 364 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 363 def dispose end |
#set_position(x, y)
Change the position of the bar
352 353 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 352 def set_position(x, y) end |
#visible ⇒ Boolean
Returns the visible state of the bar
331 332 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 331 def visible end |
#visible=(value)
Change the visible state of the bar
327 328 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 327 def visible=(value) end |
#x ⇒ Integer
Returns the x position of the bar
335 336 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 335 def x end |
#x=(value)
Change the x position of the bar
343 344 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 343 def x=(value) end |
#y ⇒ Integer
Returns the y position of the bar
339 340 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 339 def y end |
#y=(value)
Change the y position of the bar
347 348 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 347 def y=(value) end |
#z ⇒ Integer
Returns the z position of the bar
356 357 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 356 def z end |
#z=(value)
Change the z position of the bar
360 361 |
# File 'docs/01450_Systems_00000_General_00100_UI_Generics.rb', line 360 def z=(value) end |