mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2025-12-31 06:30:52 +00:00
enable frame to draw its own border. also made more color wheel changes
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@383 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -8,15 +8,34 @@ static int create(MwWidget handle) {
|
||||
}
|
||||
|
||||
static void draw(MwWidget handle) {
|
||||
MwRect r;
|
||||
MwRect fr;
|
||||
MwRect rr;
|
||||
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
||||
|
||||
r.x = 0;
|
||||
r.y = 0;
|
||||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
int hasBorder = MwGetInteger(handle, MwnhasBorder);
|
||||
int inverted;
|
||||
|
||||
MwDrawRect(handle, &r, base);
|
||||
if(hasBorder) {
|
||||
inverted = MwGetInteger(handle, MwNinverted);
|
||||
fr.x = 0;
|
||||
fr.y = 0;
|
||||
fr.width = MwGetInteger(handle, MwNwidth);
|
||||
fr.height = MwGetInteger(handle, MwNheight);
|
||||
MwDrawFrame(handle, &fr, base, inverted);
|
||||
|
||||
rr.x = MwDefaultBorderWidth;
|
||||
rr.y = MwDefaultBorderWidth;
|
||||
rr.width = MwGetInteger(handle, MwNwidth) - (MwDefaultBorderWidth * 2);
|
||||
rr.height = MwGetInteger(handle, MwNheight) - (MwDefaultBorderWidth * 2);
|
||||
} else {
|
||||
|
||||
rr.x = 0;
|
||||
rr.y = 0;
|
||||
rr.width = MwGetInteger(handle, MwNwidth);
|
||||
rr.height = MwGetInteger(handle, MwNheight);
|
||||
}
|
||||
|
||||
MwDrawRect(handle, &rr, base);
|
||||
|
||||
MwLLFreeColor(base);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user