add MwNtext
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@47 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
b913c904a0
commit
90ffa94f44
3 changed files with 12 additions and 6 deletions
13
src/button.c
13
src/button.c
|
|
@ -6,10 +6,13 @@ static void create(MwWidget handle) {
|
|||
}
|
||||
|
||||
static void draw(MwWidget handle) {
|
||||
MwRect r;
|
||||
MwPoint point;
|
||||
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
||||
MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground));
|
||||
MwRect r;
|
||||
MwPoint point;
|
||||
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
||||
MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground));
|
||||
const char* str = MwGetText(handle, MwNtext);
|
||||
|
||||
if(str == NULL) str = "";
|
||||
|
||||
r.x = 0;
|
||||
r.y = 0;
|
||||
|
|
@ -22,7 +25,7 @@ static void draw(MwWidget handle) {
|
|||
point.x = r.x + r.width / 2;
|
||||
point.y = r.x + r.height / 2;
|
||||
|
||||
MwDrawText(handle, &point, "test", text);
|
||||
MwDrawText(handle, &point, str, text);
|
||||
|
||||
MwLLFreeColor(text);
|
||||
MwLLFreeColor(base);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue