[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:
parent
cc0b1c6238
commit
a6d85d6efe
@ -264,13 +264,26 @@ namespace Components
|
|||||||
Utils::Hook::Call<void()>(0x630AE0)();
|
Utils::Hook::Call<void()>(0x630AE0)();
|
||||||
|
|
||||||
const char* mapname = ArenaLength::NewArenas[reinterpret_cast<int*>(0x633E934)[num]].mapName;
|
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);
|
Dvar::Var("ui_mapname").set(mapname);
|
||||||
|
// this doesnt work for some reason
|
||||||
|
//Dvar::Var("ui_info_desc").set(description);
|
||||||
|
|
||||||
// Party_SetDisplayMapName
|
// Party_SetDisplayMapName
|
||||||
Utils::Hook::Call<void(const char*)>(0x503B50)(mapname);
|
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()
|
UIFeeder::UIFeeder()
|
||||||
{
|
{
|
||||||
// Get feeder item count
|
// Get feeder item count
|
||||||
@ -299,6 +312,7 @@ namespace Components
|
|||||||
|
|
||||||
// correct feeder 4
|
// correct feeder 4
|
||||||
Utils::Hook(0x4C260E, UIFeeder::ApplyMapFeeder, HOOK_CALL).install()->quick();
|
Utils::Hook(0x4C260E, UIFeeder::ApplyMapFeeder, HOOK_CALL).install()->quick();
|
||||||
|
Utils::Hook(0x4E304D, UIFeeder::DoubleClickMapFeeder, HOOK_CALL).install()->quick();
|
||||||
|
|
||||||
// Fix feeder focus
|
// Fix feeder focus
|
||||||
//Utils::Hook::Nop(0x63B1DD, 2); // Flag 4 check (WINDOW_VISIBLE)
|
//Utils::Hook::Nop(0x63B1DD, 2); // Flag 4 check (WINDOW_VISIBLE)
|
||||||
|
@ -54,5 +54,6 @@ namespace Components
|
|||||||
static std::unordered_map<float, Callbacks> Feeders;
|
static std::unordered_map<float, Callbacks> Feeders;
|
||||||
|
|
||||||
static void ApplyMapFeeder(Game::dvar_t* dvar, int num);
|
static void ApplyMapFeeder(Game::dvar_t* dvar, int num);
|
||||||
|
static void DoubleClickMapFeeder(const char* dvar_name, const char* name);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user