Download
If you are interested, you can download the latest environment from the link in the Avalanches-Release2.x.y.y.zip in Assets from the release tag of the following site (Avalanches release version 2.x.y.y).
https://github.com/halo1234/Avalanches/releases
Save/Load
In GOKI2, the ModSaveLoad module implements the save/load screen.
First, load the module.
; Save/Load Screen
@load_module name=ModSaveLoad
Now, the save/load screen can be used.
Save/Load Screen Layout
We will arrange the UI for the save/load screen, but first, define the area where the UI will be placed.
@save_load_option client_left=10 client_top=10 client_width=780 client_height=580
This sets the UI placement area from (10, 10) to (780, 580).
Next, set the size of a record.
One record corresponds to one save data.
@save_load record_width=780 record_height=140
Now, the record is defined.
Next, we will continue to place the UI within the record.
@save_load index_left=10 index_top=60
@save_load date_left=180 date_top=10
@save_load summary_left=180 summary_top=30
From top to bottom, this specifies the positions of the index, date, and summary. The summary displays the last shown text (more precisely, the content output to the message layer). If nothing is set here, nothing will be displayed for the records.
Finally, you define the thumbnail. (You don’t have to specify it if unnecessary.) You can specify the position and size, as well as the background color when blank.
@save_load thumbnail_left=30 thumbnail_top=0 thumbnail_width=150 thumbnail_height=120 thumbnail_color=0xFF0000
With this, the save/load screen is complete.
System Buttons The system buttons familiar from ADV games are implemented with ModSystemButtons. First, load the module.
goki2:/src/goki2/system/construct.gs ; System Buttons @load_module name=ModSystemButtons
Now the system buttons can be used. ### Placing System Buttons Next, place the system buttons on the screen.
; System Buttons
@system_button log_left=10 log_top=390 log_width=60 log_height=20 log_caption=History
@system_button skip_left=80 skip_top=390 skip_width=60 skip_height=20 skip_caption=Skip
@system_button auto_left=150 auto_top=390 auto_width=60 auto_height=20 auto_caption=Auto
@system_button hidden_left=220 hidden_top=390 hidden_width=60 hidden_height=20 hidden_caption=Erase
@system_button system_left=290 system_top=390 system_width=60 system_height=20 system_caption=System
@system_button save_left=360 save_top=390 save_width=60 save_height=20 save_caption=Save
@system_button load_left=430 load_top=390 load_width=60 load_height=20 load_caption=Load
@system_button qsave_left=500 qsave_top=390 qsave_width=60 qsave_height=20 qsave_caption=Quick Save
@system_button qload_left=570 qload_top=390 qload_width=60 qload_height=20 qload_caption=Quick Load
For now, let's take a look at the definition of the "History" button.
First, specify the button's position with log_left=10 log_top=390.
Next, specify the button's size with log_width=60 log_height=20.
Specifying the size is not necessary if you use an image for the button.
Finally, specify the caption with log_caption=履歴.
With this, the History button has been defined.
Other buttons are defined in the same way, specifying their position, size, and caption.
For the available buttons, please refer to the manual (/doc/goki2/index.html).
Displaying the System Buttons
Finally, display the system buttons defined with the following tag:
@system_button_option visible
To hide them, execute the following tag:
@system_button_option !visible
Top comments (0)