add inline assembly editor
This commit is contained in:
@@ -32,6 +32,22 @@ void AssemblyEditor::Update() {
|
|||||||
ImGui::End();
|
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) {
|
void AssemblyEditor::ChangeActiveFile(const std::string& filename) {
|
||||||
current_file_ = filename;
|
current_file_ = filename;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class AssemblyEditor {
|
|||||||
AssemblyEditor();
|
AssemblyEditor();
|
||||||
|
|
||||||
void Update();
|
void Update();
|
||||||
|
void InlineUpdate();
|
||||||
void ChangeActiveFile(const std::string &);
|
void ChangeActiveFile(const std::string &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user