137 ImGui::BeginTable(
"##table_view", 2,
138 ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg |
139 ImGuiTableFlags_Resizable);
142 ImGui::TableSetupColumn(
"Files", ImGuiTableColumnFlags_WidthFixed, 256.0f);
143 ImGui::TableSetupColumn(
"Editor", ImGuiTableColumnFlags_WidthStretch);
145 ImGui::TableHeadersRow();
148 ImGui::TableNextRow();
149 ImGui::TableNextColumn();
153 if (ImGui::Button(
"Open Folder")) {
158 ImGui::TableNextColumn();
162 ImGui::Text(
"%6d/%-6d %6d lines | %s | %s | %s | %s", cpos.mLine + 1,
175 if (ImGui::BeginChild(
"##current_folder", ImVec2(0, 0),
true,
176 ImGuiWindowFlags_AlwaysVerticalScrollbar)) {
177 if (ImGui::BeginTable(
"##file_table", 2,
178 ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg |
179 ImGuiTableFlags_Resizable |
180 ImGuiTableFlags_Sortable)) {
181 ImGui::TableSetupColumn(
"Name", ImGuiTableColumnFlags_WidthFixed, 256.0f);
182 ImGui::TableSetupColumn(
"Type", ImGuiTableColumnFlags_WidthStretch);
184 ImGui::TableHeadersRow();
187 ImGui::TableNextRow();
188 ImGui::TableNextColumn();
189 if (ImGui::Selectable(file.c_str())) {
192 ImGui::TableNextColumn();
197 ImGui::TableNextRow();
198 ImGui::TableNextColumn();
199 if (ImGui::TreeNode(subfolder.name.c_str())) {
200 for (
const auto& file : subfolder.files) {
201 ImGui::TableNextRow();
202 ImGui::TableNextColumn();
203 if (ImGui::Selectable(file.c_str())) {
205 subfolder.name,
"/", file));
207 ImGui::TableNextColumn();
212 ImGui::TableNextColumn();
213 ImGui::Text(
"Folder");
225 static int next_tab_id = 0;
227 if (ImGui::BeginTabBar(
"AssemblyFileTabBar", ImGuiTabBarFlags_None)) {
228 if (ImGui::TabItemButton(
ICON_MD_ADD, ImGuiTabItemFlags_None)) {
242 ImGuiTabItemFlags_None)) {
247 std::string str((std::istreambuf_iterator<char>(t)),
248 std::istreambuf_iterator<char>());
251 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
255 ImGui::Text(
"%6d/%-6d %6d lines | %s | %s | %s | %s", cpos.mLine + 1,
278 if (ImGui::BeginMenu(
"File")) {
279 if (ImGui::MenuItem(
"Open",
"Ctrl+O")) {
280 ImGuiFileDialog::Instance()->OpenDialog(
281 "ChooseASMFileDlg",
"Open ASM file",
".asm,.txt",
".");
283 if (ImGui::MenuItem(
"Save",
"Ctrl+S")) {
289 if (ImGuiFileDialog::Instance()->Display(
"ChooseASMFileDlg")) {
290 if (ImGuiFileDialog::Instance()->IsOk()) {
293 ImGuiFileDialog::Instance()->Close();