Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Sep 7, 2024
1 parent ad5d17e commit 4d095e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 11 additions & 0 deletions Quake/expmode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ static void EXP_EnterMode()
#endif // USE_LUA_SCRIPTING
}

#include "ImGuiColorTextEdit/TextEditor.h"
TextEditor* te;

extern "C"
{

Expand Down Expand Up @@ -270,6 +273,14 @@ void EXP_Update()
LS_MarkImGuiFrameEnd();
#endif // USE_LUA_SCRIPTING

if (!te)
{
te = new TextEditor;
te->SetLanguageDefinition(TextEditor::LanguageDefinition::Lua());
}

te->Render("TextEditor");

ImGui::Render();

// Fade screen a bit
Expand Down
5 changes: 0 additions & 5 deletions Quake/ls_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,6 @@ static void LS_InitImGuiTheme(lua_State* state)

#endif // USE_HELLO_IMGUI

#include "ImGuiColorTextEdit/TextEditor.h"

void LS_InitImGuiBindings(lua_State* state)
{
LS_InitImGuiFuncs(state);
Expand All @@ -500,9 +498,6 @@ void LS_InitImGuiBindings(lua_State* state)
lua_setglobal(state, "ImGui");
assert(lua_gettop(state) == 0);

TextEditor te;
te.SetLanguageDefinition(TextEditor::LanguageDefinition::Lua());

#ifdef USE_HELLO_IMGUI
LS_InitImGuiTheme(state);
#endif // USE_HELLO_IMGUI
Expand Down

0 comments on commit 4d095e9

Please sign in to comment.