map info editor

This commit is contained in:
Hunter 2023-05-27 19:50:03 -04:00
parent b7384adc5e
commit d2edce5f89
3 changed files with 25 additions and 3 deletions

View file

@ -4,8 +4,8 @@ Size=400,400
Collapsed=0 Collapsed=0
[Window][Phoenix Map Editor] [Window][Phoenix Map Editor]
Pos=732,455 Pos=833,459
Size=773,153 Size=773,184
Collapsed=0 Collapsed=0
[Window][Map Editor Tools] [Window][Map Editor Tools]
@ -13,3 +13,8 @@ Pos=860,128
Size=357,247 Size=357,247
Collapsed=0 Collapsed=0
[Window][Map Information Editor]
Pos=838,656
Size=588,347
Collapsed=0

View file

@ -2,7 +2,7 @@ MAPNAME ph_exampleMap
MAPVERS b1 MAPVERS b1
MAPAUTH JohnDoe MAPAUTH JohnDoe
MAPSIZE 20x20 MAPSIZE 20x20
MAPSCAL 3x3 MAPSCAL 6x6
MAPSPWN 499,666 MAPSPWN 499,666
MAP MAP
TILE WALL TILE WALL

View file

@ -195,6 +195,23 @@ void runMapEditor() {
} }
ImGui::End(); ImGui::End();
ImGui::Begin("Map Information Editor");
ImGui::Text("WARNING! Changing map size and scale after you build your "
"map will break it!");
ImGui::Text("NOTE! Map properties save on map save");
ImGui::NewLine();
ImGui::Separator();
ImGui::NewLine();
ImGui::InputText("Map name", &editorState.currentMap.mapName);
ImGui::InputText("Map version", &editorState.currentMap.mapVersion);
ImGui::InputText("Map author", &editorState.currentMap.mapAuthor);
ImGui::InputInt("Map scale", &editorState.currentMap.mapScaleX);
ImGui::InputInt("Map scale (Y)", &editorState.currentMap.mapScaleY);
ImGui::InputInt("Map width", &editorState.currentMap.mapWidth);
ImGui::InputInt("Map height", &editorState.currentMap.mapHeight);
ImGui::End();
} }
// Rendering // Rendering