mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
- "Create + Generate" was setting a flag but never calling generateCompleteZone() - Now properly chains: create terrain → run full procedural pipeline (noise → smooth → normals → height paint → slope paint → detail → water → beaches) - Uses generateAfterCreate_ flag to defer generation until after terrain is created
77 lines
2 KiB
C++
77 lines
2 KiB
C++
#pragma once
|
|
|
|
#include "terrain_biomes.hpp"
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace wowee {
|
|
namespace editor {
|
|
|
|
class EditorApp;
|
|
|
|
enum class PaintMode { Paint, Erase, ReplaceBase };
|
|
|
|
class EditorUI {
|
|
public:
|
|
EditorUI();
|
|
|
|
void render(EditorApp& app);
|
|
void processActions(EditorApp& app);
|
|
void openNewTerrainDialog() { showNewDialog_ = true; }
|
|
void openLoadDialog() { showLoadDialog_ = true; }
|
|
|
|
PaintMode getPaintMode() const { return paintMode_; }
|
|
|
|
private:
|
|
void renderMenuBar(EditorApp& app);
|
|
void renderToolbar(EditorApp& app);
|
|
void renderNewTerrainDialog(EditorApp& app);
|
|
void renderLoadDialog(EditorApp& app);
|
|
void renderSaveDialog(EditorApp& app);
|
|
void renderBrushPanel(EditorApp& app);
|
|
void renderTexturePaintPanel(EditorApp& app);
|
|
void renderObjectPanel(EditorApp& app);
|
|
void renderWaterPanel(EditorApp& app);
|
|
void renderNpcPanel(EditorApp& app);
|
|
void renderQuestPanel(EditorApp& app);
|
|
void renderContextMenu(EditorApp& app);
|
|
void renderMinimap(EditorApp& app);
|
|
void renderPropertiesPanel(EditorApp& app);
|
|
void renderStatusBar(EditorApp& app);
|
|
|
|
bool showNewDialog_ = false;
|
|
bool showLoadDialog_ = false;
|
|
bool showSaveDialog_ = false;
|
|
bool showHelp_ = false;
|
|
bool showAbout_ = false;
|
|
bool generateAfterCreate_ = false;
|
|
|
|
char newMapNameBuf_[256] = "CustomZone";
|
|
int newTileX_ = 32;
|
|
int newTileY_ = 32;
|
|
float newBaseHeight_ = 100.0f;
|
|
int newBiomeIdx_ = 0;
|
|
bool newRequested_ = false;
|
|
|
|
char loadMapNameBuf_[256] = "Azeroth";
|
|
int loadTileX_ = 32;
|
|
int loadTileY_ = 48;
|
|
bool loadRequested_ = false;
|
|
|
|
char savePathBuf_[512] = "";
|
|
|
|
// Paint panel
|
|
PaintMode paintMode_ = PaintMode::Paint;
|
|
char texFilterBuf_[128] = "";
|
|
int texDirIdx_ = -1; // -1 = all
|
|
std::string selectedTexture_;
|
|
|
|
// Object panel
|
|
char objFilterBuf_[128] = "";
|
|
int objDirIdx_ = -1;
|
|
bool showM2s_ = true;
|
|
bool showWMOs_ = true;
|
|
};
|
|
|
|
} // namespace editor
|
|
} // namespace wowee
|