Class: GTS::Button
- Inherits:
-
UI::SpriteStack
- Object
- UI::SpriteStack
- GTS::Button
- Defined in:
- scripts/01450 Systems/09000 GTS/09000 GTS.rb
Overview
GTS Button, A Basic options button for our GTS System
Constant Summary
Constants inherited from UI::SpriteStack
UI::SpriteStack::NO_INITIAL_IMAGE
Instance Attribute Summary
Attributes inherited from UI::SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#initialize(viewport, x, y, name = '') ⇒ Button
constructor
A new instance of Button.
- #width
Methods inherited from UI::SpriteStack
#[], #add_background, #add_line, #add_text, #anime, #anime_delta_set, #dispose, #each, #execute_anime, #move, #move_to, #opacity, #opacity=, #push, #push_sprite, #set_origin, #set_position, #simple_mouse_in?, #size, #stop_animation, #translate_mouse_coords, #update, #update_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=
Constructor Details
#initialize(viewport, x, y, name = '') ⇒ Button
Returns a new instance of Button.
196 197 198 199 200 201 |
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 196 def initialize(, x, y, name = '') super(, x, y) bmp = push(0, 0, 'GTS/Options_bar').bitmap add_text(0, 1, bmp.width, 16, name, 1) self.x -= bmp.width / 2 end |
Instance Method Details
#width
203 204 205 |
# File 'scripts/01450 Systems/09000 GTS/09000 GTS.rb', line 203 def width @stack.first.width end |