mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2026-04-29 05:31:47 +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();
|
||||
// Check if unfocused or current focus isn't either prompt button
|
||||
if (
|
||||
focused == nullptr || (
|
||||
focused != current_document->GetElementById("prompt__cancel-button") &&
|
||||
focused != current_document->GetElementById("prompt__confirm-button")
|
||||
)
|
||||
) {
|
||||
ctx->shouldFocus = true;
|
||||
if (mouse_is_active == false) {
|
||||
if (
|
||||
focused == nullptr || (
|
||||
focused != current_document->GetElementById("prompt__cancel-button") &&
|
||||
focused != current_document->GetElementById("prompt__confirm-button")
|
||||
)
|
||||
) {
|
||||
ctx->shouldFocus = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ctx->shouldFocus) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue