mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2026-05-08 10:01:38 +00:00
only force prompt focus if mouse is not active
This commit is contained in:
parent
78fcab1822
commit
e8b54842f2
1 changed files with 9 additions and 7 deletions
|
|
@ -1055,13 +1055,15 @@ struct UIContext {
|
||||||
|
|
||||||
Rml::Element* focused = current_document->GetFocusLeafNode();
|
Rml::Element* focused = current_document->GetFocusLeafNode();
|
||||||
// Check if unfocused or current focus isn't either prompt button
|
// Check if unfocused or current focus isn't either prompt button
|
||||||
if (
|
if (mouse_is_active == false) {
|
||||||
focused == nullptr || (
|
if (
|
||||||
focused != current_document->GetElementById("prompt__cancel-button") &&
|
focused == nullptr || (
|
||||||
focused != current_document->GetElementById("prompt__confirm-button")
|
focused != current_document->GetElementById("prompt__cancel-button") &&
|
||||||
)
|
focused != current_document->GetElementById("prompt__confirm-button")
|
||||||
) {
|
)
|
||||||
ctx->shouldFocus = true;
|
) {
|
||||||
|
ctx->shouldFocus = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ctx->shouldFocus) {
|
if (!ctx->shouldFocus) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue