mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
Update actor list when changing scene
This commit is contained in:
parent
6f86c11f45
commit
5c29dbfbca
1 changed files with 5 additions and 0 deletions
|
@ -1065,6 +1065,7 @@ void DrawActorViewer(bool& open) {
|
|||
static ActorInfo newActor = {0,0, {0, 0, 0}, {0, 0, 0}};
|
||||
static ActorOverlay* dispOverlay;
|
||||
static std::string filler = "Please select";
|
||||
static u16 lastSceneId = 0;
|
||||
|
||||
if (ImGui::BeginCombo("Actor Type", acMapping[category].c_str())) {
|
||||
for (int i = 0; i < acMapping.size(); i++) {
|
||||
|
@ -1078,6 +1079,10 @@ void DrawActorViewer(bool& open) {
|
|||
}
|
||||
|
||||
if (ImGui::BeginCombo("Actor", filler.c_str())) {
|
||||
if (gGlobalCtx != nullptr && lastSceneId != gGlobalCtx->sceneNum) {
|
||||
list = PopulateActorDropdown(category, list);
|
||||
lastSceneId = gGlobalCtx->sceneNum;
|
||||
}
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
std::string label = std::to_string(i) + ": " + list[i]->overlayEntry->name;
|
||||
std::string description = GetActorDescription(list[i]->id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue