diff --git a/src/drivers/win/taseditor.cpp b/src/drivers/win/taseditor.cpp index 8dcca58b..fb30117f 100644 --- a/src/drivers/win/taseditor.cpp +++ b/src/drivers/win/taseditor.cpp @@ -425,9 +425,9 @@ bool SaveProjectAs() project.RenameProject(nameo, true); project.save(); taseditor_window.UpdateRecentProjectsArray(nameo); + // saved successfully - remove * mark from caption + taseditor_window.UpdateCaption(); } else return false; - // saved successfully - remove * mark from caption - taseditor_window.UpdateCaption(); return true; } bool SaveProject() @@ -549,8 +549,11 @@ void SaveCompact() string initdir = FCEU_GetPath(FCEUMKF_MOVIE); // initial directory ofn.lpstrInitialDir = initdir.c_str(); - if (GetSaveFileName(&ofn)) // if it is a valid filename + if (GetSaveFileName(&ofn)) + { project.save(nameo, taseditor_config.savecompact_binary, taseditor_config.savecompact_markers, taseditor_config.savecompact_bookmarks, taseditor_config.savecompact_greenzone, taseditor_config.savecompact_history, taseditor_config.savecompact_piano_roll, taseditor_config.savecompact_selection); + taseditor_window.UpdateCaption(); + } } } diff --git a/src/drivers/win/taseditor/branches.cpp b/src/drivers/win/taseditor/branches.cpp index 48940877..b70ba660 100644 --- a/src/drivers/win/taseditor/branches.cpp +++ b/src/drivers/win/taseditor/branches.cpp @@ -77,6 +77,7 @@ void BRANCHES::init() hOldBitmap1 = (HBITMAP)SelectObject(hBufferDC, buffer_hbitmap); normal_brush = CreateSolidBrush(0x000000); border_brush = CreateSolidBrush(0xb99d7f); + selected_slot_brush = CreateSolidBrush(0x6161E4); // prepare bg gradient vertex[0].x = 0; vertex[0].y = 0; @@ -172,6 +173,11 @@ void BRANCHES::free() DeleteObject(border_brush); border_brush = 0; } + if (selected_slot_brush) + { + DeleteObject(selected_slot_brush); + selected_slot_brush = 0; + } if (normal_pen) { DeleteObject(normal_pen); @@ -658,6 +664,17 @@ void BRANCHES::PaintBranchesBitmap(HDC hdc) // "bg" BitBlt(hBufferDC, 0, 0, BRANCHES_BITMAP_WIDTH, BRANCHES_BITMAP_HEIGHT, hBitmapDC, 0, 0, SRCCOPY); // "sprites" + // blinking red frame on selected slot + if (taseditor_config.old_branching_controls && ((animation_frame + 1) % 6)) + { + int selected_slot = bookmarks.GetSelectedSlot(); + temp_rect.left = BranchCurrX[selected_slot] + BRANCHES_SELECTED_SLOT_DX; + temp_rect.left += bookmarks.bookmarks_array[selected_slot].floating_phase; + temp_rect.top = BranchCurrY[selected_slot] + BRANCHES_SELECTED_SLOT_DY; + temp_rect.right = temp_rect.left + BRANCHES_SELECTED_SLOT_WIDTH; + temp_rect.bottom = temp_rect.top + BRANCHES_SELECTED_SLOT_HEIGHT; + FrameRect(hBufferDC, &temp_rect, selected_slot_brush); + } // fireball if (fireball_size) { @@ -672,7 +689,7 @@ void BRANCHES::PaintBranchesBitmap(HDC hdc) } } // blinking Playback cursor point - if (animation_frame % 3) + if (animation_frame % 4) TransparentBlt(hBufferDC, playback_x - BRANCHES_MINIARROW_HALFWIDTH, playback_y - BRANCHES_MINIARROW_HALFHEIGHT, BRANCHES_MINIARROW_WIDTH, BRANCHES_MINIARROW_HEIGHT, hSpritesheetDC, BRANCHES_MINIARROW_SPRITESHEET_X, BRANCHES_MINIARROW_SPRITESHEET_Y, BRANCHES_MINIARROW_WIDTH, BRANCHES_MINIARROW_HEIGHT, 0x00FF00); // corners cursor int current_corners_cursor_shift = BRANCHES_CORNER_BASE_SHIFT + corners_cursor_shift[animation_frame]; diff --git a/src/drivers/win/taseditor/branches.h b/src/drivers/win/taseditor/branches.h index c6733cdf..f2a02170 100644 --- a/src/drivers/win/taseditor/branches.h +++ b/src/drivers/win/taseditor/branches.h @@ -86,6 +86,11 @@ #define BRANCHES_MINIARROW_HEIGHT 5 #define BRANCHES_MINIARROW_HALFHEIGHT BRANCHES_MINIARROW_HEIGHT/2 +#define BRANCHES_SELECTED_SLOT_DX -6 +#define BRANCHES_SELECTED_SLOT_DY -6 +#define BRANCHES_SELECTED_SLOT_WIDTH 13 +#define BRANCHES_SELECTED_SLOT_HEIGHT 13 + #define FIRST_DIFFERENCE_UNKNOWN -2 class BRANCHES @@ -160,7 +165,7 @@ private: int latest_drawn_item_under_mouse; // GDI stuff - HBRUSH normal_brush, border_brush; + HBRUSH normal_brush, border_brush, selected_slot_brush; RECT temp_rect; HPEN normal_pen, timeline_pen, select_pen; HBITMAP branches_hbitmap, hOldBitmap, buffer_hbitmap, hOldBitmap1, branchesSpritesheet, hOldBitmap2;