mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-07 16:54:50 +01:00
feat(editor): a map of Poland to pick a place on, shared by the scenery wizard and the terrain model
This commit is contained in:
@@ -10,6 +10,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#pragma once
|
||||
|
||||
#include "application/uilayer.h"
|
||||
#include "editor/editorGeoMap.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <future>
|
||||
@@ -28,40 +29,12 @@ class scenerywizard_panel : public ui_panel
|
||||
void render_contents() override;
|
||||
|
||||
private:
|
||||
struct map_result
|
||||
{
|
||||
glm::dvec2 low{0.0};
|
||||
glm::dvec2 high{0.0};
|
||||
int width{0};
|
||||
int height{0};
|
||||
std::vector<std::uint8_t> pixels;
|
||||
std::string error;
|
||||
};
|
||||
|
||||
void render_map(glm::vec2 const &Size);
|
||||
void render_form();
|
||||
void request_map(glm::vec2 const &Size);
|
||||
void upload_map();
|
||||
void pick(glm::dvec2 const &Point);
|
||||
bool create_scenery();
|
||||
|
||||
glm::dvec2 m_centre{515000.0, 460000.0};
|
||||
double m_scale{1000.0};
|
||||
bool m_fitted{false};
|
||||
double m_changed{0.0};
|
||||
bool m_dirty{true};
|
||||
glm::vec2 m_pressed{0.f};
|
||||
bool m_dragging{false};
|
||||
|
||||
std::future<map_result> m_request;
|
||||
unsigned int m_texture{0};
|
||||
glm::dvec2 m_image_low{0.0};
|
||||
glm::dvec2 m_image_high{0.0};
|
||||
std::string m_map_error;
|
||||
|
||||
bool m_picked{false};
|
||||
editor_map m_map;
|
||||
bool m_realistic{true};
|
||||
glm::dvec2 m_point{0.0};
|
||||
char m_filename[64]{};
|
||||
char m_title[128]{};
|
||||
char m_latlon[64]{};
|
||||
|
||||
Reference in New Issue
Block a user