From a15fafb396efc28392de98f86d57bbd9d33ca615 Mon Sep 17 00:00:00 2001 From: Leonard Ritter Date: Tue, 15 Jul 2014 07:26:46 +0200 Subject: [PATCH] blendish: added BND_DISABLED_ALPHA constant --- blendish.h | 4 ++++ example.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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) {