Time for action — creating events for the interface
Now we want to add events to allow the interface controls to perform their intended actions.
1. First, make a group with the name
HUD
and descriptionEvents for HUD controls
.2. Create an event in this group to compare that global variable
CurrentLevel
isGreater than
the value ofLevelINI.ItemValue("Game", "NumCustomLevels")
.3. Add the action
Disable
for thebtnNext
object.4. Next, create an action to set the global variable
CurrentLevel
toLevelINI.ItemValue("Game", "NumCustomLevels") + 1
.5. Finish the event by adding an action to set the text of
txtLevel
to"Level: New
".6. Now create the
System
eventElse
.7. Use the action
Enable
for thebtnNext
object.8. Following that, create an action to set the text of
txtLevel
to"Level: " & global('CurrentLevel')
.9. Next, create an event to compare if the global variable
CurrentLevel
isLess or equal
to1
.10. Create an action to
Disable
thebtnPrevious
object.11. Add another action, this time...