mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 16:10:50 +00:00
wip
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@248 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -103,6 +103,7 @@ struct _MwMenu {
|
||||
|
||||
struct _MwEntry {
|
||||
int cursor;
|
||||
int right;
|
||||
};
|
||||
|
||||
#define MwCursorDataHeight 16
|
||||
|
||||
@@ -28,7 +28,7 @@ static void draw(MwWidget handle) {
|
||||
|
||||
r.x = 0;
|
||||
r.y = 0;
|
||||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.width = MwGetInteger(handle, MwNwidth) - t->right;
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
MwDrawFrame(handle, &r, base, (handle->pressed || MwGetInteger(handle, MwNchecked)) ? 1 : 0);
|
||||
|
||||
@@ -3,9 +3,13 @@
|
||||
|
||||
static int create(MwWidget handle) {
|
||||
int st;
|
||||
MwEntry e;
|
||||
|
||||
if((st = MwEntryClass->create(handle)) != 0) return st;
|
||||
|
||||
e = handle->internal;
|
||||
e->right = 32;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -29,6 +33,8 @@ static void key(MwWidget handle, int code) {
|
||||
ok = 1;
|
||||
} else if(code == '.' && strchr(str, (int)'.') == NULL) {
|
||||
ok = 1;
|
||||
}else if(code == MwLLKeyBackSpace || code == MwLLKeyLeft || code == MwLLKeyRight){
|
||||
ok = 1;
|
||||
}
|
||||
|
||||
if(ok) MwEntryClass->key(handle, code);
|
||||
|
||||
Reference in New Issue
Block a user