Decompile 2 functions in Source/UI/Window/InputFocus.cpp, Source/UI/Window/UIWindowMgr.h, ...
Batch #14868 by SapitoSucio: 1 byte-identical, 1 confirmed by peer review. - fn_17261 UIWindowMgr::SetPressedWindowRoot: logic confirmed by peer review - fn_12582 UINewChatWnd::ToggleInput: byte-identical Peer-reviewed-by: ragnarok-clanker, codeplay, NYD Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
f42c9f1149
commit
ce7abf8a81
4 changed files with 17 additions and 5 deletions
|
|
@ -189,7 +189,7 @@ void UINewChatWnd::ToggleInput() {
|
|||
if (strlen(this->m_chatEdit->Text()) == 0) {
|
||||
g_windowMgr.inputSuggestionsEnabled = false;
|
||||
this->ApplyInputLayout();
|
||||
SetPressedWindowRoot(g_windowMgr.window_4F1D4, nullptr);
|
||||
g_windowMgr.SetPressedWindowRoot(nullptr);
|
||||
}
|
||||
} else {
|
||||
g_windowMgr.inputSuggestionsEnabled = true;
|
||||
|
|
@ -201,7 +201,7 @@ void UINewChatWnd::ToggleInput() {
|
|||
this->ResizeRows(static_cast<int>(this->geometry.unknown_0030));
|
||||
}
|
||||
|
||||
SetPressedWindowRoot(g_windowMgr.window_4F1D4, this->m_inputEdit);
|
||||
g_windowMgr.SetPressedWindowRoot(this->m_inputEdit);
|
||||
}
|
||||
|
||||
if (UIItemTagOnChat* tags = static_cast<UIChatEditCtrl*>(this->m_chatEdit)->unknown_0144) {
|
||||
|
|
|
|||
|
|
@ -115,8 +115,19 @@ void UIWindowMgr::RefreshFocus(UIWindow* const& excludedRoot) {
|
|||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AA9E60
|
||||
// FUNCTION: fn_17261
|
||||
// INLINED
|
||||
void SetPressedWindowRoot(UIWindow*& pressedRoot, UIWindow* window) {
|
||||
pressedRoot = window ? window->Root() : nullptr;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AA9E60
|
||||
// FUNCTION: fn_17261
|
||||
void UIWindowMgr::SetPressedWindowRoot(UIWindow* window) {
|
||||
UIWindow* root = window;
|
||||
if (root != nullptr) {
|
||||
while (root->parent != nullptr) {
|
||||
root = root->parent;
|
||||
}
|
||||
}
|
||||
this->window_4F1D4 = root;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -564,6 +564,7 @@ public:
|
|||
bool IsLastFocus(UIWindow* value);
|
||||
void FocusPrevious();
|
||||
void RefreshFocus(UIWindow* const& excludedRoot);
|
||||
void SetPressedWindowRoot(UIWindow* window);
|
||||
bool IsHoverOnWindow01C8Button();
|
||||
void SelectWhisperName(const char* name);
|
||||
void AddWhisperName(const char* name);
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ int UIWindowMgr::ProcessMouse() {
|
|||
}
|
||||
|
||||
if (g_mouse.buttons[0] == 1) {
|
||||
SetPressedWindowRoot(this->window_4F1D4, window);
|
||||
::SetPressedWindowRoot(this->window_4F1D4, window);
|
||||
}
|
||||
|
||||
if (window) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue