fixed event handling and a lot of ID stuff OOPS
This commit is contained in:
@@ -31,9 +31,8 @@ namespace anm2ed::imgui
|
||||
{
|
||||
if (type == anm2::TRIGGER)
|
||||
{
|
||||
if (combo_negative_one_indexed(localize.get(BASIC_EVENT),
|
||||
frame ? &useFrame.eventID : &dummy_value_negative<int>(),
|
||||
document.event.labels) &&
|
||||
if (combo_id_mapped(localize.get(BASIC_EVENT), frame ? &useFrame.eventID : &dummy_value_negative<int>(),
|
||||
document.event.ids, document.event.labels) &&
|
||||
frame)
|
||||
DOCUMENT_EDIT(document, localize.get(EDIT_TRIGGER_EVENT), Document::FRAMES,
|
||||
frame->eventID = useFrame.eventID);
|
||||
@@ -64,8 +63,8 @@ namespace anm2ed::imgui
|
||||
for (auto [i, id] : std::views::enumerate(useFrame.soundIDs))
|
||||
{
|
||||
ImGui::PushID(i);
|
||||
if (combo_negative_one_indexed("##Sound", frame ? &id : &dummy_value_negative<int>(),
|
||||
document.sound.labels) &&
|
||||
if (combo_id_mapped("##Sound", frame ? &id : &dummy_value_negative<int>(), document.sound.ids,
|
||||
document.sound.labels) &&
|
||||
frame)
|
||||
DOCUMENT_EDIT(document, localize.get(EDIT_TRIGGER_SOUND), Document::FRAMES,
|
||||
frame->soundIDs[i] = id);
|
||||
|
||||
@@ -176,8 +176,8 @@ namespace anm2ed::imgui
|
||||
input_text_string(localize.get(BASIC_NAME), &layer.name);
|
||||
ImGui::SetItemTooltip("%s", localize.get(TOOLTIP_ITEM_NAME));
|
||||
|
||||
ImGui::Combo(localize.get(LABEL_SPRITESHEET), &layer.spritesheetID, document.spritesheet.labels.data(),
|
||||
(int)document.spritesheet.labels.size());
|
||||
combo_id_mapped(localize.get(LABEL_SPRITESHEET), &layer.spritesheetID, document.spritesheet.ids,
|
||||
document.spritesheet.labels);
|
||||
ImGui::SetItemTooltip("%s", localize.get(TOOLTIP_LAYER_SPRITESHEET));
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
@@ -1697,8 +1697,8 @@ namespace anm2ed::imgui
|
||||
ImGui::SetItemTooltip("%s", localize.get(TOOLTIP_ITEM_NAME));
|
||||
if (type == anm2::LAYER)
|
||||
{
|
||||
ImGui::Combo(localize.get(LABEL_SPRITESHEET), &addItemSpritesheetID, document.spritesheet.labels.data(),
|
||||
(int)document.spritesheet.labels.size());
|
||||
combo_id_mapped(localize.get(LABEL_SPRITESHEET), &addItemSpritesheetID, document.spritesheet.ids,
|
||||
document.spritesheet.labels);
|
||||
ImGui::SetItemTooltip("%s", localize.get(TOOLTIP_LAYER_SPRITESHEET));
|
||||
}
|
||||
else if (type == anm2::NULL_)
|
||||
|
||||
Reference in New Issue
Block a user