GUI, Inventory & Menu: Difference between revisions

m
*>SSH
m (→‎Getting that classical Sierra look for GUIs: tagged as needing update for 2.7)
Line 25: Line 25:


The answer to this question is indeed in the AGS manual ('''help file — "ags.chm"'''), under "'''Editing the GUIs'''". Here is an excerpt from the manual:
The answer to this question is indeed in the AGS manual ('''help file — "ags.chm"'''), under "'''Editing the GUIs'''". Here is an excerpt from the manual:
 
<blockquote>
  '''Interface text'''
'''Interface text'''<br><br>
  You can easily display static text on interfaces. For example, the Sierra-style
You can easily display static text on interfaces. For example, the Sierra-style interface displays the score in the status bar.<br>
  interface displays the score in the status bar.
To add text to a GUI, you add a label. Click the "Add label" button, then drag out a rectangle like you did when adding a button. You can change the text displayed in the label by editing the "Text" property. Notice that the text automatically wraps around to fit inside the rectangle you drew.<br>
  To add text to a GUI, you add a label. Click the "Add label" button, then drag out
As well as typing normal text into the label, you can add some special markers which allow the text to change during the game. The following tokens will be replaced with the relevant values in the game:<br>
  a rectangle like you did when adding a button. You can change the text displayed
   '''@GAMENAME@'''     The game's name, specified on the Game Settings pane<br>
  in the label by editing the "Text" property. Notice that the text automatically
   '''@OVERHOTSPOT@''' Name of the hotspot which the cursor is over<br>
  wraps around to fit inside the rectangle you drew.
   '''@SCORE@'''       The player's current score (number only)
  As well as typing normal text into the label, you can add some special markers which
   '''@SCORETEXT@'''   The text "Score: X of Y" with the relevant numbers filled in.<br>
  allow the text to change during the game. The following tokens will be replaced with
   '''@TOTALSCORE@'''   The maximum possible score, specified on the Game Settings pane<br>
  the relevant values in the game:
'''Example:''' You have @SCORE@ out of @TOTALSCORE@ possible points.<br><br>
   @GAMENAME@    The game's name, specified on the Game Settings pane
The Properties window also allows you to align the text to the left, right, or centre, as well as change its font and colour.</blockquote>
   @OVERHOTSPOT@  Name of the hotspot which the cursor is over
   @SCORE@        The player's current score (number only)
   @SCORETEXT@    The text "Score: X of Y" with the relevant numbers filled in.
   @TOTALSCORE@  The maximum possible score, specified on the Game Settings pane
  '''Example:''' You have @SCORE@ out of @TOTALSCORE@ possible points.
  The Properties window also allows you to align the text to the left, right, or
  centre, as well as change its font and colour.
 
And there you have it.
And there you have it.