Implement simple notifications system (#816)

* Implement simple notifications system

* Remove demoWindow call

* Fix initializer order
This commit is contained in:
Garrett Cox
2024-11-02 15:44:21 -05:00
committed by GitHub
parent 50bc007d46
commit 0966633d2a
8 changed files with 253 additions and 21 deletions
+1 -18
View File
@@ -1,6 +1,7 @@
#include "SaveEditor.h"
#include "2s2h/BenGui/UIWidgets.hpp"
#include "2s2h/GameInteractor/GameInteractor.h"
#include "2s2h/BenGui/Notification.h"
#include "interface/icon_item_dungeon_static/icon_item_dungeon_static.h"
#include "archives/icon_item_24_static/icon_item_24_static_yar.h"
@@ -2011,24 +2012,6 @@ void SaveEditorWindow::DrawElement() {
}
}
const char* textureLoad[8] = { gDungeonStrayFairyWoodfallIconTex,
gDungeonStrayFairySnowheadIconTex,
gDungeonStrayFairyGreatBayIconTex,
gDungeonStrayFairyStoneTowerIconTex,
gQuestIconDungeonMapTex,
gQuestIconCompassTex,
gQuestIconSmallKeyTex,
gQuestIconBossKeyTex };
void SaveEditorWindow::InitElement() {
initSafeItemsForInventorySlot();
for (TexturePtr entry : gItemIcons) {
const char* path = static_cast<const char*>(entry);
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(path, path, ImVec4(1, 1, 1, 1));
}
for (int i = 0; i <= 7; i++) {
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(textureLoad[i], textureLoad[i],
ImVec4(1, 1, 1, 1));
}
}