mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add gui.set_syntax_styles
This commit is contained in:
parent
1676c47093
commit
50f6c48771
11 changed files with 149 additions and 43 deletions
|
|
@ -918,7 +918,9 @@ void TextBox::onTab(bool shiftPressed) {
|
|||
void TextBox::refreshSyntax() {
|
||||
if (!syntax.empty()) {
|
||||
const auto& processor = gui.getEditor().getSyntaxProcessor();
|
||||
if (auto styles = processor.highlight(syntax, input)) {
|
||||
auto scheme = gui.getSyntaxColorScheme();
|
||||
if (auto styles =
|
||||
processor.highlight(scheme ? *scheme : FontStylesScheme {}, syntax, input)) {
|
||||
label->setStyles(std::move(styles));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue