-
Notifications
You must be signed in to change notification settings - Fork 64
Customizing the game UI
The UI for the adventure games created with the Composer can be fully customized.
- All assets used to draw the UI are in the 'assets/ui' folder.
- The images are in the ui atlas inside 'assets/ui/1' folder.
- The libgdx skin for the interface is defined in 'assets/ui/ui.json' file.
More info about creating .json skin files for LibGDX can be found here.
The images of the ui atlas can be replaced for changing the UI icons. The raw images used to generate the ui atlas can be found in the test projects (IMAGES-RAW/ui) and can be used to regenerate the atlas changing the needed images.
The next properties can be set in the Game Props tab inside the Adventure composer to change the inventory behavior:
- inventory_autosize: when true, the inventory size will be changed depending on the number of items. When false, the inventory will always have the bigger size.
- inventory_pos: The inventory position. The possible values are: top, down, left, right, center.
The inventory appearance is defined in the ui.json skin file inside the com.bladecoder.engine.ui.InventoryUI$InventoryUIStyle section.
Tree properties define the inventory appearance:
- background: The background image/drawable.
- itemBackground: The background for each item.
- menuButtonStyle: The style for the menu button. The style must exist in the image button style section.
The appearance for the dialog ui is defined in the ui.json skin file inside the com.bladecoder.engine.ui.DialogUI$DialogUIStyle section.
These properties can be defined: background: black08, font: dialog-font, fontColor: white, overFontColor: light-grey
- font: The font used for the texts.
- fontColor: The font color.
- overFontColor: The font color when the cursor is over the text.
- background: The background image/drawable.
The appearance for the texts showed in the game is defined in the ui.json skin file inside the com.bladecoder.engine.ui.TextManagerUI$TextManagerUIStyle section.
These properties can be defined:
- font: The font used for the texts.
- rectBackground: The background image/drawable for non character texts.
- talkBackground: The background image/drawable for texts spoken by characters.
- talkBubble: The image/drawable drawed in the characters texts to give a comic look.
Two interfaces are defined for interaction with the objects in the game:
- The two buttons interface works only for desktop. The left button is used for action (pickup/talkto) and the right button is used for 'lookat'.
- The pie menu interface shows icons for 'lookat' and action (pickup/talkto) verbs.
The appearance for the menu screen is defined in the ui.json skin file inside the com.bladecoder.engine.ui.MenuScreen$MenuScreenStyle section.
These properties define the menu screen appearance:
- bgFile: The background image. Ej. ui/menubg.png
- textButtonStyle: The style of the buttons. The style must exist in the image button style section.
- showTitle: Boolean to show/hide the title in text.
The text and images scrolled in the default credit screen are defined throught the 'assets/ui/credits.txt' file.
The appearance is defined in the ui.json skin file inside the com.bladecoder.engine.ui.CreditsScreen$CreditScreenStyle section.
The images for the default help screen can be replaced in 'assets/ui/1'. The next images are used in the default help screen:
- helpDesktop.png the help showed when the two button interface is used.
- helpPie.png the help showed when the pie menu interface is used.
The help images can be translated in different languages adding the language suffix. For example, for Spanish we have the next images:
- helpDesktop_es.png
- helpPie_es.png
The next screens can be replaced by custom Java implementations:
- The init screen
- The menu screen
- The help screen
- The credit screen
The custom screens must implement the BladeScreen interface
-
The Adventure
- Project structure
- Working with assets
- Multiple resolutions
- Chapters
-
Scenes
- Actor layers
- Walk Zones and obstacles
- Scene music
-
Actors
- Background Actors
- Sprite Actors
- Character Actors
- Obstacle Actors
- Anchor Actors
-
Animations
- Image renderer
- Atlas renderer
- Spine renderer
- 3D renderer
- Stand, Walking and Speak animations
- Dialogs
-
Verbs and Actions
- Control actions
- Sounds
-
Customizing the game UI
- Changing the UI Icons
- Customizing the Inventory
- Customizing the Game Screens
- Creating custom actions
-
Testing the adventure
- The test verb
- Recording and playing games
- The Tester Bot
- I18N and text translations