Creating Menus

Avatar

By Tyft5 4 Jul 2016 04:46

New member · 1 comments

Hello! I'm new to the community. I've never worked on a project like this before! So this is exciting for me. I have a few questions to start out, a few just to confirm my assumptions.

I'd like to start working on issue #16, implementing a submenu for selecting/sorting monsters. My questions:

  • Should I be working in the menu_refactor branch or the development branch? So far I've been looking through the refactor (the third question reflects this).
  • Is subclassing NewMenu preferable to Menu for new menu classes? It seems sensible but I want to double check
  • My plan is to create a new menu class that is shown when a player selects a monster from a MonsterMenu. I've started writing this class inside monster_menu.py. It looks like all of the menus currently implemented are instantiated in the world state, added as children where sensible, and simply made visible and interactable when they are needed. Is it preferred to implement new menus this way, particularly with regards to submenus?

Thanks, I'm looking forward to contributing!

Last edited by Tyft5 (4 Jul 2016 04:49)

Avatar

By bitcraft 4 Jul 2016 05:08

Champion · 166 comments

Should I be working in the menu_refactor branch or the development branch? So far I've been looking through the refactor (the third question reflects this).

All commits should be started from the development branch

Is subclassing NewMenu preferable to Menu for new menu classes?

Subclass the Menu class.  You can add item sby overloading the generator Menu.initialize_items.  Sometime in the near future, there will be a more traditional way to add things to the menu, but it isn't merged yet.

Looking forward to having a new contributor.

Last edited by bitcraft (4 Jul 2016 05:22)