add inline assembly editor

This commit is contained in:
scawful
2022-12-30 16:41:10 -06:00
parent deaeedfc87
commit 3c244184ab
2 changed files with 17 additions and 0 deletions

View File

@@ -32,6 +32,22 @@ void AssemblyEditor::Update() {
ImGui::End();
}
void AssemblyEditor::InlineUpdate() {
ChangeActiveFile("assets/asm/template_song.asm");
auto cpos = text_editor_.GetCursorPosition();
SetEditorText();
ImGui::Text("%6d/%-6d %6d lines | %s | %s | %s | %s", cpos.mLine + 1,
cpos.mColumn + 1, text_editor_.GetTotalLines(),
text_editor_.IsOverwrite() ? "Ovr" : "Ins",
text_editor_.CanUndo() ? "*" : " ",
text_editor_.GetLanguageDefinition().mName.c_str(),
current_file_.c_str());
text_editor_.Render("##asm_editor", ImVec2(0, 300));
}
void AssemblyEditor::ChangeActiveFile(const std::string& filename) {
current_file_ = filename;
}

View File

@@ -17,6 +17,7 @@ class AssemblyEditor {
AssemblyEditor();
void Update();
void InlineUpdate();
void ChangeActiveFile(const std::string &);
private: