Batch #17225 by ragnarok-clanker: forced by an admin (0 lower score(s), 1 changed function(s)); checked with 75 compiled unit(s), including every includer of Source/Utility/StdIntVectorCopy.h, Source/Utility/StdStringConcat.h, Source/Utility/StdStringCopy.h, Source/Utility/StdStringInsert.h, Source/Utility/StdStringMoveAssign.h, Source/Utility/StdStringVectorDestroy.h, Source/Utility/StdTraitsEqual.h, Source/Utility/StdTraitsFind.h, Source/Utility/StdWindowListEmplace.h.
37 lines
1 KiB
C++
37 lines
1 KiB
C++
#include "Contents/Navigation/NavigationManager.h"
|
|
#include "UI/Navigation/NavigationLink.h"
|
|
#include "UI/Buttons/UINaviLinkButton.h"
|
|
|
|
#include "Utility/StdStringCopy.h"
|
|
#include "Utility/StdTraitsFind.h"
|
|
|
|
// OFFSET: 0x0086DF60
|
|
// FUNCTION: fn_11062
|
|
UINaviLinkButton::UINaviLinkButton() : UITextButton() {
|
|
}
|
|
|
|
UINaviLinkButton::~UINaviLinkButton() = default;
|
|
|
|
// OFFSET: 0x00893050
|
|
// FUNCTION: fn_11503
|
|
void UINaviLinkButton::OnLBtnDown(int, int) {
|
|
const auto end = this->link.find(g_naviLinkTagEnd);
|
|
|
|
if (end == std::string::npos) {
|
|
return;
|
|
}
|
|
|
|
const auto start = end - 4;
|
|
const std::string coordinates = this->link.substr(start);
|
|
const int x = DecodeNavigationNumber(coordinates.substr(0, 2));
|
|
const int y = DecodeNavigationNumber(coordinates.substr(2, 2));
|
|
std::string map = this->link.substr(0, start);
|
|
|
|
if (map.find(g_naviLinkTagBegin) != std::string::npos) {
|
|
map = map.substr(std::strlen(g_naviLinkTagBegin.c_str()));
|
|
}
|
|
|
|
if (!map.empty()) {
|
|
g_navigationManager.SetDestinationMap(map, x, y);
|
|
}
|
|
}
|