Class ColorPaletteWidget
Reusable editor widget for displaying and switching ANSI color palettes. Shows 16-color swatches (8 normal + 8 bright), a palette dropdown, and Apply/Reset buttons.
Inherited Members
Namespace: Scylla.TextMode.Editor
Assembly: ScyllaTextMode.Editor.dll
Syntax
[InitializeOnLoad]
public static class ColorPaletteWidget
Remarks
This widget drives SetPalette(ColorPalette) directly and is separate from the TextMode color theme system. Applying a palette here changes the sixteen indexed colors immediately but does not update ActiveThemeName, so a view's "Color Theme" section can go on reporting a different theme than what indexed text is actually drawn with until a theme is next applied through TextModeThemes. Prefer TextModeThemeField for authoring a theme; use this widget when the goal is to preview or spot-check the ANSI sixteen on their own.
Methods
CreateWidget()
Creates a self-contained UI Toolkit UnityEngine.UIElements.VisualElement with swatches, dropdown, and Apply/Reset buttons for browsing and applying ANSI color palettes.
Declaration
public static VisualElement CreateWidget()
Returns
| Type | Description |
|---|---|
| VisualElement | The widget's root container, ready to be added to an inspector. |
Draw()
Draws the color palette widget with swatches, dropdown, and buttons.
Declaration
public static void Draw()