mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 12:59:14 +12:00
Qt: Initial shader editor support
This commit is contained in:
parent
e608436315
commit
d87477832b
9 changed files with 130 additions and 24 deletions
28
include/panda_qt/shader_editor.hpp
Normal file
28
include/panda_qt/shader_editor.hpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDialog>
|
||||
#include <QWidget>
|
||||
#include <string>
|
||||
|
||||
#include "zep.h"
|
||||
#include "zep/mode_repl.h"
|
||||
#include "zep/regress.h"
|
||||
|
||||
class ShaderEditorWindow : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
Zep::ZepWidget_Qt zepWidget;
|
||||
Zep::IZepReplProvider replProvider;
|
||||
static constexpr float fontSize = 14.0f;
|
||||
|
||||
// Whether this backend supports shader editor
|
||||
bool shaderEditorSupported = true;
|
||||
|
||||
public:
|
||||
ShaderEditorWindow(QWidget* parent, const std::string& filename, const std::string& initialText);
|
||||
void setText(const std::string& text) { zepWidget.GetEditor().GetMRUBuffer()->SetText(text); }
|
||||
|
||||
void setEnable(bool enable);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue