Decompile 3 functions in Source/UI/UIMacroUserInfoWnd.cpp
Batch #14652 by Yommy: 0 byte-identical, 3 confirmed by peer review. - fn_09841 UIMacroReporterWnd::AddActorRow: logic confirmed by peer review - fn_09843 UIMacroReporterWnd::ValidateNames: logic confirmed by peer review - fn_09854 UIMacroReporterWnd::UpdateScrollBar: logic confirmed by peer review Peer-reviewed-by: secret, Toshiro, raiken 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
8726061806
commit
3b02da75dc
1 changed files with 8 additions and 6 deletions
|
|
@ -110,8 +110,8 @@ struct AccessibleTextButton : public UITextButton {
|
|||
// OFFSET: 0x007EF430
|
||||
// FUNCTION: fn_09841
|
||||
void UIMacroReporterWnd::AddActorRow(int aid, std::string name) {
|
||||
for (std::size_t i = 0; i < this->m_rows.size(); ++i) {
|
||||
if (this->m_rows[i].second->geometry.id == aid) {
|
||||
for (const auto& row : this->m_rows) {
|
||||
if (row.second->geometry.id == aid) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -310,9 +310,9 @@ void UIMacroReporterWnd::UpdateScrollBar() {
|
|||
this->m_scrollable = maximum > 0;
|
||||
if (maximum < 1) {
|
||||
this->m_firstRow = 0;
|
||||
this->m_scrollBar->SetRange(0, this->m_visibleRows, count);
|
||||
this->m_scrollBar->SetRange(0, this->m_visibleRows, static_cast<int>(this->m_rows.size()));
|
||||
} else {
|
||||
this->m_scrollBar->SetRange(maximum, this->m_visibleRows, count);
|
||||
this->m_scrollBar->SetRange(maximum, this->m_visibleRows, static_cast<int>(this->m_rows.size()));
|
||||
if (this->m_firstRow < 0) {
|
||||
this->m_firstRow = 0;
|
||||
this->m_scrollBar->SetPosition(0);
|
||||
|
|
@ -340,8 +340,10 @@ bool UIMacroReporterWnd::ValidateNames(unsigned char notify) {
|
|||
continue;
|
||||
}
|
||||
|
||||
std::string displayName = g_mapInfoMgr->GetDisplayName(name + ".rsw");
|
||||
if (displayName == LookupMessage(187)) {
|
||||
name += ".rsw";
|
||||
const char* displayName = g_session.GetMapDisplayName(name.c_str());
|
||||
const std::string unknownMap = LookupMessage(187);
|
||||
if (unknownMap == displayName) {
|
||||
if (notify == 1) {
|
||||
g_windowMgr.SendNotice(
|
||||
1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue