mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-27 19:43:06 +00:00
better api for mouse
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@269 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -95,12 +95,14 @@ static void mouse_move(MwWidget handle) {
|
||||
}
|
||||
}
|
||||
|
||||
static void mouse_up(MwWidget handle) {
|
||||
static void mouse_up(MwWidget handle, void* ptr) {
|
||||
MwEntry e = handle->internal;
|
||||
int w = MwGetInteger(handle, MwNwidth);
|
||||
int h = MwGetInteger(handle, MwNheight);
|
||||
const char* str = MwGetText(handle, MwNtext);
|
||||
|
||||
if(((MwLLMouse*)ptr)->button != MwLLMouseLeft) return;
|
||||
|
||||
if(e->mouse.x >= (w - e->right)) {
|
||||
char s[512];
|
||||
if(e->mouse.y >= (h / 2)) {
|
||||
@@ -114,9 +116,11 @@ static void mouse_up(MwWidget handle) {
|
||||
MwForceRender(handle);
|
||||
}
|
||||
|
||||
static void mouse_down(MwWidget handle) {
|
||||
static void mouse_down(MwWidget handle, void* ptr) {
|
||||
MwEntry e = handle->internal;
|
||||
|
||||
if(((MwLLMouse*)ptr)->button != MwLLMouseLeft) return;
|
||||
|
||||
e->mouse = handle->mouse_point;
|
||||
|
||||
MwForceRender(handle);
|
||||
|
||||
Reference in New Issue
Block a user