diff --git a/blendish.h b/blendish.h index 3b9d11d..9784a86 100644 --- a/blendish.h +++ b/blendish.h @@ -199,6 +199,10 @@ typedef enum BNDcornerFlags { // default horizontal spacing #define BND_HSPACING 8 +// alpha of disabled widget groups +// can be used in conjunction with nvgGlobalAlpha() +#define BND_DISABLED_ALPHA 0.5 + //////////////////////////////////////////////////////////////////////////////// // set the current theme all widgets will be drawn with. diff --git a/example.cpp b/example.cpp index 69f1e10..b16b265 100644 --- a/example.cpp +++ b/example.cpp @@ -119,7 +119,7 @@ void drawUI(NVGcontext *vg, int item, int x, int y) { rect.x += x; rect.y += y; if (uiGetState(item) == UI_FROZEN) { - nvgGlobalAlpha(vg, 0.5); + nvgGlobalAlpha(vg, BND_DISABLED_ALPHA); } if (head) { switch(head->subtype) {