Author Topic: MODULE : Display-based GUIs  (Read 334 times)

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
MODULE : Display-based GUIs
« on: 13 Oct 2017, 19:21 »
This module lets you display an interactive GUI relying on the "Display" AGS built-in function rather than a regular function.

In a nutshell:
- it transforms any "Display" popup into an interactive popup
- it has the wams "flow" as the Display function (or Wait(1)): it blocks the game but still lets repeatedly_execute_always run once after each time it's called.
- you may have 3 types of controls : Labels, Buttons, TextBoxes
- it's based on text (because of the "Display" function) but you can still use pixel-perfect positioning of controls (horizontally, not vertically)
- you may use the keyboard left/right/up/down keys (to select the button or textbox), use "return" to validate your choice, or "escape" to close, etc.
- you may use the mouse to click on the buttons or textboxes

More generally, it's a basic toolbox that could become handy for anyone wishing to implement a GUI based on text, independently from the AGS context.

As a demo I implemented a Yes/No popup but you can also implement easily a popup window that prompts the user to enter text into an interactive textbox (moving cursor, backslash, "del" key, etc.).