Implements ImGui Checkbox to enable or disable color-coded-keys.

This commit is contained in:
Christopher Leggett 2022-08-24 00:07:16 -04:00
parent c7b998b33b
commit 6561073c7b
No known key found for this signature in database
GPG Key ID: 7093AE5FF7037D79
3 changed files with 5 additions and 2 deletions

View File

@ -1903,6 +1903,9 @@ namespace SohImGui {
"(medallions/stones/songs). Note that these fanfares\n"
"are longer than usual."
);
PaddedEnhancementCheckbox("Key Colors Match Dungeon", "gRandoMatchKeyColors", true, false);
Tooltip(
"Matches the color of small keys and boss keys to the dungeon they belong to. This helps identify keys from afar and adds a little bit of flair.");
ImGui::EndMenu();
}

View File

@ -400,7 +400,7 @@ void GetItem_Draw(GlobalContext* globalCtx, s16 drawId) {
* Uses the Custom Draw Function if it exists, or just calls `GetItem_Draw`
*/
void GetItemEntry_Draw(GlobalContext* globalCtx, GetItemEntry getItemEntry) {
if (getItemEntry.drawFunc != NULL) {
if (getItemEntry.drawFunc != NULL && CVar_GetS32("gRandoMatchKeyColors", 0)) {
getItemEntry.drawFunc(globalCtx, &getItemEntry);
} else {
GetItem_Draw(globalCtx, getItemEntry.gid);

View File

@ -1170,7 +1170,7 @@ void Player_DrawGetItemImpl(GlobalContext* globalCtx, Player* this, Vec3f* refPo
Matrix_RotateZYX(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
if(this->getItemEntry.drawFunc != NULL) {
if (this->getItemEntry.drawFunc != NULL && CVar_GetS32("gRandoMatchKeyColors", 0)) {
this->getItemEntry.drawFunc(globalCtx, &this->getItemEntry);
} else {
GetItem_Draw(globalCtx, drawIdPlusOne - 1);