|
Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
The package provides you a flexible to adjust system of in-game context menus. The system can be used both with integration into AGUIElement.OnContext callback or as a stand-alone solution.
Usage of the module features allows you to draw and execute programable list of GUI elements with bonded Action handlers. By the press over the menu element an attached action handler will be invoked.
In-game context menu by itself powered with:
Window instance behavior.Layout fetching from the Resources folder as DynamicResource by the following resource signature:
Bundle: dui2.context
Key: default
You may find default pre-configured layout resource by the following path:
Doloro-GDK \ Doloro-UI-2 \ Resources \ Templates \ Context \ Context menu.prefab
Resources repository to be found.resource property addressing or context menu Open method call. Otherwise, the layout resource will not be located even in case of exist among resources.
Context menus implemented as static service. All operations with menus going via Doloro.UIEngine2.Modules.Context.ContextMenu class's API.
Following example demonstrates a sample menu creation and call.
| Property | Purpose |
|---|---|
direction | Allows to define item name.
|
callback | Action to call with item click. |
To integrate context menu into AGUIElement source you have to implement OnContext handler with context generation logic.
The handler automatically calls when the element receives RMB click event over it. That allows to define extra actions for interaction with any instance in GUI engine and create much more advance UI.