- attached menu-free.png
- attached menu-corner.png
Upgrade TouchCORE menus - creation of a new menu
Right now the menus in TouchCORE are defined in each scene which leads to a lot of code duplication, makes adding buttons complicated and sometimes leads to inconsistencies (see #302). Also the menu is at the fixed position which is not handy when working on a big screen.
The idea of this task is to create a new menu for TouchCORE which can be customized easily by scenes and can be moved around to different places in the screen.
This task will consist in the creation and basic integration of a new menu in TouchCORE. A later issue will probably consist in creating a "super scene" class that contains by default the new menu and allows subclasses to customize it and handle its events more easily.
The menu we decided on is constructed around a central circle (see screenshot).
The main features of the menu are the following:
- Allow the developer to define sub-menus containing different buttons.
- Buttons consist of text and an optional icon.
- The menu can display buttons in sub-menus or directly around the circle.
- Sub menus can be opened by clicking them and stay open until clicked again.
- The menu should be able to layout itself depending on its location on the screen (see screenshots):
- In a corner, only 3 icons or sub-menus will be available (or 2 if the buttons are text-based).
- On edges, at most 5 icons or sub-menus will be displayed.
- In the middle of the screen, up to 8 can be used.
- We can define sub menus or group of items that always need to be displayed (for example like the buttons "undo/redo" and "save")
- If there is enough space, buttons will not be displayed in sub-menus (we may want to prevent that for some menus).
- To do this properly, we can define a priority among our sub-menus. A sub menu containing highly used action will probably have a higher priority. This means that if there are spaces left in the menu we can put its buttons directly available instead of in a sub menu.
- Buttons of the same sub-menu will always be displayed next to each other.
- If there is no icon defined for a button, text will be displayed by default.
- Text should only be displayed in vertical lists so it's easy to read. This could lead the "merge" of different sub-menus when the menu is in a corner for example.
- If a sub-menu item has no icon, all items from the same menu should be displayed in text. They all should have the same width.
- For clarity reasons, if there are any text buttons, the locations next to them around the circle should not be used.
- Items from different sub-menus could be represented by different background colors defined by the user.
Additions from latest meeting:
- Always display icons/short name and allow to switch to text with a tap and hold gesture on the central circle.
- Text may be displayed somewhere (middle circle?) when hovering the buttons in "icon mode".
- sub menus have an icon or short name + arrow to show they can be opened.
- when grouping sub menus, have a specific icon on the sub menu (eg, only an arrow)
Comments (38)
-
Account Deleted -
Account Deleted - attached menu-side.png
-
Account Deleted References
#315: Menu added to the first scene + child position arround the menu + menu can be dragged near a side or a corner and it's stuck on the edge.→ <<cset 860ae9f7d217>>
-
I don't know if it would still be necessary with context-sensitive menus. But different views within the same scene might need a different menu or need/don't need certain buttons.
-
Account Deleted Yes, we'll have an abstract scene containing the menu reference, and then when the scene modify its view, the developer can update the menu with new actions or remove some actions.
-
reporter - edited description
-
Account Deleted References
#315: items of the menu are placed in function of their priority and the position of the menu.→ <<cset 70b85987c9ee>>
-
Account Deleted References
#315: merged with master.→ <<cset 38289919e87d>>
-
Account Deleted References
#315: icons added + rectangle actions are always visibles.→ <<cset 84154a342cc1>>
-
Account Deleted References
#315: items are well placed arround the menu, the algorithm is different and all actions of a sub menu are added if there is enough space to place them all.→ <<cset 3e0349fc1931>>
-
Account Deleted References
#315: actions and sub-menus can be removed→ <<cset 9e316fb7e972>>
-
Account Deleted References
#315: added dynamic items adding for the demo.→ <<cset 61db28075bbd>>
-
Account Deleted References
#315: merge with master.→ <<cset cba2094d5bb2>>
-
Account Deleted References
#315: Add icon on sub-menu, add handler in RamAbstractScene, created BasicActionsUtils with save/undo/redo methods, add menu in each scene→ <<cset 69569965d0d8>>
-
Account Deleted References
#315: refactor the main layer into RamAbstractScene (topLayer > containerLayer + menu). ContainerLayer is the main layer for childs. Menu integration into all scenes (handlers not working properly). Add icons to all actions.→ <<cset 85d06fe82ba2>>
-
Account Deleted References
#315: handle action on undo/redo/save with merge in RamAbstractScene. Delete unique operation save in BasicActionsUtils because of listeners needed in saveAspect.→ <<cset 716f15e15cdf>>
-
Account Deleted References
#315: Add icons, event propagation from child on sub-menus.→ <<cset 5204c1ee38a9>>
-
Account Deleted References
#315: modified icons for weave, modify sub-menu icon when hidding/showing sub-actions.→ <<cset 862d81b2896b>>
-
Account Deleted References
#315: replace back button in split view to close button + add icon reaction on collapse/Expand sub-menus + weave button icon modified + clean code.→ <<cset 638f6fd594df>>
-
Account Deleted References
#315: add save,undo,redo in split view, add collapse/expand enable in reuse.→ <<cset e20dbffd9d99>>
-
Account Deleted References
#315: Javadoc, add enableAction and toggleAction in RamMenu to support the temporary sub-menu,modification weave icon in impact view to a validation icon.→ <<cset 96583fa9ac50>>
-
Account Deleted References
#315: override destroy method to prevent memory leaks.→ <<cset 90caa0c821ec>>
-
Account Deleted References
#315: save/saveAs method.→ <<cset 72d7606f6459>>
-
Account Deleted References
#315: add icons for class menu, menu size can be defined in constructor, add menu in class view tap&hold.→ <<cset 5fbcd849f264>>
-
Account Deleted References
#315: Add icons for class actions menu, Add menu in classView, implementationClass and EnumView.→ <<cset 98077f294c22>>
-
Account Deleted References
#315: removed menu in BaseView for the demo.→ <<cset 8c0b48d40af0>>
-
Is #329 already taken care of in your branch?
-
Account Deleted References
#315: switch icon when button is toggled. New icons for show/hide reuse and switch full/normal mode.→ <<cset d0b5837aab75>>
-
Account Deleted References
#315-Menu-Integration: move addSelector to RamAbstractScene + fix bug when you add button to the menu it was displayed in default mode + replace icon for clean (reuse) and switch to full/next mode + selectors can't be partially visible + generate selector is shown on the menu + fix checkstyle errors.→ <<cset 489903fa71e2>>
-
Account Deleted References
#315-Menu-Integration: fix bug for undo/redo initialization in create Aspect + new root goal icon.→ <<cset 67411baed60f>>
-
- changed milestone to Summer 2015 "Sombrero"
-
- changed milestone to Summer 2015 "Bellissimo"
-
Account Deleted References
#315-Menu-Integration: replace undo/redo icon + show labels on tap&hold near icon buttons→ <<cset 53c7bfe9e292>>
-
Account Deleted References
#315-Menu-Integration: labels never overlaps, ratio decrease instead.→ <<cset c1cec28df73b>>
-
Account Deleted References
#315-Menu-Integration: Labels never out of the screen.→ <<cset 22284f8ef220>>
-
Account Deleted References
#315-Menu-Integration: fix tap&hold bug for menu (delayedDrad) + labels are not scaled when there is no needs.→ <<cset 72673500cb80>>
-
Account Deleted - changed status to resolved
Issue moved to
#315-Menu-Integration -
References
#315: Fixes the update of the selector location. A copy of the passed in position is created to not modify the caller's position.→ <<cset 680140b15ba9>>
- Log in to comment