Class: UI::Bar
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
371 372 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 371 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=
359 360 361 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 359 def data_source @data_source end |
#rate ⇒ Numeric
Returns the rate of the bar
357 358 359 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 357 def rate @rate end |
Instance Method Details
#data=(data)
Change the data value (for SpriteStack usage)
419 420 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 419 def data=(data) end |
#dispose
Dispose the bar
415 416 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 415 def dispose end |
#set_position(x, y)
Change the position of the bar
404 405 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 404 def set_position(x, y) end |
#visible ⇒ Boolean
Returns the visible state of the bar
383 384 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 383 def visible end |
#visible=(value)
Change the visible state of the bar
379 380 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 379 def visible=(value) end |
#x ⇒ Integer
Returns the x position of the bar
387 388 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 387 def x end |
#x=(value)
Change the x position of the bar
395 396 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 395 def x=(value) end |
#y ⇒ Integer
Returns the y position of the bar
391 392 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 391 def y end |
#y=(value)
Change the y position of the bar
399 400 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 399 def y=(value) end |
#z ⇒ Integer
Returns the z position of the bar
408 409 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 408 def z end |
#z=(value)
Change the z position of the bar
412 413 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 412 def z=(value) end |