138 ImGui::BeginTable(
"##table_view", 2,
139 ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg |
140 ImGuiTableFlags_Resizable);
143 ImGui::TableSetupColumn(
"Files", ImGuiTableColumnFlags_WidthFixed, 256.0f);
144 ImGui::TableSetupColumn(
"Editor", ImGuiTableColumnFlags_WidthStretch);
146 ImGui::TableHeadersRow();
149 ImGui::TableNextRow();
150 ImGui::TableNextColumn();
154 if (ImGui::Button(
"Open Folder")) {
159 ImGui::TableNextColumn();
163 ImGui::Text(
"%6d/%-6d %6d lines | %s | %s | %s | %s", cpos.mLine + 1,
176 if (ImGui::BeginChild(
"##current_folder", ImVec2(0, 0),
true,
177 ImGuiWindowFlags_AlwaysVerticalScrollbar)) {
178 if (ImGui::BeginTable(
"##file_table", 2,
179 ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg |
180 ImGuiTableFlags_Resizable |
181 ImGuiTableFlags_Sortable)) {
182 ImGui::TableSetupColumn(
"Name", ImGuiTableColumnFlags_WidthFixed, 256.0f);
183 ImGui::TableSetupColumn(
"Type", ImGuiTableColumnFlags_WidthStretch);
185 ImGui::TableHeadersRow();
188 ImGui::TableNextRow();
189 ImGui::TableNextColumn();
190 if (ImGui::Selectable(file.c_str())) {
193 ImGui::TableNextColumn();
198 ImGui::TableNextRow();
199 ImGui::TableNextColumn();
200 if (ImGui::TreeNode(subfolder.name.c_str())) {
201 for (
const auto& file : subfolder.files) {
202 ImGui::TableNextRow();
203 ImGui::TableNextColumn();
204 if (ImGui::Selectable(file.c_str())) {
206 subfolder.name,
"/", file));
208 ImGui::TableNextColumn();
213 ImGui::TableNextColumn();
214 ImGui::Text(
"Folder");
226 static int next_tab_id = 0;
228 if (ImGui::BeginTabBar(
"AssemblyFileTabBar", ImGuiTabBarFlags_None)) {
229 if (ImGui::TabItemButton(
ICON_MD_ADD, ImGuiTabItemFlags_None)) {
243 ImGuiTabItemFlags_None)) {
248 std::string str((std::istreambuf_iterator<char>(t)),
249 std::istreambuf_iterator<char>());
252 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
256 ImGui::Text(
"%6d/%-6d %6d lines | %s | %s | %s | %s", cpos.mLine + 1,
279 if (ImGui::BeginMenu(
"File")) {
280 if (ImGui::MenuItem(
"Open",
"Ctrl+O")) {
281 ImGuiFileDialog::Instance()->OpenDialog(
282 "ChooseASMFileDlg",
"Open ASM file",
".asm,.txt",
".");
284 if (ImGui::MenuItem(
"Save",
"Ctrl+S")) {
290 if (ImGuiFileDialog::Instance()->Display(
"ChooseASMFileDlg")) {
291 if (ImGuiFileDialog::Instance()->IsOk()) {
294 ImGuiFileDialog::Instance()->Close();