mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 16:10:50 +00:00
smooth movement
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@587 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -112,7 +112,7 @@ static void vscroll_changed(MwWidget handle, void* user, void* call) {
|
||||
(void)user;
|
||||
(void)call;
|
||||
|
||||
MwForceRender(lb->frame);
|
||||
lb->changed = 1;
|
||||
}
|
||||
|
||||
static void frame_mouse_down(MwWidget handle, void* user, void* call) {
|
||||
@@ -312,6 +312,7 @@ static int create(MwWidget handle) {
|
||||
lb->selected = -1;
|
||||
lb->click_time = 0;
|
||||
lb->width = NULL;
|
||||
lb->changed = 0;
|
||||
|
||||
MwSetInteger(handle, MwNleftPadding, 0);
|
||||
MwSetInteger(handle, MwNhasHeading, 0);
|
||||
@@ -505,6 +506,15 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v
|
||||
}
|
||||
}
|
||||
|
||||
static void tick(MwWidget handle){
|
||||
MwListBox lb = handle->internal;
|
||||
|
||||
if(lb->changed){
|
||||
lb->changed = 0;
|
||||
MwForceRender(lb->frame);
|
||||
}
|
||||
}
|
||||
|
||||
MwClassRec MwListBoxClassRec = {
|
||||
create, /* create */
|
||||
destroy, /* destroy */
|
||||
@@ -517,7 +527,7 @@ MwClassRec MwListBoxClassRec = {
|
||||
NULL, /* mouse_down */
|
||||
NULL, /* key */
|
||||
func_handler, /* execute */
|
||||
NULL,
|
||||
tick, /* tick */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL};
|
||||
|
||||
Reference in New Issue
Block a user