New funtionalities - UQdeco2800/2022-studio-2 GitHub Wiki
This wiki page gives a summary of the feature optimisations made in sprint 4.
The previous inventory display functions were not well-structure. Multiple drop-down menu can be shown in the inventory. In this sprint, this problem is fixed by restructuring the display function.
Now drop-down menu buttons have their own group and is cleared whenever the item buttons are clicked. This will ensure maximum 1 drop-down menu will be displayed on the screen;
private Group dropdownGroup = new Group();
In the previous sprints, multiple pop-up screens can be opened and pauses the game unintentionally. To resolve this, I have implemented a flag to check if a menu is currently opened and stop other menus from opening.
private static Enum currentMenu = MenuTypes.NONE;
public enum MenuTypes{
INVENTORY,
CRAFTING,
MINIMAP,
PAUSEMENU,
NONE
}
By default, the flag will be set to none. The menus can only be opened/closed if the flag state equals NONE or the type of the menu itself.
- Li-Sung Ou
- GitHub: @PeterOu8
- Discord: Secret Agent Randy Beans#6754
- Slack: Li-Sung Ou