feat(editor): zone audio panel scans Data dir for music + ambience files

The Zone Audio panel previously only offered five hardcoded preset
paths. Replaced with a recursive directory walk of <data>/Sound/
Music and <data>/Sound/Ambience for any .mp3/.wav/.ogg files.
Results cached after the first scan; a Refresh button forces a
rebuild for when the user drops new files in.

Two ImGui combos populate from the scan:
- "Music File"     — picks from Sound/Music
- "Ambience File"  — picks from Sound/Ambience

Each combo has a "(none)" option to clear. Selecting an entry
updates both the manifest field and the existing manual text input
buffer below, so users can fine-tune the path after picking from
the combo.

EditorApp gets a public getDataPath() so the UI can reach the
configured asset root without exposing the rest of the private
state.

Audio playback preview is the remaining piece — needs SDL_mixer
or similar wired into the editor; not in this commit.
This commit is contained in:
Kelsi 2026-05-07 12:43:58 -07:00
parent 0cb6a4c536
commit 7a624adada
2 changed files with 83 additions and 0 deletions

View file

@ -186,6 +186,9 @@ private:
float waterHeight_ = 100.0f;
uint16_t waterType_ = 0;
std::string dataPath_;
public:
const std::string& getDataPath() const { return dataPath_; }
private:
std::string loadedMap_;
int loadedTileX_ = -1;