forked from pyrite-dev/milsko
font
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@44 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
a8764925f7
commit
a99eb3add0
9 changed files with 161 additions and 147 deletions
16
src/button.c
16
src/button.c
|
|
@ -6,16 +6,26 @@ static void create(MwWidget handle) {
|
|||
}
|
||||
|
||||
static void draw(MwWidget handle) {
|
||||
MwRect r;
|
||||
MwRect r;
|
||||
MwPoint point;
|
||||
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
||||
MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground));
|
||||
|
||||
r.x = 0;
|
||||
r.y = 0;
|
||||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
MwDrawFrame(handle, &r, MwParseColor(handle, MwGetText(handle, MwNbackground)), handle->pressed);
|
||||
MwDrawFrame(handle, &r, base, handle->pressed);
|
||||
MwDrawRect(handle, &r, base);
|
||||
|
||||
// MwDrawRect(handle, &r, MwParseColor(handle, MwGetText(handle, MwNbackground)));
|
||||
point.x = r.x + r.width / 2;
|
||||
point.y = r.x + r.height / 2;
|
||||
|
||||
MwDrawText(handle, &point, "test", text);
|
||||
|
||||
MwLLFreeColor(text);
|
||||
MwLLFreeColor(base);
|
||||
}
|
||||
|
||||
static void click(MwWidget handle) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue