Panels & Windows
Add, tweak or edit any panels and windows.
Main Panel Manager
This component manages almost every panel/window in Dark UI.
Selected Panel On Enable: You can select the panel that will appear on enable. If you wish, you can also switch between panels in the editor while ‘Edit Mode’ is active.
- Panel Name: The variable to use when calling a panel with the OpenPanel() method. This is a required field.
- Panel Object: This is a required field.
- Panel Button: This is an optional field.
- Default Selected: This field is for gamepad input handling. This object will be selected by the event system when the panel is called. This is an optional field.
You can also manage options like animation speed by switching to the settings tab.
API / Scripting
using Michsky.UI.Dark; // namespace
public MainPanelManager myPanelManager;
void YourFunction()
{
myPanelManager.OpenPanel("Your Panel Name"); // open a specific panel
myPanelManager.NextPage(); // open next page
myPanelManager.PrevPage(); // open previous page
}
Adding a new panel
You can add new panels using Main Panel Manager component. There are 6 panel managers in the demo scene. The main one is added to the ‘Menu Manager’ object, others are added to sub-panels such as Story and Settings. To add a new panel, you can just follow these steps:
- Click ‘Add a new item’ button.
- Set an unique name for the panel.
- Duplicate one of the existing panel and assign the new one into ‘Panel Object’ field.
- (Optional) Duplicate one of the existing button and assign the new one into ‘Button Object’ field.
- (Optional) If the new panel has buttons that you want to be selected on call (for gamepads), you can assign it to ‘Default Selected’ field.
Deleting an existing panel
This is pretty similar to adding a new panel. Instead of duplicating an object, you’ll have to remove them:
- Select ‘Panel Object’ and delete the object.
- (Optional) Select ‘Button Object’ and delete the object.
- Remove the panel item from Main Panel Manager (using right click).
How can we help?
A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.