* Taseditor: Config->Autopause at the end of Movie
* new hotkey "Cancel Seeking (TAS Editor)" (Esc)
This commit is contained in:
parent
75e13fd152
commit
7688ac9ae8
|
@ -349,6 +349,7 @@ static CFGSTRUCT fceuconfig[] = {
|
|||
AC(taseditor_config.deselect_on_doubleclick),
|
||||
AC(taseditor_config.draw_input),
|
||||
AC(taseditor_config.silent_autosave),
|
||||
AC(taseditor_config.autopause_at_finish),
|
||||
AC(taseditor_config.tooltips),
|
||||
AC(taseditor_config.current_pattern),
|
||||
AC(taseditor_config.pattern_skips_lag),
|
||||
|
|
|
@ -73,9 +73,10 @@ static struct
|
|||
{ EMUCMD_RELOAD, SCAN_F1 | CMD_KEY_CTRL , },
|
||||
{ EMUCMD_MISC_UNDOREDOSAVESTATE, SCAN_Z | CMD_KEY_CTRL, },
|
||||
{ EMUCMD_MISC_TOGGLEFULLSCREEN, SCAN_ENTER | CMD_KEY_ALT, },
|
||||
{ EMUCMD_TASEDITOR_REWIND, SCAN_ESCAPE, },
|
||||
{ EMUCMD_TASEDITOR_REWIND, SCAN_BACKSPACE, },
|
||||
{ EMUCMD_RERECORD_DISPLAY_TOGGLE, SCAN_M, },
|
||||
{ EMUCMD_TASEDITOR_RESTORE_PLAYBACK, SCAN_ENTER, },
|
||||
{ EMUCMD_TASEDITOR_CANCEL_SEEKING, SCAN_ESCAPE, },
|
||||
};
|
||||
|
||||
#define NUM_DEFAULT_MAPPINGS (sizeof(DefaultCommandMapping)/sizeof(DefaultCommandMapping[0]))
|
||||
|
|
|
@ -295,6 +295,7 @@ BEGIN
|
|||
MENUITEM MFT_SEPARATOR
|
||||
MENUITEM "Silent Autosave", ID_CONFIG_SILENTAUTOSAVE,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "Mute Turbo", ID_CONFIG_MUTETURBO,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "Autopause at the end of Movie", ID_CONFIG_AUTOPAUSEATTHEENDOFMOVIE,MFT_STRING,MFS_ENABLED
|
||||
END
|
||||
POPUP "Help", 65535,MFT_STRING,MFS_ENABLED
|
||||
BEGIN
|
||||
|
@ -383,8 +384,8 @@ TASEDITORCONTEXTMENUS MENU
|
|||
BEGIN
|
||||
POPUP "Selected"
|
||||
BEGIN
|
||||
MENUITEM "Set Markers", ID_SELECTED_SETMARKER
|
||||
MENUITEM "Remove Markers", ID_SELECTED_REMOVEMARKER
|
||||
MENUITEM "Set Markers", ID_SELECTED_SETMARKERS
|
||||
MENUITEM "Remove Markers", ID_SELECTED_REMOVEMARKERS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Deselect", ID_SELECTED_DESELECT
|
||||
MENUITEM "Select between Markers", ID_SELECTED_SELECTMIDMARKERS
|
||||
|
|
|
@ -1013,8 +1013,10 @@
|
|||
#define ACCEL_SHIFT_UP 40554
|
||||
#define ACCEL_SHIFT_DOWN 40555
|
||||
#define ACCEL_SHIFT_LEFT 40556
|
||||
#define ID_ACCELERATOR40557 40557
|
||||
#define ACCEL_SHIFT_RIGHT 40557
|
||||
#define ID_CONFIG_AUTOPAUSEATTHEENDOFMOVIE 40559
|
||||
#define ID_SELECTED_SETMARKERS 40560
|
||||
#define ID_SELECTED_REMOVEMARKERS 40561
|
||||
#define IDC_DEBUGGER_ICONTRAY 55535
|
||||
#define MW_ValueLabel2 65423
|
||||
#define MW_ValueLabel1 65426
|
||||
|
@ -1024,7 +1026,7 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 206
|
||||
#define _APS_NEXT_COMMAND_VALUE 40559
|
||||
#define _APS_NEXT_COMMAND_VALUE 40562
|
||||
#define _APS_NEXT_CONTROL_VALUE 1281
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
|
|
|
@ -10,13 +10,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||
Editor - Interface for editing Input and Markers
|
||||
[Singleton]
|
||||
|
||||
* implements operations of changing Input:
|
||||
* implements operations of changing Markers:
|
||||
|
||||
|
||||
* implements operations of changing Input: toggle input in region, set input by pattern, toggle selected region, apply pattern to input selection
|
||||
* implements operations of changing Markers: toggle Markers in selection, apply patern to Markers in selection, mark/unmark all selected frames
|
||||
* stores Autofire Patterns data and their loading/generating code
|
||||
* stores resources: patterns filename, id of buttonpresses in patterns
|
||||
|
||||
------------------------------------------------------------------------------------ */
|
||||
|
||||
#include "taseditor_project.h"
|
||||
|
@ -380,6 +377,56 @@ bool EDITOR::InputColumnSetPattern(int joy, int button)
|
|||
} else
|
||||
return false;
|
||||
}
|
||||
void EDITOR::SetMarkers()
|
||||
{
|
||||
SelectionFrames* current_selection = selection.MakeStrobe();
|
||||
if (current_selection->size())
|
||||
{
|
||||
SelectionFrames::iterator current_selection_begin(current_selection->begin());
|
||||
SelectionFrames::iterator current_selection_end(current_selection->end());
|
||||
bool changes_made = false;
|
||||
for(SelectionFrames::iterator it(current_selection_begin); it != current_selection_end; it++)
|
||||
{
|
||||
if(!markers_manager.GetMarker(*it))
|
||||
{
|
||||
if (markers_manager.SetMarker(*it))
|
||||
{
|
||||
changes_made = true;
|
||||
piano_roll.RedrawRow(*it);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (changes_made)
|
||||
{
|
||||
selection.must_find_current_marker = playback.must_find_current_marker = true;
|
||||
history.RegisterMarkersChange(MODTYPE_MARKER_SET, *current_selection_begin, *current_selection->rbegin());
|
||||
}
|
||||
}
|
||||
}
|
||||
void EDITOR::RemoveMarkers()
|
||||
{
|
||||
SelectionFrames* current_selection = selection.MakeStrobe();
|
||||
if (current_selection->size())
|
||||
{
|
||||
SelectionFrames::iterator current_selection_begin(current_selection->begin());
|
||||
SelectionFrames::iterator current_selection_end(current_selection->end());
|
||||
bool changes_made = false;
|
||||
for(SelectionFrames::iterator it(current_selection_begin); it != current_selection_end; it++)
|
||||
{
|
||||
if(markers_manager.GetMarker(*it))
|
||||
{
|
||||
markers_manager.ClearMarker(*it);
|
||||
changes_made = true;
|
||||
piano_roll.RedrawRow(*it);
|
||||
}
|
||||
}
|
||||
if (changes_made)
|
||||
{
|
||||
selection.must_find_current_marker = playback.must_find_current_marker = true;
|
||||
history.RegisterMarkersChange(MODTYPE_MARKER_REMOVE, *current_selection_begin, *current_selection->rbegin());
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ public:
|
|||
bool FrameColumnSetPattern();
|
||||
bool InputColumnSet(int joy, int button);
|
||||
bool InputColumnSetPattern(int joy, int button);
|
||||
|
||||
|
||||
void SetMarkers();
|
||||
void RemoveMarkers();
|
||||
|
||||
std::vector<std::string> autofire_patterns_names;
|
||||
std::vector<std::vector<uint8>> autofire_patterns;
|
||||
|
|
|
@ -360,10 +360,8 @@ void PIANO_ROLL::update()
|
|||
case DRAG_MODE_NONE:
|
||||
{
|
||||
// normal mouseover
|
||||
if (row_under_mouse >= 0
|
||||
&& (column_under_mouse == COLUMN_FRAMENUM || column_under_mouse == COLUMN_FRAMENUM2)
|
||||
&& markers_manager.GetMarker(row_under_mouse))
|
||||
cursor_icon = IDC_SIZEALL;
|
||||
//if (row_under_mouse >= 0 && (column_under_mouse == COLUMN_FRAMENUM || column_under_mouse == COLUMN_FRAMENUM2) && markers_manager.GetMarker(row_under_mouse))
|
||||
// cursor_icon = IDC_SIZEALL;
|
||||
break;
|
||||
}
|
||||
case DRAG_MODE_PLAYBACK:
|
||||
|
@ -374,6 +372,11 @@ void PIANO_ROLL::update()
|
|||
break;
|
||||
}
|
||||
case DRAG_MODE_MARKER:
|
||||
{
|
||||
// dragging Marker
|
||||
cursor_icon = IDC_SIZEALL;
|
||||
break;
|
||||
}
|
||||
case DRAG_MODE_OBSERVE:
|
||||
case DRAG_MODE_SET:
|
||||
case DRAG_MODE_UNSET:
|
||||
|
@ -534,9 +537,9 @@ void PIANO_ROLL::update()
|
|||
int drawing_current_y = p.y + GetScrollPos(hwndList, SB_VERT) * list_row_height;
|
||||
// draw (or erase) line from [drawing_current_x, drawing_current_y] to (drawing_last_x, drawing_last_y)
|
||||
int total_dx = drawing_last_x - drawing_current_x, total_dy = drawing_last_y - drawing_current_y;
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
if (!shift_held)
|
||||
{
|
||||
// when user is holding Shift, draw vertical line
|
||||
// when user is not holding Shift, draw only vertical lines
|
||||
total_dx = 0;
|
||||
drawing_current_x = drawing_last_x;
|
||||
p.x = drawing_current_x - GetScrollPos(hwndList, SB_HORZ);
|
||||
|
@ -1489,8 +1492,22 @@ LRESULT APIENTRY ListWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
if (row_index >= 0)
|
||||
{
|
||||
if (!alt_pressed && !(fwKeys & MK_SHIFT))
|
||||
{
|
||||
// clicked without Shift/Alt - set "row_last_clicked" here
|
||||
piano_roll.row_last_clicked = row_index;
|
||||
// and change Selection to this row
|
||||
if (fwKeys & MK_CONTROL)
|
||||
{
|
||||
if (selection.GetRowSelection(row_index))
|
||||
selection.ClearRowSelection(row_index);
|
||||
else
|
||||
selection.SetRowSelection(row_index);
|
||||
} else
|
||||
{
|
||||
selection.ClearSelection();
|
||||
selection.SetRowSelection(row_index);
|
||||
}
|
||||
}
|
||||
// toggle input
|
||||
int joy = (column_index - COLUMN_JOYPAD1_A) / NUM_JOYPAD_BUTTONS;
|
||||
int button = (column_index - COLUMN_JOYPAD1_A) % NUM_JOYPAD_BUTTONS;
|
||||
|
|
|
@ -66,6 +66,7 @@ void PLAYBACK::init()
|
|||
}
|
||||
void PLAYBACK::reset()
|
||||
{
|
||||
autopause_at_the_end = false;
|
||||
must_find_current_marker = true;
|
||||
shown_marker = 0;
|
||||
lastCursor = currFrameCounter;
|
||||
|
@ -140,9 +141,10 @@ void PLAYBACK::update()
|
|||
lost_position_frame = 0;
|
||||
|
||||
// pause when seeking hit pause_frame
|
||||
if(!FCEUI_EmulationPaused())
|
||||
if(pause_frame && pause_frame <= currFrameCounter + 1)
|
||||
SeekingStop();
|
||||
if(pause_frame && pause_frame <= currFrameCounter + 1)
|
||||
SeekingStop();
|
||||
else if (!lost_position_frame && currFrameCounter >= currMovieData.getNumRecords()-1 && autopause_at_the_end && taseditor_config.autopause_at_finish)
|
||||
PauseEmulation();
|
||||
|
||||
// update flashing pauseframe
|
||||
if (old_pauseframe != pause_frame && old_pauseframe)
|
||||
|
@ -173,27 +175,24 @@ void PLAYBACK::update()
|
|||
if (pause_frame)
|
||||
{
|
||||
if (old_show_pauseframe != show_pauseframe) // update progressbar from time to time
|
||||
// display seeking progress
|
||||
SetProgressbar(currFrameCounter - seeking_start_frame, pause_frame - seeking_start_frame);
|
||||
} else if (old_emu_paused != emu_paused)
|
||||
{
|
||||
// emulator got paused/unpaused externally
|
||||
if (old_emu_paused && !emu_paused)
|
||||
{
|
||||
// externally unpaused
|
||||
// externally unpaused - show empty progressbar
|
||||
SetProgressbar(0, 1);
|
||||
if (currFrameCounter < currMovieData.getNumRecords()-1)
|
||||
{
|
||||
// don't forget to stop at the end of the movie
|
||||
pause_frame = currMovieData.getNumRecords();
|
||||
seeking_start_frame = currFrameCounter;
|
||||
} else
|
||||
{
|
||||
// unlimited emulation, appending the movie - progressbar should be empty
|
||||
SetProgressbar(0, 1);
|
||||
}
|
||||
autopause_at_the_end = true;
|
||||
else
|
||||
autopause_at_the_end = false;
|
||||
} else
|
||||
{
|
||||
// externally paused - progressbar should be full
|
||||
SetProgressbar(1, 1);
|
||||
autopause_at_the_end = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -283,22 +282,15 @@ void PLAYBACK::MiddleButtonClick()
|
|||
|
||||
void PLAYBACK::SeekingStart(int finish_frame)
|
||||
{
|
||||
seeking_start_frame = currFrameCounter;
|
||||
pause_frame = finish_frame;
|
||||
if (pause_frame != finish_frame)
|
||||
{
|
||||
seeking_start_frame = currFrameCounter;
|
||||
pause_frame = finish_frame;
|
||||
}
|
||||
if (taseditor_config.turbo_seek)
|
||||
turbo = true;
|
||||
UnpauseEmulation();
|
||||
}
|
||||
void PLAYBACK::SeekingContinue()
|
||||
{
|
||||
if (pause_frame)
|
||||
{
|
||||
if (taseditor_config.turbo_seek)
|
||||
turbo = true;
|
||||
UnpauseEmulation();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PLAYBACK::SeekingStop()
|
||||
{
|
||||
|
@ -409,13 +401,6 @@ bool PLAYBACK::JumpToFrame(int index)
|
|||
{
|
||||
// Returns true if a jump to the frame is made, false if started seeking outside greenzone or if nothing's done
|
||||
if (index < 0) return false;
|
||||
|
||||
if (index+1 == pause_frame && emu_paused)
|
||||
{
|
||||
SeekingContinue();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (index >= greenzone.greenZoneCount)
|
||||
{
|
||||
// handle jump outside greenzone
|
||||
|
@ -460,7 +445,7 @@ void PLAYBACK::SetProgressbar(int a, int b)
|
|||
{
|
||||
SendMessage(hwndProgressbar, PBM_SETPOS, PROGRESSBAR_WIDTH * a / b, 0);
|
||||
}
|
||||
void PLAYBACK::ClickOnProgressbar()
|
||||
void PLAYBACK::CancelSeeking()
|
||||
{
|
||||
// delete lost_position pointer (green arrow)
|
||||
if (lost_position_frame)
|
||||
|
|
|
@ -21,7 +21,6 @@ public:
|
|||
void updateProgressbar();
|
||||
|
||||
void SeekingStart(int finish_frame);
|
||||
void SeekingContinue();
|
||||
void SeekingStop();
|
||||
void ToggleEmulationPause();
|
||||
void PauseEmulation();
|
||||
|
@ -40,7 +39,7 @@ public:
|
|||
|
||||
int GetFlashingPauseFrame();
|
||||
void SetProgressbar(int a, int b);
|
||||
void ClickOnProgressbar();
|
||||
void CancelSeeking();
|
||||
|
||||
bool JumpToFrame(int index);
|
||||
|
||||
|
@ -54,7 +53,7 @@ public:
|
|||
HWND hwndPlaybackMarker, hwndPlaybackMarkerEdit;
|
||||
|
||||
private:
|
||||
|
||||
bool autopause_at_the_end;
|
||||
bool old_emu_paused, emu_paused;
|
||||
int old_pauseframe;
|
||||
bool old_show_pauseframe, show_pauseframe;
|
||||
|
|
|
@ -33,7 +33,7 @@ TASEDITOR_CONFIG::TASEDITOR_CONFIG()
|
|||
wndmaximized = false;
|
||||
findnote_wndx = 0;
|
||||
findnote_wndy = 0;
|
||||
follow_playback = false;
|
||||
follow_playback = true;
|
||||
turbo_seek = false;
|
||||
show_lag_frames = true;
|
||||
show_markers = true;
|
||||
|
@ -44,7 +44,7 @@ TASEDITOR_CONFIG::TASEDITOR_CONFIG()
|
|||
follow_note_context = true;
|
||||
bind_markers = true;
|
||||
empty_marker_notes = true;
|
||||
combine_consecutive_rec = true;
|
||||
combine_consecutive_rec = false;
|
||||
use_1p_rec = true;
|
||||
columnset_by_keys = false;
|
||||
superimpose = 0; // SUPERIMPOSE_UNCHECKED
|
||||
|
@ -72,6 +72,7 @@ TASEDITOR_CONFIG::TASEDITOR_CONFIG()
|
|||
deselect_on_doubleclick = true;
|
||||
draw_input = true;
|
||||
silent_autosave = true;
|
||||
autopause_at_finish = true;
|
||||
tooltips = true;
|
||||
current_pattern = 0;
|
||||
pattern_skips_lag = false;
|
||||
|
|
|
@ -70,6 +70,7 @@ public:
|
|||
bool deselect_on_doubleclick;
|
||||
bool draw_input;
|
||||
bool silent_autosave;
|
||||
bool autopause_at_finish;
|
||||
bool tooltips;
|
||||
int current_pattern;
|
||||
bool pattern_skips_lag;
|
||||
|
|
|
@ -68,7 +68,7 @@ char taseditor_help_filename[] = "\\taseditor.chm";
|
|||
// all items of the window (used for resising) and their default x,y,w,h
|
||||
// actual x,y,w,h are calculated at the beginning from screen
|
||||
Window_items_struct window_items[TASEDITOR_WINDOW_TOTAL_ITEMS] = {
|
||||
IDC_PROGRESS_BUTTON, -1, 0, 0, 0, "Click here whenever you want to abort seeking", "", false, 0, 0,
|
||||
IDC_PROGRESS_BUTTON, -1, 0, 0, 0, "Click here whenever you want to abort seeking", "", false, EMUCMD_TASEDITOR_CANCEL_SEEKING, 0,
|
||||
IDC_BRANCHES_BUTTON, -1, 0, 0, 0, "Click here to switch between Bookmarks List and Branches Tree", "", false, 0, 0,
|
||||
IDC_LIST1, 0, 0, -1, -1, "", "", false, 0, 0,
|
||||
IDC_PLAYBACK_BOX, -1, 0, 0, 0, "", "", false, 0, 0,
|
||||
|
@ -78,9 +78,9 @@ Window_items_struct window_items[TASEDITOR_WINDOW_TOTAL_ITEMS] = {
|
|||
IDC_BOOKMARKS_BOX, -1, 0, 0, 0, "", "", false, 0, 0,
|
||||
IDC_HISTORY_BOX, -1, 0, 0, -1, "", "", false, 0, 0,
|
||||
TASEDITOR_REWIND_FULL, -1, 0, 0, 0, "Send Playback to previous Marker (mouse: Shift+Wheel up) (hotkey: Shift+PageUp)", "", false, 0, 0,
|
||||
TASEDITOR_REWIND, -1, 0, 0, 0, "Rewind one frame (mouse: Right button+Wheel up) (Alt+Wheel up)", "", false, EMUCMD_TASEDITOR_REWIND, 0,
|
||||
TASEDITOR_REWIND, -1, 0, 0, 0, "Rewind 1 frame (mouse: Right button+Wheel up) (Alt+Wheel up) (hotkey: Shift+Up)", "", false, 0, 0, // EMUCMD_TASEDITOR_REWIND
|
||||
TASEDITOR_PLAYSTOP, -1, 0, 0, 0, "Pause/Unpause Emulation (mouse: Middle button)", "", false, EMUCMD_PAUSE, 0,
|
||||
TASEDITOR_FORWARD, -1, 0, 0, 0, "Advance one frame (mouse: Right button+Wheel down) (Alt+Wheel down)", "", false, EMUCMD_FRAME_ADVANCE, 0,
|
||||
TASEDITOR_FORWARD, -1, 0, 0, 0, "Advance (mouse: Right button+Wheel down) (Alt+Wheel down) (hotkey: Shift+Down)", "", false, 0, 0,
|
||||
TASEDITOR_FORWARD_FULL, -1, 0, 0, 0, "Send Playback to next Marker (mouse: Shift+Wheel down) (hotkey: Shift+PageDown)", "", false, 0, 0,
|
||||
IDC_PROGRESS1, -1, 0, 0, 0, "", "", false, 0, 0,
|
||||
CHECK_FOLLOW_CURSOR, -1, 0, 0, 0, "The Piano Roll will follow Playback cursor movements", "", false, 0, 0,
|
||||
|
@ -440,6 +440,7 @@ void TASEDITOR_WINDOW::UpdateCheckedItems()
|
|||
CheckMenuItem(hmenu, ID_CONFIG_DRAWINPUTBYDRAGGING, taseditor_config.draw_input?MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(hmenu, ID_CONFIG_SILENTAUTOSAVE, taseditor_config.silent_autosave?MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(hmenu, ID_CONFIG_MUTETURBO, muteTurbo?MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(hmenu, ID_CONFIG_AUTOPAUSEATTHEENDOFMOVIE, taseditor_config.autopause_at_finish?MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(hmenu, ID_HELP_TOOLTIPS, taseditor_config.tooltips?MF_CHECKED : MF_UNCHECKED);
|
||||
}
|
||||
|
||||
|
@ -871,12 +872,10 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
break;
|
||||
case ID_EDIT_TRUNCATE:
|
||||
case ID_CONTEXT_SELECTED_TRUNCATE:
|
||||
case ID_STRAY_TRUNCATE:
|
||||
splicer.Truncate();
|
||||
break;
|
||||
case ACCEL_INS:
|
||||
case ID_EDIT_INSERT:
|
||||
case MENU_CONTEXT_STRAY_INSERTFRAMES:
|
||||
case ID_CONTEXT_SELECTED_INSERTFRAMES2:
|
||||
splicer.InsertNumFrames();
|
||||
break;
|
||||
|
@ -911,9 +910,6 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
case CHECK_FOLLOW_CURSOR:
|
||||
taseditor_config.follow_playback ^= 1;
|
||||
taseditor_window.UpdateCheckedItems();
|
||||
// if switched off then maybe jump to target frame
|
||||
if (!taseditor_config.follow_playback && playback.pause_frame)
|
||||
piano_roll.FollowPauseframe();
|
||||
break;
|
||||
case CHECK_TURBO_SEEK:
|
||||
taseditor_config.turbo_seek ^= 1;
|
||||
|
@ -1065,8 +1061,12 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
muteTurbo ^= 1;
|
||||
taseditor_window.UpdateCheckedItems();
|
||||
break;
|
||||
case ID_CONFIG_AUTOPAUSEATTHEENDOFMOVIE:
|
||||
taseditor_config.autopause_at_finish ^= 1;
|
||||
taseditor_window.UpdateCheckedItems();
|
||||
break;
|
||||
case IDC_PROGRESS_BUTTON:
|
||||
playback.ClickOnProgressbar();
|
||||
playback.CancelSeeking();
|
||||
break;
|
||||
case IDC_BRANCHES_BUTTON:
|
||||
// click on "Bookmarks/Branches" - switch between Bookmarks List and Branches Tree
|
||||
|
@ -1186,62 +1186,21 @@ BOOL CALLBACK WndprocTasEditor(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
piano_roll.FollowSelection();
|
||||
break;
|
||||
}
|
||||
case ID_SELECTED_SETMARKER:
|
||||
case ID_SELECTED_SETMARKERS:
|
||||
{
|
||||
SelectionFrames* current_selection = selection.MakeStrobe();
|
||||
if (current_selection->size())
|
||||
{
|
||||
SelectionFrames::iterator current_selection_begin(current_selection->begin());
|
||||
SelectionFrames::iterator current_selection_end(current_selection->end());
|
||||
bool changes_made = false;
|
||||
for(SelectionFrames::iterator it(current_selection_begin); it != current_selection_end; it++)
|
||||
{
|
||||
if(!markers_manager.GetMarker(*it))
|
||||
{
|
||||
if (markers_manager.SetMarker(*it))
|
||||
{
|
||||
changes_made = true;
|
||||
piano_roll.RedrawRow(*it);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (changes_made)
|
||||
{
|
||||
selection.must_find_current_marker = playback.must_find_current_marker = true;
|
||||
history.RegisterMarkersChange(MODTYPE_MARKER_SET, *current_selection_begin, *current_selection->rbegin());
|
||||
}
|
||||
}
|
||||
editor.SetMarkers();
|
||||
break;
|
||||
}
|
||||
case ID_SELECTED_REMOVEMARKER:
|
||||
case ID_SELECTED_REMOVEMARKERS:
|
||||
{
|
||||
SelectionFrames* current_selection = selection.MakeStrobe();
|
||||
if (current_selection->size())
|
||||
{
|
||||
SelectionFrames::iterator current_selection_begin(current_selection->begin());
|
||||
SelectionFrames::iterator current_selection_end(current_selection->end());
|
||||
bool changes_made = false;
|
||||
for(SelectionFrames::iterator it(current_selection_begin); it != current_selection_end; it++)
|
||||
{
|
||||
if(markers_manager.GetMarker(*it))
|
||||
{
|
||||
markers_manager.ClearMarker(*it);
|
||||
changes_made = true;
|
||||
piano_roll.RedrawRow(*it);
|
||||
}
|
||||
}
|
||||
if (changes_made)
|
||||
{
|
||||
selection.must_find_current_marker = playback.must_find_current_marker = true;
|
||||
history.RegisterMarkersChange(MODTYPE_MARKER_REMOVE, *current_selection_begin, *current_selection->rbegin());
|
||||
}
|
||||
}
|
||||
editor.RemoveMarkers();
|
||||
break;
|
||||
}
|
||||
case ACCEL_CTRL_F:
|
||||
case ID_VIEW_FINDNOTE:
|
||||
{
|
||||
if (taseditor_window.hwndFindNote)
|
||||
// set focus to the text field
|
||||
SendMessage(taseditor_window.hwndFindNote, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(taseditor_window.hwndFindNote, IDC_NOTE_TO_FIND), true);
|
||||
else
|
||||
taseditor_window.hwndFindNote = CreateDialog(fceu_hInstance, MAKEINTRESOURCE(IDD_TASEDITOR_FINDNOTE), taseditor_window.hwndTasEditor, FindNoteProc);
|
||||
|
|
|
@ -670,6 +670,7 @@ static void ToggleFullscreen(void);
|
|||
static void TaseditorRewindOn(void);
|
||||
static void TaseditorRewindOff(void);
|
||||
static void TaseditorRestorePlayback(void);
|
||||
static void TaseditorCancelSeeking(void);
|
||||
|
||||
struct EMUCMDTABLE FCEUI_CommandTable[]=
|
||||
{
|
||||
|
@ -796,6 +797,7 @@ struct EMUCMDTABLE FCEUI_CommandTable[]=
|
|||
{ EMUCMD_TASEDITOR_REWIND, EMUCMDTYPE_MISC, TaseditorRewindOn, TaseditorRewindOff, 0, "Rewind Frame (TAS Editor)", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_RERECORD_DISPLAY_TOGGLE, EMUCMDTYPE_MISC, FCEUI_MovieToggleRerecordDisplay, 0, 0, "Toggle Rerecord Display", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_TASEDITOR_RESTORE_PLAYBACK, EMUCMDTYPE_MISC, TaseditorRestorePlayback, 0, 0, "Restore Playback (TAS Editor)", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_TASEDITOR_CANCEL_SEEKING, EMUCMDTYPE_MISC, TaseditorCancelSeeking, 0, 0, "Cancel Seeking (TAS Editor)", EMUCMDFLAG_TASEDITOR },
|
||||
};
|
||||
|
||||
#define NUM_EMU_CMDS (sizeof(FCEUI_CommandTable)/sizeof(FCEUI_CommandTable[0]))
|
||||
|
@ -1205,3 +1207,9 @@ static void TaseditorRestorePlayback(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void TaseditorCancelSeeking(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
playback.CancelSeeking();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -233,9 +233,10 @@ enum EMUCMD
|
|||
EMUCMD_TOOL_OPENNTVIEW,
|
||||
EMUCMD_TASEDITOR_REWIND,
|
||||
EMUCMD_RERECORD_DISPLAY_TOGGLE,
|
||||
EMUCMD_TASEDITOR_RESTORE_PLAYBACK,
|
||||
//-----------------------------
|
||||
//keep adding these in order of newness or else the hotkey binding configs will get messed up...
|
||||
EMUCMD_TASEDITOR_RESTORE_PLAYBACK,
|
||||
EMUCMD_TASEDITOR_CANCEL_SEEKING,
|
||||
|
||||
EMUCMD_MAX
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue