Feature #31 ยป 0028-sdl3-Replace-SDL_SetClipRect-call-with-SDL_SetSurfac.patch
client/gui-sdl3/widget_label.c | ||
---|---|---|
return redraw_themelabel2(label);
|
||
}
|
||
/* redraw selected bar */
|
||
/* Redraw selected bar */
|
||
if (get_wstate(label) == FC_WS_SELECTED) {
|
||
if (get_wflags(label) & WF_SELECT_WITHOUT_BAR) {
|
||
if (label->string_utf8 != NULL) {
|
||
... | ... | |
}
|
||
}
|
||
/* redraw icon label */
|
||
/* Redraw icon label */
|
||
ret = redraw_iconlabel(label);
|
||
if ((get_wstate(label) == FC_WS_SELECTED) && (label->string_utf8 != NULL)) {
|
||
... | ... | |
h = MAX(h, icon->h);
|
||
}
|
||
}
|
||
/* text */
|
||
/* Text */
|
||
} else {
|
||
w = MAX(w, icon->w + space);
|
||
h = MAX(h, icon->h);
|
||
}
|
||
}
|
||
/* icon */
|
||
/* Icon */
|
||
label->size.w = w;
|
||
label->size.h = h;
|
||
}
|
||
... | ... | |
SDL_Rect dst;
|
||
Uint32 flags;
|
||
if (!label) {
|
||
if (label == NULL) {
|
||
return -3;
|
||
}
|
||
SDL_SetClipRect(label->dst->surface, &label->size);
|
||
SDL_SetSurfaceClipRect(label->dst->surface, &label->size);
|
||
flags = get_wflags(label);
|
||
... | ... | |
y = (label->size.h - text->h) / 2;
|
||
}
|
||
}
|
||
/* text */
|
||
/* Text */
|
||
} else {
|
||
#if 0
|
||
yI = (label->size.h - label->theme->h) / 2;
|
||
... | ... | |
FREESURFACE(text);
|
||
}
|
||
SDL_SetClipRect(label->dst->surface, NULL);
|
||
SDL_SetSurfaceClipRect(label->dst->surface, NULL);
|
||
return ret;
|
||
}
|