[UIFeeder] Feeder 4 should act as it should now, except for some reason it doesn't set the description dear correctly

This commit is contained in:
TheApadayo 2017-01-20 22:48:52 -05:00
parent cc0b1c6238
commit a6d85d6efe
2 changed files with 15 additions and 0 deletions

View File

@ -264,13 +264,26 @@ namespace Components
Utils::Hook::Call<void()>(0x630AE0)();
const char* mapname = ArenaLength::NewArenas[reinterpret_cast<int*>(0x633E934)[num]].mapName;
const char* description = ArenaLength::NewArenas[reinterpret_cast<int*>(0x633E934)[num]].description;
Dvar::Var("ui_mapname").set(mapname);
// this doesnt work for some reason
//Dvar::Var("ui_info_desc").set(description);
// Party_SetDisplayMapName
Utils::Hook::Call<void(const char*)>(0x503B50)(mapname);
}
void UIFeeder::DoubleClickMapFeeder(const char* dvar_name, const char* name)
{
Dvar::Var(dvar_name).set(name);
// Party_SetDisplayMapName
Utils::Hook::Call<void(const char*)>(0x503B50)(name);
Command::Execute("closemenu settings_map", false);
}
UIFeeder::UIFeeder()
{
// Get feeder item count
@ -299,6 +312,7 @@ namespace Components
// correct feeder 4
Utils::Hook(0x4C260E, UIFeeder::ApplyMapFeeder, HOOK_CALL).install()->quick();
Utils::Hook(0x4E304D, UIFeeder::DoubleClickMapFeeder, HOOK_CALL).install()->quick();
// Fix feeder focus
//Utils::Hook::Nop(0x63B1DD, 2); // Flag 4 check (WINDOW_VISIBLE)

View File

@ -54,5 +54,6 @@ namespace Components
static std::unordered_map<float, Callbacks> Feeders;
static void ApplyMapFeeder(Game::dvar_t* dvar, int num);
static void DoubleClickMapFeeder(const char* dvar_name, const char* name);
};
}