diff --git a/PanoPainter.vcxproj.filters b/PanoPainter.vcxproj.filters
index ffe4c4e..f284f7f 100644
--- a/PanoPainter.vcxproj.filters
+++ b/PanoPainter.vcxproj.filters
@@ -366,11 +366,11 @@
libs\glad
-
- Source Files
-
- Source Files
+ Source Files\ui
+
+
+ Source Files\ui
@@ -614,11 +614,11 @@
Header Files\ui
-
- Header Files
-
- Header Files
+ Header Files\ui
+
+
+ Header Files\ui
diff --git a/data/layout.xml b/data/layout.xml
index a827bdf..1a84cd5 100644
--- a/data/layout.xml
+++ b/data/layout.xml
@@ -48,10 +48,13 @@
-
-
-
-
+
+
+
+
+
diff --git a/src/node_dialog_export_ppbr.cpp b/src/node_dialog_export_ppbr.cpp
index ca5a484..c97d94c 100644
--- a/src/node_dialog_export_ppbr.cpp
+++ b/src/node_dialog_export_ppbr.cpp
@@ -1,6 +1,8 @@
#include "pch.h"
#include "log.h"
#include "node_dialog_export_ppbr.h"
+#include "app.h"
+#include "image.h"
Node* NodeDialogExportPPBR::clone_instantiate() const
{
@@ -26,10 +28,42 @@ void NodeDialogExportPPBR::init()
void NodeDialogExportPPBR::init_controls()
{
btn_ok = find("btn-ok");
+ btn_ok->on_click = [this] (Node*) {
+ start_exporting();
+ };
btn_cancel = find("btn-cancel");
btn_cancel->on_click = [this](Node*) {
destroy();
};
+ btn_header_open = find("header-open");
+ btn_header_open->on_click = [this] (Node*) {
+ open_header();
+ };
+ btn_header_clear = find("header-clear");
+ btn_header_clear->on_click = [this] (Node*) {
+ m_header_image.destroy();
+ img_header->tex.destroy();
+ };
+ btn_header_gen = find("header-gen");
+ btn_header_gen->on_click = [this] (Node*) {
+ App::I->message_box("WIP", "This feature is not yet implemented.");
+ };
+ img_header = find("header-tex");
+
+}
+
+void NodeDialogExportPPBR::open_header()
+{
+ App::I->pick_image([this](std::string path) {
+ m_header_image.load(path);
+ m_header_image.resize(256, 128);
+ img_header->tex.create(m_header_image);
+ });
+}
+
+void NodeDialogExportPPBR::start_exporting()
+{
+
}
void NodeDialogExportPPBR::added(Node* parent)
diff --git a/src/node_dialog_export_ppbr.h b/src/node_dialog_export_ppbr.h
index 1566440..51282c6 100644
--- a/src/node_dialog_export_ppbr.h
+++ b/src/node_dialog_export_ppbr.h
@@ -3,15 +3,23 @@
#include "node_button.h"
#include "node_combobox.h"
#include "node_text.h"
+#include "node_image_texture.h"
class NodeDialogExportPPBR : public NodeBorder
{
public:
NodeButton* btn_cancel;
NodeButton* btn_ok;
+ NodeButton* btn_header_open;
+ NodeButton* btn_header_clear;
+ NodeButton* btn_header_gen;
+ NodeImageTexture* img_header;
+ Image m_header_image;
virtual Node* clone_instantiate() const override;
virtual void clone_finalize(Node* dest) const override;
virtual void init() override;
virtual void added(Node* parent) override;
void init_controls();
+ void open_header();
+ void start_exporting();
};