git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@248 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-10 09:17:16 +00:00
parent 3e2d129b93
commit 9b660637a0
3 changed files with 8 additions and 1 deletions

View File

@@ -103,6 +103,7 @@ struct _MwMenu {
struct _MwEntry {
int cursor;
int right;
};
#define MwCursorDataHeight 16

View File

@@ -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);

View File

@@ -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);