Changeset 24813
- Timestamp:
- Nov 8, 2013, 12:32:07 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/skin_new.h
r24805 r24813 3073 3073 //flag 0: draw all parts before node 3074 3074 //flag 1: draw all parts after node 3075 struct skin* drawnodepart(struct skin* tmp, struct skin* screen, struct skin* node, int flag)3075 struct skin* drawnodepart(struct skin* tmp, struct skin* screen, struct skin* parent, struct skin* node, int flag) 3076 3076 { 3077 3077 int posx = 0, posy = 0, width = 0, height = 0; … … 3079 3079 3080 3080 if(screen == NULL || node == NULL || screen == node) return NULL; 3081 if(node->hidden == YES || parent->hidden == YES || node->locked == YES || parent->locked == YES) return NULL; 3081 3082 if(checkbit(node->flag, 1) == 0 || checkbit(screen->flag, 1) == 1) return NULL; 3082 printf("drawnodepart %s %d\n", node->name, flag); 3083 if(checkbit(parent->flag, 0) == 0) return NULL; 3084 3085 //printf("drawnodepart %s %d\n", node->name, flag); 3083 3086 if(flag == 0) 3084 3087 child = screen; … … 3098 3101 } 3099 3102 3100 if(getrectdiff(node->rposx, node->rposy, node->rwi ght, node->rheight, child->rposx, child->rposy, child->rwidth, child->rheight, &posx, &posy, &weight, &height) == 1)3103 if(getrectdiff(node->rposx, node->rposy, node->rwidth, node->rheight, child->rposx, child->rposy, child->rwidth, child->rheight, &posx, &posy, &width, &height) == 1) 3101 3104 { 3102 3105 if(child == screen) … … 3112 3115 // drawbginnercol(node); 3113 3116 //else 3114 printf("drawbgcolpart %s\n", child->name);3117 //printf("drawbgcolpart %s x=%d y=%d w=%d h=%d\n", child->name, posx, posy, width, height); 3115 3118 drawbgcolpart(posx, posy, width, height, child->bgspace, child->bgcol, child->transparent); 3116 3119 } 3120 //if(child->gradient > 0) 3121 // drawbggradient(child); 3117 3122 3118 3123 if(child == screen) … … 3134 3139 3135 3140 node->flag = setbit(node->flag, 0); 3136 printf("%s %d\n", node->name, node->flag);3137 3141 if(checkbit(node->flag, 1) == 0) return; 3138 node->flag = clearbit(node->flag, 1); 3142 //printf("%s %d\n", node->name, node->flag); 3143 //node->flag = clearbit(node->flag, 1); 3139 3144 3140 3145 if(node->bordersize > 0) … … 3385 3390 { 3386 3391 node->pagecount++; 3387 if(found == NULL) change = node->pagecount; 3392 if(node->aktpage == -1) 3393 { 3394 if(found == NULL) change = node->pagecount; 3395 } 3396 else 3397 { 3398 if(node->pagecount == node->aktpage) change = node->pagecount; 3399 } 3388 3400 node->poscount = child->rheight; 3389 3401 } … … 3400 3412 last = child; 3401 3413 3402 if(change == node->pagecount && checkbit(child->flag, 1) == 0) change = 0; 3414 if(node->aktpage == -1) 3415 { 3416 if(change == node->pagecount && checkbit(child->flag, 1) == 0) change = 0; 3417 } 3418 else 3419 { 3420 if(change == node->aktpage && checkbit(child->flag, 1) == 0) change = 0; 3421 } 3403 3422 3404 3423 if(node->aktline == -1 && child->pagecount == node->aktpage) … … 3410 3429 found = child; 3411 3430 3412 ch ild->bordersize = 0;3431 changebordersize(child, 0); 3413 3432 if(status.listboxselecttype == 3) 3414 3433 { … … 3438 3457 if(status.listboxselecttype == 0) 3439 3458 { 3440 found->bordersize = 1;3459 changebordersize(found, 1); 3441 3460 if(status.markmodus > 0) 3442 3461 { … … 3526 3545 if(status.markmodus > 0) 3527 3546 { 3528 found->bordersize = 1;3547 changebordersize(found, 1); 3529 3548 found->bordercol = status.markcol; 3530 3549 int i = 0; … … 3535 3554 if(tmpskin != NULL) 3536 3555 { 3537 tmpskin->bordersize = 1;3556 changebordersize(tmpskin, 1); 3538 3557 tmpskin->bordercol = status.markcol; 3539 3558 } … … 3655 3674 3656 3675 if(node->child != NULL && status.picbordersize > 0) 3657 node->bordersize = status.picbordersize;3676 changebordersize(node, status.picbordersize); 3658 3677 3659 3678 if(node->skinfunc != NULL) … … 3751 3770 } 3752 3771 3753 if(checkbit(parent->flag, 1) == 1) node->flag = setbit(node->flag, 1);3772 //if(checkbit(parent->flag, 1) == 1) node->flag = setbit(node->flag, 1); 3754 3773 3755 3774 if(node->font == NULL && parent->font != NULL) … … 4050 4069 if(setnodeattr(child, parent, screencalc) == 0 && screencalc == 0) 4051 4070 { 4052 struct skin* tmp = drawnodepart(NULL, node, child, 0);4071 struct skin* tmp = drawnodepart(NULL, node, parent, child, 0); 4053 4072 drawnode(child, 1); 4054 drawnodepart(tmp, node, child, 1); 4073 drawnodepart(tmp, node, parent, child, 1); 4074 child->flag = clearbit(child->flag, 1); 4055 4075 } 4056 4076 child = child->next; 4057 4077 } 4078 4079 if(screencalc == 0 || flag == 4) node->flag = clearbit(node->flag, 1); 4058 4080 4059 4081 if(flag == 0 || flag == 2 || flag == 4) … … 4479 4501 int ret = 1; 4480 4502 4481 if(node != NULL )4503 if(node != NULL && node->bgcol != value) 4482 4504 { 4483 4505 node->bgcol = value; … … 4493 4515 int ret = 1; 4494 4516 4495 if(node != NULL) 4517 //TODO 4518 if(node != NULL /*&& node->progresssize != value*/) 4496 4519 { 4497 4520 node->progresssize = value; … … 4503 4526 } 4504 4527 4528 int changebordersize(struct skin* node, uint8_t value) 4529 { 4530 int ret = 1; 4531 4532 if(node != NULL && node->bordersize != value) 4533 { 4534 node->bordersize = value; 4535 node->flag = setbit(node->flag, 1); 4536 ret = 0; 4537 } 4538 4539 return ret; 4540 } 4541 4505 4542 #endif
Note: See TracChangeset
for help on using the changeset viewer.