mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
add syntax highlighting (WIP)
This commit is contained in:
parent
ce1e9f76cf
commit
ed3865964b
16 changed files with 168 additions and 43 deletions
|
|
@ -57,6 +57,8 @@ namespace gui {
|
|||
bool autoresize = false;
|
||||
bool showLineNumbers = false;
|
||||
|
||||
std::string syntax;
|
||||
|
||||
void stepLeft(bool shiftPressed, bool breakSelection);
|
||||
void stepRight(bool shiftPressed, bool breakSelection);
|
||||
void stepDefaultDown(bool shiftPressed, bool breakSelection);
|
||||
|
|
@ -84,6 +86,8 @@ namespace gui {
|
|||
void refreshLabel();
|
||||
|
||||
void onInput();
|
||||
|
||||
void refreshSyntax();
|
||||
public:
|
||||
TextBox(
|
||||
std::wstring placeholder,
|
||||
|
|
@ -219,5 +223,7 @@ namespace gui {
|
|||
virtual std::shared_ptr<UINode> getAt(glm::vec2 pos, std::shared_ptr<UINode> self) override;
|
||||
virtual void setOnUpPressed(const runnable &callback);
|
||||
virtual void setOnDownPressed(const runnable &callback);
|
||||
|
||||
virtual void setSyntax(const std::string& lang);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue