feat(editor): texture eyedropper, WOT/WHM preference loading

- Texture eyedropper: pickTextureAt() samples dominant texture at world
  position by reading chunk alpha maps. Alt+Click in paint mode or
  click the Eyedropper button to activate
- loadADT now checks custom_zones/ and output/ for WOT/WHM open format
  files first, falling back to ADT binary only if not found
- Fix unused variable warning in scatterPatches
- Document Alt+Click in help panel
This commit is contained in:
Kelsi 2026-05-05 13:39:53 -07:00
parent acfbf19144
commit d2acdc7620
4 changed files with 99 additions and 16 deletions

View file

@ -477,6 +477,7 @@ void EditorUI::renderMenuBar(EditorApp& app) {
ImGui::Text("Quick Actions:");
ImGui::BulletText("Ctrl+N — new terrain");
ImGui::BulletText("Ctrl+O — load map tile");
ImGui::BulletText("Alt+Click — eyedropper (paint mode)");
ImGui::BulletText("Middle-drag — orbit camera");
ImGui::Separator();
ImGui::Text("View:");
@ -1108,6 +1109,17 @@ void EditorUI::renderTexturePaintPanel(EditorApp& app) {
if (ImGui::Combo("Paint Mode", &pm, paintModes, 3))
paintMode_ = static_cast<PaintMode>(pm);
if (ImGui::Button("Eyedropper (Alt+Click)")) {
auto& brush = app.getTerrainEditor().brush();
if (brush.isActive()) {
std::string picked = app.getTexturePainter().pickTextureAt(brush.getPosition());
if (!picked.empty()) {
app.getTexturePainter().setActiveTexture(picked);
app.showToast("Picked: " + picked.substr(picked.rfind('\\') + 1));
}
}
}
ImGui::Separator();
// Directory filter