* clean up ^M
authorNathan Letwory <nathan@letworyinteractive.com>
Thu, 17 Jan 2008 23:03:37 +0000 (23:03 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Thu, 17 Jan 2008 23:03:37 +0000 (23:03 +0000)
* make default size of action zones smaller (still draw them, but that could be also made optional).

source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c

index 2c2dc85295d3b47bea6174374b198ef8b73d1f36..c0158e460bbd9a7cc8b8a209de73cf76d7f970fc 100644 (file)
@@ -260,6 +260,7 @@ static void area_calc_totrct(ScrArea *sa, int sizex, int sizey)
        sa->winy= sa->totrct.ymax-sa->totrct.ymin+1;
 }
 
+#define AZONESPOT              6
 void area_azone_initialize(ScrArea *sa) {
        AZone *az;
        if(sa->actionzones.first==NULL) {
@@ -270,8 +271,8 @@ void area_azone_initialize(ScrArea *sa) {
                az->type= AZONE_TRI;
                az->x1= sa->v1->vec.x+1;
                az->y1= sa->v1->vec.y+1;
-               az->x2= sa->v1->vec.x+HEADERY;
-               az->y2= sa->v1->vec.y+HEADERY;
+               az->x2= sa->v1->vec.x+AZONESPOT;
+               az->y2= sa->v1->vec.y+AZONESPOT;
                az->pos= AZONE_SW;
                az->action= AZONE_SPLIT;
                
@@ -280,8 +281,8 @@ void area_azone_initialize(ScrArea *sa) {
                az->type= AZONE_TRI;
                az->x1= sa->v3->vec.x-1;
                az->y1= sa->v3->vec.y-1;
-               az->x2= sa->v3->vec.x-HEADERY;
-               az->y2= sa->v3->vec.y-HEADERY;
+               az->x2= sa->v3->vec.x-AZONESPOT;
+               az->y2= sa->v3->vec.y-AZONESPOT;
                az->pos= AZONE_NE;
                az->action= AZONE_DRAG;
                
@@ -290,61 +291,61 @@ void area_azone_initialize(ScrArea *sa) {
                az->type= AZONE_TRI;
                az->x1= as->v1->vec.x;
                az->y1= as->v1->vec.y;
-               az->x2= as->v1->vec.x+HEADERY;
-               az->y2= as->v1->vec.y+HEADERY;
+               az->x2= as->v1->vec.x+AZONESPOT;
+               az->y2= as->v1->vec.y+AZONESPOT;
                
                az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
                BLI_addtail(&sa->azones, az);
                az->type= AZONE_TRI;
                az->x1= as->v1->vec.x;
                az->y1= as->v1->vec.y;
-               az->x2= as->v1->vec.x+HEADERY;
-               az->y2= as->v1->vec.y+HEADERY;
+               az->x2= as->v1->vec.x+AZONESPOT;
+               az->y2= as->v1->vec.y+AZONESPOT;
                
                az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
                BLI_addtail(&sa->azones, az);
                az->type= AZONE_QUAD;
                az->x1= as->v1->vec.x;
                az->y1= as->v1->vec.y;
-               az->x2= as->v1->vec.x+HEADERY;
-               az->y2= as->v1->vec.y+HEADERY;
+               az->x2= as->v1->vec.x+AZONESPOT;
+               az->y2= as->v1->vec.y+AZONESPOT;
                
                az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
                BLI_addtail(&sa->azones, az);
                az->type= AZONE_QUAD;
                az->x1= as->v1->vec.x;
                az->y1= as->v1->vec.y;
-               az->x2= as->v1->vec.x+HEADERY;
-               az->y2= as->v1->vec.y+HEADERY;
+               az->x2= as->v1->vec.x+AZONESPOT;
+               az->y2= as->v1->vec.y+AZONESPOT;
                
                az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
                BLI_addtail(&sa->azones, az);
                az->type= AZONE_QUAD;
                az->x1= as->v1->vec.x;
                az->y1= as->v1->vec.y;
-               az->x2= as->v1->vec.x+HEADERY;
-               az->y2= as->v1->vec.y+HEADERY;
+               az->x2= as->v1->vec.x+AZONESPOT;
+               az->y2= as->v1->vec.y+AZONESPOT;
                
                az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
                BLI_addtail(&sa->azones, az);
                az->type= AZONE_QUAD;
                az->x1= as->v1->vec.x;
                az->y1= as->v1->vec.y;
-               az->x2= as->v1->vec.x+HEADERY;
-               az->y2= as->v1->vec.y+HEADERY;*/
+               az->x2= as->v1->vec.x+AZONESPOT;
+               az->y2= as->v1->vec.y+AZONESPOT;*/
        }
        
        for(az= sa->actionzones.first; az; az= az->next) {
                if(az->pos==AZONE_SW) {
                        az->x1= sa->v1->vec.x+1;
                        az->y1= sa->v1->vec.y+1;
-                       az->x2= sa->v1->vec.x+HEADERY;
-                       az->y2= sa->v1->vec.y+HEADERY;
+                       az->x2= sa->v1->vec.x+AZONESPOT;
+                       az->y2= sa->v1->vec.y+AZONESPOT;
                } else if (az->pos==AZONE_NE) {
                        az->x1= sa->v3->vec.x-1;
                        az->y1= sa->v3->vec.y-1;
-                       az->x2= sa->v3->vec.x-HEADERY;
-                       az->y2= sa->v3->vec.y-HEADERY;
+                       az->x2= sa->v3->vec.x-AZONESPOT;
+                       az->y2= sa->v3->vec.y-AZONESPOT;
                }
        }
 }
index adc52b60d727bbd4249990b10cbba8f762e4e0e8..a82dafa8381c852b5fcb6f4a23d37de53b948689 100644 (file)
@@ -748,6 +748,7 @@ static void drawscredge_area(ScrArea *sa)
        /* temporary viz for 'action corner' */
        for(az= sa->actionzones.first; az; az= az->next) {
                if(az->type==AZONE_TRI) sdrawtrifill(az->x1, az->y1, az->x2, az->y2, .2, .2, .2);
+               //if(az->type==AZONE_TRI) sdrawtri(az->x1, az->y1, az->x2, az->y2);
        }
 }