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
374 375 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 374 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=
362 363 364 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 362 def data_source @data_source end |
#rate ⇒ Numeric
Returns the rate of the bar
360 361 362 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 360 def rate @rate end |
Instance Method Details
#data=(data)
Change the data value (for SpriteStack usage)
422 423 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 422 def data=(data) end |
#dispose
Dispose the bar
418 419 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 418 def dispose end |
#set_position(x, y)
Change the position of the bar
407 408 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 407 def set_position(x, y) end |
#visible ⇒ Boolean
Returns the visible state of the bar
386 387 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 386 def visible end |
#visible=(value)
Change the visible state of the bar
382 383 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 382 def visible=(value) end |
#x ⇒ Integer
Returns the x position of the bar
390 391 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 390 def x end |
#x=(value)
Change the x position of the bar
398 399 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 398 def x=(value) end |
#y ⇒ Integer
Returns the y position of the bar
394 395 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 394 def y end |
#y=(value)
Change the y position of the bar
402 403 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 402 def y=(value) end |
#z ⇒ Integer
Returns the z position of the bar
411 412 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 411 def z end |
#z=(value)
Change the z position of the bar
415 416 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 415 def z=(value) end |