fixing most of #3096

by 'eating' contol messages
still there is an issue on how transparent/opaque floating panels should be for messages
... and i am wondering if that should move to 'regular' buttons
This commit is contained in:
Jens Ole Wund 2005-10-22 22:50:09 +00:00
parent ac3e3eceba
commit 2bd1b4b773
2 changed files with 10 additions and 8 deletions

@ -307,6 +307,7 @@
#define B_SIMACLONEBROWSE 365 #define B_SIMACLONEBROWSE 365
#define B_SIMACLONEDELETE 366 #define B_SIMACLONEDELETE 366
#define B_SIMABRUSHCHANGE 367 #define B_SIMABRUSHCHANGE 367
#define B_SIMANOTHING 368
/* BUTS: 400 */ /* BUTS: 400 */
#define B_BUTSHOME 401 #define B_BUTSHOME 401

@ -853,6 +853,9 @@ static void image_panel_properties(short cntrl) // IMAGE_HANDLER_PROPERTIES
static void image_panel_paint(short cntrl) // IMAGE_HANDLER_PROPERTIES static void image_panel_paint(short cntrl) // IMAGE_HANDLER_PROPERTIES
{ {
/* B_SIMABRUSHCHANGE only redraws and eats the mouse messages */
/* so that LEFTMOUSE does not 'punch' through the floating panel */
/* B_SIMANOTHING */
ImagePaintTool *tool= &Gip.tool[Gip.current]; ImagePaintTool *tool= &Gip.tool[Gip.current];
uiBlock *block; uiBlock *block;
ID *id; ID *id;
@ -865,19 +868,17 @@ static void image_panel_paint(short cntrl) // IMAGE_HANDLER_PROPERTIES
uiBlockBeginAlign(block); uiBlockBeginAlign(block);
uiDefButF(block, COL, B_VPCOLSLI, "", 979,160,230,19, tool->rgba, 0, 0, 0, 0, ""); uiDefButF(block, COL, B_VPCOLSLI, "", 979,160,230,19, tool->rgba, 0, 0, 0, 0, "");
uiDefButF(block, NUMSLI, 0, "Opacity ", 979,140,230,19, tool->rgba+3, 0.0, 1.0, 0, 0, "The amount of pressure on the brush"); uiDefButF(block, NUMSLI, B_SIMANOTHING , "Opacity ", 979,140,230,19, tool->rgba+3, 0.0, 1.0, 0, 0, "The amount of pressure on the brush");
uiDefButI(block, NUMSLI, 0, "Size ", 979,120,230,19, &tool->size, 2, 64, 0, 0, "The size of the brush"); uiDefButI(block, NUMSLI, B_SIMANOTHING , "Size ", 979,120,230,19, &tool->size, 2, 64, 0, 0, "The size of the brush");
uiDefButF(block, NUMSLI, 0, "Fall ", 979,100,230,19, &tool->innerradius, 0.0, 1.0, 0, 0, "The fall off radius of the brush"); uiDefButF(block, NUMSLI, B_SIMANOTHING , "Fall ", 979,100,230,19, &tool->innerradius, 0.0, 1.0, 0, 0, "The fall off radius of the brush");
if(Gip.current == IMAGEPAINT_BRUSH || Gip.current == IMAGEPAINT_SMEAR) if(Gip.current == IMAGEPAINT_BRUSH || Gip.current == IMAGEPAINT_SMEAR)
uiDefButF(block, NUMSLI, 0, "Stepsize ",979,80,230,19, &tool->timing, 1.0, 100.0, 0, 0, "Repeating Paint On %of Brush diameter"); uiDefButF(block, NUMSLI, B_SIMANOTHING , "Stepsize ",979,80,230,19, &tool->timing, 1.0, 100.0, 0, 0, "Repeating Paint On %of Brush diameter");
else else
uiDefButF(block, NUMSLI, 0, "Flow ", 979,80,230,19, &tool->timing, 1.0, 100.0, 0, 0, "Paint Flow for Air Brush"); uiDefButF(block, NUMSLI, B_SIMANOTHING , "Flow ", 979,80,230,19, &tool->timing, 1.0, 100.0, 0, 0, "Paint Flow for Air Brush");
uiBlockEndAlign(block); uiBlockEndAlign(block);
uiBlockBeginAlign(block); uiBlockBeginAlign(block);
/* TODO: FLOATPANELMESSAGEEATER catching LMB on the panel buttons */
/* so LMB does not "GO" through the floating panel */
uiDefButS(block, ROW, B_SIMABRUSHCHANGE, "Brush", 890,160,80,19, &Gip.current, 7.0, IMAGEPAINT_BRUSH, 0, 0, "Brush"); uiDefButS(block, ROW, B_SIMABRUSHCHANGE, "Brush", 890,160,80,19, &Gip.current, 7.0, IMAGEPAINT_BRUSH, 0, 0, "Brush");
uiDefButS(block, ROW, B_SIMABRUSHCHANGE, "AirBrush", 890,140,80,19, &Gip.current, 7.0, IMAGEPAINT_AIRBRUSH, 0, 0, "AirBrush"); uiDefButS(block, ROW, B_SIMABRUSHCHANGE, "AirBrush", 890,140,80,19, &Gip.current, 7.0, IMAGEPAINT_AIRBRUSH, 0, 0, "AirBrush");
uiDefButS(block, ROW, B_SIMABRUSHCHANGE, "Soften", 890,120,80,19, &Gip.current, 7.0, IMAGEPAINT_SOFTEN, 0, 0, "Soften"); uiDefButS(block, ROW, B_SIMABRUSHCHANGE, "Soften", 890,120,80,19, &Gip.current, 7.0, IMAGEPAINT_SOFTEN, 0, 0, "Soften");
@ -890,7 +891,7 @@ static void image_panel_paint(short cntrl) // IMAGE_HANDLER_PROPERTIES
uiBlockBeginAlign(block); uiBlockBeginAlign(block);
id= (ID*)Gip.clone.image; id= (ID*)Gip.clone.image;
std_libbuttons(block, 979, 40, 0, NULL, B_SIMACLONEBROWSE, id, 0, &G.sima->menunr, 0, 0, B_SIMACLONEDELETE, 0, 0); std_libbuttons(block, 979, 40, 0, NULL, B_SIMACLONEBROWSE, id, 0, &G.sima->menunr, 0, 0, B_SIMACLONEDELETE, 0, 0);
uiDefButF(block, NUMSLI, 0, "B ",979,20,230,19, &Gip.clone.alpha , 0.0, 1.0, 0, 0, "Blend clone image"); uiDefButF(block, NUMSLI, B_SIMABRUSHCHANGE, "B ",979,20,230,19, &Gip.clone.alpha , 0.0, 1.0, 0, 0, "Blend clone image");
uiBlockEndAlign(block); uiBlockEndAlign(block);
#if 0 #if 0