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?, #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
298 299 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 298 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
318 319 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 318 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
323 324 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 323 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
332 333 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 332 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
328 329 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 328 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
347 348 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 347 def load_cursor end |
#push(x, y, bmp, *args, rect: nil, type: Sprite, ox: 0, oy: 0)
Push a sprite to the window
336 337 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 336 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
344 345 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 344 def sprite_stack end |
#stack ⇒ Array
Return the stack of the window if any
340 341 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 340 def stack end |