Browse Source

blendish: added BND_DISABLED_ALPHA constant

pull/1/head
Leonard Ritter 10 years ago
parent
commit
a15fafb396
2 changed files with 5 additions and 1 deletions
  1. +4
    -0
      blendish.h
  2. +1
    -1
      example.cpp

+ 4
- 0
blendish.h View File

@@ -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.


+ 1
- 1
example.cpp View File

@@ -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) {


Loading…
Cancel
Save