Class: Yuki::ChoiceWindow
- Inherits:
-
Window
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Window
- Window
- Yuki::ChoiceWindow
- Defined in:
- docs/4_Systems_000_General_4_UI_Generics.rb
Overview
Display a choice Window
Direct Known Subclasses
Defined Under Namespace
Classes: But
Constant Summary collapse
- CursorSkin =
Name of the cursor in Graphics/Windowskins/
'Cursor'
- WINDOW_SKIN =
Name of the windowskin in Graphics/Windowskins/
'Message'
- MaxChoice =
Number of choice shown until a relative display is generated
9
- DeltaChoice =
Index that tells the system to scroll up or down everychoice (relative display)
(MaxChoice / 2.0).round
Instance Attribute Summary collapse
-
#colors ⇒ Array<Integer>
Array of choice colors.
-
#index ⇒ Integer
Current choix (0~choice_max-1).
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
-
.generate_for_message(window) ⇒ ChoiceWindow
Function that creates a new ChoiceWindow for the message system.
Instance Method Summary collapse
-
#add_choice_text(text, i) ⇒ Integer
Function that adds a choice text and manage various thing like getting the actual width of the text.
-
#build_window
Build the window : update the height of the window and draw the options.
-
#current_layout ⇒ Configs::Project::Texts::ChoiceConfig
Retrieve the current layout configuration.
-
#current_window_builder ⇒ Array
Retrieve the current window_builder.
-
#current_windowskin ⇒ String
Retrieve the current windowskin.
-
#default_color ⇒ Integer
(also: #get_default_color)
Return the default text color.
-
#default_horizontal_margin ⇒ Integer
Return the default horizontal margin.
-
#default_line_height ⇒ Integer
Return the default height of a text line.
-
#default_vertical_margin ⇒ Integer
Return the default vertical margin.
-
#define_cursor_rect
Define the cursor rect.
-
#disable_color ⇒ Integer
(also: #get_disable_color)
Return the disable text color.
-
#initialize(width, choices, viewport = nil) ⇒ ChoiceWindow
constructor
Create a new ChoiceWindow with the right parameters.
-
#refresh
Draw the options.
-
#translate_color(color) ⇒ Integer
Translate the color according to the layout configuration.
-
#update
Update the choice, if player hit up or down the choice index changes.
-
#update_cursor_down
Update the choice display when player hit DOWN.
-
#update_cursor_up
Update the choice display when player hit UP.
-
#update_mouse
Update the mouse action.
-
#validated? ⇒ Boolean
Tells the choice is done.
-
#window_builder=(builder)
Change the window builder and rebuild the window.
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
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(width, choices, viewport = nil) ⇒ ChoiceWindow
Create a new ChoiceWindow with the right parameters
1046 1047 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1046 def initialize(width, choices, = nil) end |
Instance Attribute Details
#colors ⇒ Array<Integer>
Array of choice colors
1030 1031 1032 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1030 def colors @colors end |
#index ⇒ Integer
Current choix (0~choice_max-1)
1033 1034 1035 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1033 def index @index end |
Class Method Details
.generate_for_message(window) ⇒ ChoiceWindow
Function that creates a new ChoiceWindow for the message system
1125 1126 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1125 def self.(window) end |
Instance Method Details
#add_choice_text(text, i) ⇒ Integer
Function that adds a choice text and manage various thing like getting the actual width of the text
1097 1098 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1097 def add_choice_text(text, i) end |
#build_window
Build the window : update the height of the window and draw the options
1088 1089 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1088 def build_window end |
#current_layout ⇒ Configs::Project::Texts::ChoiceConfig
Retrieve the current layout configuration
1050 1051 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1050 def current_layout end |
#current_window_builder ⇒ Array
Retrieve the current window_builder
1120 1121 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1120 def current_window_builder end |
#current_windowskin ⇒ String
Retrieve the current windowskin
1116 1117 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1116 def current_windowskin end |
#default_color ⇒ Integer Also known as: get_default_color
Return the default text color
1066 1067 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1066 def default_color end |
#default_horizontal_margin ⇒ Integer
Return the default horizontal margin
1108 1109 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1108 def default_horizontal_margin end |
#default_line_height ⇒ Integer
Return the default height of a text line
1062 1063 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1062 def default_line_height end |
#default_vertical_margin ⇒ Integer
Return the default vertical margin
1112 1113 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1112 def default_vertical_margin end |
#define_cursor_rect
Define the cursor rect
1100 1101 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1100 def define_cursor_rect end |
#disable_color ⇒ Integer Also known as: get_disable_color
Return the disable text color
1071 1072 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1071 def disable_color end |
#refresh
Draw the options
1091 1092 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1091 def refresh end |
#translate_color(color) ⇒ Integer
Translate the color according to the layout configuration
1058 1059 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1058 def translate_color(color) end |
#update
Update the choice, if player hit up or down the choice index changes
1053 1054 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1053 def update end |
#update_cursor_down
Update the choice display when player hit DOWN
1081 1082 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1081 def update_cursor_down end |
#update_cursor_up
Update the choice display when player hit UP
1078 1079 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1078 def update_cursor_up end |
#update_mouse
Update the mouse action
1075 1076 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1075 def update_mouse end |
#validated? ⇒ Boolean
Tells the choice is done
1104 1105 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1104 def validated? end |
#window_builder=(builder)
Change the window builder and rebuild the window
1085 1086 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1085 def window_builder=(builder) end |