|
Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
The UI Engine 2 module that allow runtime control over the UI elements' color without demands to anyhow address each element impersonally. By using the module features you may manage entire GUI palette for GUI elements bonded with the module just with simple commands via API.
The module supports 2 palettes to be used at the same time.
The system declares them as Main and Alternative. Each palette contains 5 colors: background, background2, foreground, hover, selection.
PaletteHandler service that encapsulates instances update. ColorPalette asset. Read more: Palette creation.Module integration is very easy and shorten to user for only 3 important classes to use.
| Class | Purpose |
|---|---|
| Doloro.UIEngine2.Modules.Palettes.PaletteHandler | Static API service to resources management. Using for any operations with palettes other that defaults loading going automatically. |
| Doloro.UIEngine2.Modules.Palettes.PaletteColorPicker | Component that bond graphic with the module's backstage. Allows to defined paired color source to the GUI element. |
| Doloro.UIEngine2.Modules.Palettes.ColorPalette | Resource asset that declares and configures palette settings.
|
Create\Color Palette (DoloroUI2) in context menu.Resources\palettes to make it visible for PaletteHandler service.
For bond of a GUI element to the module you have to put the PaletteColorPicker component to a destination game object with an Image or Renderer component.
In case of Renderer attachment the picker will apply a bond palette color to the Renderer.color property.
You may define default palettes to load. They will apply to PaletteHandler service during its loading.
To setup default palettes you have to name target ColorPalette resources according with the next pattern:
| Name | Purpose |
|---|---|
default_main | Declares palette resource as the default source for main palette. |
default_alt | Declares palette resource as the default source for alternative palette. |
Main or Alternative palette selecting on PaletteColorPicker component as a source to apply.