mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
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:
parent
acfbf19144
commit
d2acdc7620
4 changed files with 99 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue