Re-implementing the main menu
In order to demonstrate how much easier it is building interactivity in this way, let's re-construct the main menu, starting by creating its .interface
file:
Interface MainMenu MainMenu.style 0 0 Immovable NoTitle "Main menu" Element Label Title 100 0 MainMenuTitle.style "Main menu:" Element Label Play 0 32 MainMenuLabel.style "PLAY" Element Label Credits 0 68 MainMenuLabel.style "CREDITS" Element Label Quit 0 104 MainMenuLabel.style "EXIT"
The interface is set to have zero padding on both axes, be immovable, and have no title bar. All three buttons in this interface, as well as its title, can be represented by labels with different styles. Speaking of which, let's take a look at the style of our main menu interface:
State Neutral Size 300 150 TextSize 12 Font Main /State
As you can see, it only defines the most basic attributes and does not aim to be visually responsive by itself. The button label style...