Class: UI::Window
Overview
Window utility allowing to make Window easilly
Direct Known Subclasses
Constant Summary collapse
- DEFAULT_SKIN =
Default window skin
'message'
Instance Attribute Summary
Attributes inherited from LiteRGSS::Window
#__index__, #active, #back_opacity, #contents_opacity, #cursor_rect, #cursorskin, #height, #opacity, #ox, #oy, #pause, #pause_x, #pause_y, #pauseskin, #stretch, #viewport, #visible, #width, #window_builder, #windowskin, #x, #y, #z
Class Method Summary collapse
-
.from_metrics(viewport, x, y, width, height, skin: DEFAULT_SKIN, position: 'top_left')
Create a new window from given metrics.
-
.window_builder(skin) ⇒ Array<Integer>
Get the Window Builder according to the skin.
Instance Method Summary collapse
-
#add_line(line_index, str, align = 0, outlinesize = Text::Util::DEFAULT_OUTLINE_SIZE, type: Text, color: nil, dx: 0)
Add a text line to the window.
-
#add_text(x, y, width, height, str, align = 0, outlinesize = Text::Util::DEFAULT_OUTLINE_SIZE, type: Text, color: 0)
Add a text to the window.
-
#initialize(viewport, x = 2, y = 2, width = 316, height = 48, skin: DEFAULT_SKIN) ⇒ Window
constructor
Create a new Window.
-
#load_cursor
Load the cursor.
-
#push(x, y, bmp, *args, rect: nil, type: Sprite, ox: 0, oy: 0)
Push a sprite to the window.
-
#sprite_stack ⇒ SpriteStack
Return the sprite stack used by the window.
-
#stack ⇒ Array
Return the stack of the window if any.
Methods inherited from Window
#simple_mouse_in?, #translate_mouse_coords
Methods inherited from LiteRGSS::Window
#lock, #locked?, new, #set_origin, #set_position, #set_size, #unlock, #update
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(viewport, x = 2, y = 2, width = 316, height = 48, skin: DEFAULT_SKIN) ⇒ Window
Create a new Window
295 296 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 295 def initialize(, x = 2, y = 2, width = 316, height = 48, skin: DEFAULT_SKIN) end |
Class Method Details
.from_metrics(viewport, x, y, width, height, skin: DEFAULT_SKIN, position: 'top_left')
Create a new window from given metrics
315 316 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 315 def from_metrics(, x, y, width, height, skin: DEFAULT_SKIN, position: 'top_left') end |
.window_builder(skin) ⇒ Array<Integer>
Get the Window Builder according to the skin
320 321 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 320 def window_builder(skin) end |
Instance Method Details
#add_line(line_index, str, align = 0, outlinesize = Text::Util::DEFAULT_OUTLINE_SIZE, type: Text, color: nil, dx: 0)
Add a text line to the window
329 330 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 329 def add_line(line_index, str, align = 0, outlinesize = Text::Util::DEFAULT_OUTLINE_SIZE, type: Text, color: nil, dx: 0) end |
#add_text(x, y, width, height, str, align = 0, outlinesize = Text::Util::DEFAULT_OUTLINE_SIZE, type: Text, color: 0)
Add a text to the window
325 326 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 325 def add_text(x, y, width, height, str, align = 0, outlinesize = Text::Util::DEFAULT_OUTLINE_SIZE, type: Text, color: 0) end |
#load_cursor
Load the cursor
344 345 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 344 def load_cursor end |
#push(x, y, bmp, *args, rect: nil, type: Sprite, ox: 0, oy: 0)
Push a sprite to the window
333 334 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 333 def push(x, y, bmp, *args, rect: nil, type: Sprite, ox: 0, oy: 0) end |
#sprite_stack ⇒ SpriteStack
Return the sprite stack used by the window
341 342 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 341 def sprite_stack end |
#stack ⇒ Array
Return the stack of the window if any
337 338 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 337 def stack end |