Skip to reading
The Sock Exchange, Part 6: Closing Time

Make the menu buttons work

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations

GUI DESIGNER + SETTINGS / SYSTEM MENUS

A button can start a new game, save, or resume by calling a built-in action. Give each button its action first. Then tell PCA which screen is your title and which one is your pause menu.

Select New Game, open Element Properties › Events, and  The pause menu in GUI Designer. A two-column layout puts
find Click.                                        all four actions within easy reach.

1. In closing_title, select a button on the canvas. Open Events › Click and pick its action from the table. Leave Click Target empty for these system actions. Repeat for the other three, then save.

Source table from Make the menu buttons work, page 7
Title buttonClick actionPause buttonClick action
New Gamesystem-new-gameResumesystem-resume
Load Gamesystem-loadSave Gamesystem-save
Optionssystem-optionsOptionssystem-options
Quitsystem-quitMain Menusystem-main-menu

2. Add a second GUI, Break room menu, ID break_room. Use the same activation, size, Z, panel, and heading position as the title. Give the heading the text On a break. Place four 500 × 68 buttons at X 84 and 626, Y 250 and 359. Assign the pause actions above in reading order.

3. Open Settings › System GUIs. Set Main Menu to Closing time title and Pause Menu to Break room menu. Keep your Part 5 Main HUD. Leave Options Screen, Save Screen, and Load Screen at Built-in Default. In Settings › Screen Overlay, enable Show Main Menu on Start. Apply and save.

Try it. Use Play / Restart. Choose New Game, open the pause menu with your game’s menu key (usually Esc), choose Save Game, save to a spare slot, and Resume. Then return to the title and load that slot. Bea should be back where you left her.

Page 7 of 19Permalink
Go to page

Continue your 2D adventure

  1. Part 1The Sock Exchange, Part 1: Your First 2D Adventure
  2. Part 2The Sock Exchange, Part 2: The Missing Laundry
  3. Part 3The Sock Exchange, Part 3: The Dryer Conspiracy
  4. Part 4The Sock Exchange, Part 4: Trouble After Closing
  5. Part 5The Sock Exchange, Part 5: The Midnight Pickup
  6. Part 6The Sock Exchange, Part 6: Closing Time