17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 03:59:19 +02:00

feat(editor): fields of work in a row of their own over the toolbar (surroundings, tracks, roads, terrain), twice as high, with bigger bold text, and the tools of the one chosen in the toolbar under it: the edit modes of the node bank, the track tools in groups with the vehicle and the structure gauge, the road tools with what the place tool puts, the terrain tools (sculpt, smooth, chunks, orthophoto); the tool options window keeps the settings of the tool; the node bank shows a big preview of the entry pointed at for a moment, with its model and skin; the green colours by default again; Polish translation

This commit is contained in:
2026-10-09 00:42:17 +02:00
parent f184ce7a6a
commit 791d5d052c
15 changed files with 407 additions and 143 deletions

View File

@@ -35,6 +35,8 @@ std::string preview_path(std::string Model, std::string const &Skin);
// path of the image of a node bank entry ("node ... model <x> <y> <z> <angle> <model> <skin> ..."), without the extension;
// empty if the entry isn't a model
std::string entry_preview_path(std::string const &Entry);
// model and skin of a node bank entry, as above. returns: false if the entry isn't a model
bool entry_model(std::string const &Entry, std::string &Model, std::string &Skin);
// name given to another entry with the same model and skin (other lights or angles): ~2, ~3... added in the order of the
// node bank, after the names already Taken
std::string variant(std::string const &Path, std::set<std::string> const &Taken);
@@ -44,7 +46,8 @@ std::string variant(std::string const &Path, std::set<std::string> const &Taken)
class image_cache
{
public:
image_cache();
// Size: pixels of the longer side of the images, 0 for the size of the cards of the node bank; Limit: images kept at most
explicit image_cache(int const Size = 0, std::size_t const Limit = 512);
~image_cache();
image_cache(image_cache const &) = delete;
image_cache &operator=(image_cache const &) = delete;
@@ -81,6 +84,7 @@ class image_cache
std::unordered_map<std::string, entry> m_entries;
std::uint64_t m_frame{0};
int m_size{128}; // pixels of the longer side of the images
std::size_t m_limit{512};
// shared with the thread
std::mutex m_lock;
std::condition_variable m_wake;