2025-12-25 17:18:28 +03:00
|
|
|
#pragma once
|
|
|
|
|
#include <unordered_set>
|
|
|
|
|
#include <Helpers/NetworkingObjects/NetObjOrderedList.hpp>
|
|
|
|
|
#include "../../GUIStuff/Elements/TreeListing.hpp"
|
|
|
|
|
#include "DrawingProgramLayerListItem.hpp"
|
2026-01-04 11:37:38 +03:00
|
|
|
#include "SerializedBlendMode.hpp"
|
2025-12-25 17:18:28 +03:00
|
|
|
|
|
|
|
|
class World;
|
|
|
|
|
class DrawingProgramLayerManager;
|
|
|
|
|
|
|
|
|
|
class DrawingProgramLayerManagerGUI {
|
|
|
|
|
public:
|
|
|
|
|
DrawingProgramLayerManagerGUI(DrawingProgramLayerManager& layerManager);
|
|
|
|
|
void refresh_gui_data();
|
2026-01-07 12:03:59 +03:00
|
|
|
void setup_list_gui(const char* id, bool& hoveringOverDropdown);
|
2025-12-25 17:18:28 +03:00
|
|
|
private:
|
2026-01-04 11:37:38 +03:00
|
|
|
std::optional<std::pair<NetworkingObjects::NetObjID, NetworkingObjects::NetObjOrderedListIterator<DrawingProgramLayerListItem>>> try_to_create_in_proper_position(DrawingProgramLayerListItem* newItem);
|
|
|
|
|
std::pair<NetworkingObjects::NetObjID, NetworkingObjects::NetObjOrderedListIterator<DrawingProgramLayerListItem>> create_in_proper_position(DrawingProgramLayerListItem* newItem);
|
|
|
|
|
NetworkingObjects::NetObjOrderedListIterator<DrawingProgramLayerListItem> create_layer(DrawingProgramLayerListItem* newItem);
|
|
|
|
|
void remove_layer(const NetworkingObjects::NetObjID& parentID, const NetworkingObjects::NetObjID& objectID);
|
|
|
|
|
void editing_layer_check();
|
2025-12-25 17:18:28 +03:00
|
|
|
|
|
|
|
|
std::unordered_set<NetworkingObjects::NetObjID> oldSelection;
|
|
|
|
|
std::string nameToEdit;
|
|
|
|
|
std::string nameForNew;
|
|
|
|
|
float alphaValToEdit = 0.0f;
|
2025-12-25 19:37:41 +03:00
|
|
|
size_t blendModeValToEdit = 0;
|
2025-12-25 17:18:28 +03:00
|
|
|
|
2026-01-04 11:37:38 +03:00
|
|
|
std::optional<DrawingProgramLayerListItemMetaInfo> editingData;
|
|
|
|
|
|
2025-12-25 17:18:28 +03:00
|
|
|
DrawingProgramLayerManager& layerMan;
|
|
|
|
|
};
|