mirror of https://gitlab.com/nakst/essence
bugfixes: use EsMouseIsLeftHeld to determine numeric textbox cursor; use RIGHT_CLICK to spawn textbox menu; use windowWidth/windowHeight for size alternatives
This commit is contained in:
parent
8374b8d876
commit
40c5293d4b
|
@ -7814,8 +7814,8 @@ void UIProcessWindowManagerMessage(EsWindow *window, EsMessage *message, Process
|
||||||
|
|
||||||
for (uintptr_t i = 0; i < window->sizeAlternatives.Length(); i++) {
|
for (uintptr_t i = 0; i < window->sizeAlternatives.Length(); i++) {
|
||||||
SizeAlternative *alternative = &window->sizeAlternatives[i];
|
SizeAlternative *alternative = &window->sizeAlternatives[i];
|
||||||
bool belowThreshold = window->width < alternative->widthThreshold * theming.scale
|
bool belowThreshold = window->windowWidth < alternative->widthThreshold * theming.scale
|
||||||
|| window->height < alternative->heightThreshold * theming.scale;
|
|| window->windowHeight < alternative->heightThreshold * theming.scale;
|
||||||
EsElementSetHidden(alternative->small, !belowThreshold);
|
EsElementSetHidden(alternative->small, !belowThreshold);
|
||||||
EsElementSetHidden(alternative->big, belowThreshold);
|
EsElementSetHidden(alternative->big, belowThreshold);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1791,7 +1791,7 @@ int ProcessTextboxMessage(EsElement *element, EsMessage *message) {
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else if (message->type == ES_MSG_MOUSE_RIGHT_UP) {
|
} else if (message->type == ES_MSG_MOUSE_RIGHT_CLICK) {
|
||||||
textbox->inRightClickDrag = false;
|
textbox->inRightClickDrag = false;
|
||||||
EsMenu *menu = EsMenuCreate(textbox, ES_MENU_AT_CURSOR);
|
EsMenu *menu = EsMenuCreate(textbox, ES_MENU_AT_CURSOR);
|
||||||
if (!menu) return ES_HANDLED;
|
if (!menu) return ES_HANDLED;
|
||||||
|
@ -1978,7 +1978,7 @@ void EsTextboxUseNumberOverlay(EsTextbox *textbox, bool defaultBehaviour) {
|
||||||
EsMessageSend(textbox, &m);
|
EsMessageSend(textbox, &m);
|
||||||
}
|
}
|
||||||
} else if (message->type == ES_MSG_GET_CURSOR) {
|
} else if (message->type == ES_MSG_GET_CURSOR) {
|
||||||
if (gui.draggingStarted) {
|
if (EsMouseIsLeftHeld()) {
|
||||||
message->cursorStyle = ES_CURSOR_BLANK;
|
message->cursorStyle = ES_CURSOR_BLANK;
|
||||||
} else if (~textbox->flags & ES_ELEMENT_DISABLED) {
|
} else if (~textbox->flags & ES_ELEMENT_DISABLED) {
|
||||||
message->cursorStyle = ES_CURSOR_RESIZE_VERTICAL;
|
message->cursorStyle = ES_CURSOR_RESIZE_VERTICAL;
|
||||||
|
|
Loading…
Reference in New Issue