expand ppbr export dialog
This commit is contained in:
@@ -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<NodeButton>("btn-ok");
|
||||
btn_ok->on_click = [this] (Node*) {
|
||||
start_exporting();
|
||||
};
|
||||
btn_cancel = find<NodeButton>("btn-cancel");
|
||||
btn_cancel->on_click = [this](Node*) {
|
||||
destroy();
|
||||
};
|
||||
btn_header_open = find<NodeButton>("header-open");
|
||||
btn_header_open->on_click = [this] (Node*) {
|
||||
open_header();
|
||||
};
|
||||
btn_header_clear = find<NodeButton>("header-clear");
|
||||
btn_header_clear->on_click = [this] (Node*) {
|
||||
m_header_image.destroy();
|
||||
img_header->tex.destroy();
|
||||
};
|
||||
btn_header_gen = find<NodeButton>("header-gen");
|
||||
btn_header_gen->on_click = [this] (Node*) {
|
||||
App::I->message_box("WIP", "This feature is not yet implemented.");
|
||||
};
|
||||
img_header = find<NodeImageTexture>("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)
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user