WindowColorMode
| Kind | class |
| Package | backend |
| Full name | backend.WindowColorMode |
| Source | source/backend/WindowColorMode.hx |
Public fields
| Name | Type | Static | Default | Notes |
|---|---|---|---|---|
isDarkMode | Bool | yes | false | If the window is currently dark mode or not. |
windowHeaderColor | Array<Int> | yes | [] | Returns the current color of the header. |
windowBorderColor | Array<Int> | yes | [] | Returns the current color of the border. |
windowTitleColor | Array<Int> | yes | [] | Returns the current color of the title text. |
Public methods
setWindowColorMode
static function setWindowColorMode(isDark:Bool = true)
Shortcut to both setLightMode and setDarkMode.
@param isDark Do you want to set the window to dark mode?
| Parameter | Type | Default |
|---|---|---|
isDark (optional) | Bool | true |
setDarkMode
static function setDarkMode()
Sets the window to dark mode.
setLightMode
static function setLightMode()
Sets the window to light mode (aka default).
setWindowBorderColor
static function setWindowBorderColor(color:Array<Int>, setHeader:Bool = true, setBorder:Bool = true)
Sets the header and/or border to a color of your choosing. (Only Windows 11 supports this).
@param color The color of the window border/header. organized as [R (0 to 255), G (0 to 255), B (0 to 255)]. @param setHeader Do you want to set the header to the specified color? @param setBorder Do you want to set the border to the specified color?
| Parameter | Type | Default |
|---|---|---|
color | Array<Int> | — |
setHeader (optional) | Bool | true |
setBorder (optional) | Bool | true |
setWindowTitleColor
static function setWindowTitleColor(color:Array<Int>)
Sets the window title text to a color of your choosing. (Only Windows 11 supports this).
@param color The color of the window border/header. organized as [R (0 to 255), G (0 to 255), B (0 to 255)].
| Parameter | Type | Default |
|---|---|---|
color | Array<Int> | — |
redrawWindowHeader
static function redrawWindowHeader()
Resets the window. It is recommended to use this after running any of the functions above so the effect is drawn immediately. (Windows 11 doesn't need this, but it's needed on Windows 10, or else the effect won't take place until you unfocus/refocus the window).