diff options
Diffstat (limited to 'src/static-ui.cpp')
| -rw-r--r-- | src/static-ui.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/static-ui.cpp b/src/static-ui.cpp index 25c2514..2682de1 100644 --- a/src/static-ui.cpp +++ b/src/static-ui.cpp @@ -28,6 +28,14 @@ const char *const ui_ux_mouse_left = "ui_ux_mouse_left"; const char *const ui_ux_mouse_right = "ui_ux_mouse_right"; const char *const ui_ux_mouse_middle = "ui_ux_mouse_middle"; +#ifndef PKE_UI_CLR_DISABLED_BORDER +#define PKE_UI_CLR_DISABLED_BORDER glm::vec4(0.6,0.6,0.6,1.0) +#endif + +#ifndef PKE_UI_CLR_DISABLED_BACKGROUND +#define PKE_UI_CLR_DISABLED_BACKGROUND glm::vec4(0.4,0.4,0.4,1.0) +#endif + TypeSafeInt_B(PKE_UI_BOX_TYPE); TypeSafeInt_B(PKE_UI_BOX_FLAG); TypeSafeInt_B(PKE_UI_BOX_STATE_FLAG); @@ -448,6 +456,10 @@ bool pke_ui_calc_px(pk_arr_t<pke_ui_box_instance_buffer_item> &buffer, pk_arr_t< tmp.pos_scale = glm::scale(tmp.pos_scale, scale); tmp.color_border = box->color_border; tmp.color_background = box->color_background; + if (PK_HAS_FLAG(box->flags, PKE_UI_BOX_FLAG_VISIBILITY_DISABLED)) { + tmp.color_border = PKE_UI_CLR_DISABLED_BORDER; + tmp.color_background = PKE_UI_CLR_DISABLED_BACKGROUND; + } tmp.px_scale.x = (1.0 / (float)Extent.width); tmp.px_scale.y = (1.0 / (float)Extent.height); tmp.depth = (float)box->layer; |
