* Tasedit: changed control scheme to single click instead of double click
This commit is contained in:
parent
84ae16d8c2
commit
bf32a2bcce
|
@ -67,7 +67,7 @@ BEGIN
|
||||||
MENUITEM "&Record AVI...", MENU_RECORD_AVI
|
MENUITEM "&Record AVI...", MENU_RECORD_AVI
|
||||||
MENUITEM "&Stop AVI", MENU_STOP_AVI
|
MENUITEM "&Stop AVI", MENU_STOP_AVI
|
||||||
MENUITEM "&Record WAV...", MENU_RECORD_WAV
|
MENUITEM "&Record WAV...", MENU_RECORD_WAV
|
||||||
MENUITEM "&Stop WAV", ID_AVI_STOPWAV
|
MENUITEM "&Stop WAV", MENU_STOP_WAV
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Enable HUD recording", ID_AVI_ENABLEHUDRECORDING
|
MENUITEM "Enable HUD recording", ID_AVI_ENABLEHUDRECORDING
|
||||||
MENUITEM "Disable messages recording", ID_AVI_DISMOVIEMESSAGE
|
MENUITEM "Disable messages recording", ID_AVI_DISMOVIEMESSAGE
|
||||||
|
@ -1761,6 +1761,10 @@ BEGIN
|
||||||
BOTTOMMARGIN, 201
|
BOTTOMMARGIN, 201
|
||||||
END
|
END
|
||||||
|
|
||||||
|
"NEWINPUT", DIALOG
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
|
||||||
"PALCONFIG", DIALOG
|
"PALCONFIG", DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 10
|
LEFTMARGIN, 10
|
||||||
|
|
|
@ -63,7 +63,7 @@ static void GetDispInfo(NMLVDISPINFO* nmlvDispInfo)
|
||||||
{
|
{
|
||||||
switch(item.iSubItem)
|
switch(item.iSubItem)
|
||||||
{
|
{
|
||||||
case COLUMN_ARROW:
|
case COLUMN_ICONS:
|
||||||
if(item.iImage == I_IMAGECALLBACK && item.iItem == currFrameCounter)
|
if(item.iImage == I_IMAGECALLBACK && item.iItem == currFrameCounter)
|
||||||
item.iImage = 0;
|
item.iImage = 0;
|
||||||
else
|
else
|
||||||
|
@ -115,7 +115,7 @@ static LONG CustomDraw(NMLVCUSTOMDRAW* msg)
|
||||||
SelectObject(msg->nmcd.hdc,debugSystem->hFixedFont);
|
SelectObject(msg->nmcd.hdc,debugSystem->hFixedFont);
|
||||||
cell_x = msg->iSubItem;
|
cell_x = msg->iSubItem;
|
||||||
cell_y = msg->nmcd.dwItemSpec;
|
cell_y = msg->nmcd.dwItemSpec;
|
||||||
if(cell_x > COLUMN_ARROW)
|
if(cell_x > COLUMN_ICONS)
|
||||||
{
|
{
|
||||||
if(cell_x == COLUMN_FRAMENUM || cell_x == COLUMN_FRAMENUM2)
|
if(cell_x == COLUMN_FRAMENUM || cell_x == COLUMN_FRAMENUM2)
|
||||||
{
|
{
|
||||||
|
@ -376,29 +376,27 @@ bool JumpToFrame(int index)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoubleClick(LPNMITEMACTIVATE info)
|
void SingleClick(LPNMITEMACTIVATE info)
|
||||||
{
|
{
|
||||||
int index = info->iItem;
|
int index = info->iItem;
|
||||||
|
if(index == -1) return;
|
||||||
|
int column_index = info->iSubItem;
|
||||||
|
|
||||||
//stray click
|
if(column_index == COLUMN_ICONS)
|
||||||
if(index == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
//if the icon or frame columns were double clicked:
|
|
||||||
if(info->iSubItem == COLUMN_ARROW)
|
|
||||||
{
|
{
|
||||||
|
// click on the "icons" column - jump to the frame
|
||||||
} else if(info->iSubItem == COLUMN_FRAMENUM || info->iSubItem == COLUMN_FRAMENUM2)
|
|
||||||
{
|
|
||||||
JumpToFrame(index);
|
|
||||||
ClearSelection();
|
ClearSelection();
|
||||||
|
JumpToFrame(index);
|
||||||
RedrawList();
|
RedrawList();
|
||||||
|
} else if(column_index == COLUMN_FRAMENUM || column_index == COLUMN_FRAMENUM2)
|
||||||
|
{
|
||||||
|
// click on the "frame number" column - do nothing
|
||||||
}
|
}
|
||||||
else if(info->iSubItem >= COLUMN_JOYPAD1_A && info->iSubItem <= COLUMN_JOYPAD4_R)
|
else if(column_index >= COLUMN_JOYPAD1_A && column_index <= COLUMN_JOYPAD4_R)
|
||||||
{
|
{
|
||||||
//toggle the bit
|
//toggle the bit
|
||||||
int joy = (info->iSubItem - COLUMN_JOYPAD1_A) / NUM_JOYPAD_BUTTONS;
|
int joy = (column_index - COLUMN_JOYPAD1_A) / NUM_JOYPAD_BUTTONS;
|
||||||
int bit = (info->iSubItem - COLUMN_JOYPAD1_A) % NUM_JOYPAD_BUTTONS;
|
int bit = (column_index - COLUMN_JOYPAD1_A) % NUM_JOYPAD_BUTTONS;
|
||||||
|
|
||||||
if (info->uKeyFlags & (LVKF_SHIFT|LVKF_CONTROL))
|
if (info->uKeyFlags & (LVKF_SHIFT|LVKF_CONTROL))
|
||||||
{
|
{
|
||||||
|
@ -418,12 +416,27 @@ void DoubleClick(LPNMITEMACTIVATE info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DoubleClick(LPNMITEMACTIVATE info)
|
||||||
|
{
|
||||||
|
int index = info->iItem;
|
||||||
|
if(index == -1) return;
|
||||||
|
int column_index = info->iSubItem;
|
||||||
|
|
||||||
|
if(column_index == COLUMN_ICONS || column_index == COLUMN_FRAMENUM || column_index == COLUMN_FRAMENUM2)
|
||||||
|
{
|
||||||
|
// double click sends playback to the frame
|
||||||
|
ClearSelection();
|
||||||
|
JumpToFrame(index);
|
||||||
|
RedrawList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//removes all selections
|
//removes all selections
|
||||||
static void ClearSelection()
|
static void ClearSelection()
|
||||||
{
|
{
|
||||||
int frameCount = ListView_GetItemCount(hwndList);
|
int frameCount = ListView_GetItemCount(hwndList);
|
||||||
|
|
||||||
ListView_SetItemState(hwndList,-1,0, LVIS_SELECTED);
|
ListView_SetItemState(hwndList,-1,0, LVIS_FOCUSED|LVIS_SELECTED);
|
||||||
|
|
||||||
selectionFrames.clear();
|
selectionFrames.clear();
|
||||||
}
|
}
|
||||||
|
@ -775,7 +788,7 @@ static void InitDialog()
|
||||||
//setup columns
|
//setup columns
|
||||||
LVCOLUMN lvc;
|
LVCOLUMN lvc;
|
||||||
int colidx=0;
|
int colidx=0;
|
||||||
// arrow column
|
// icons column
|
||||||
lvc.mask = LVCF_WIDTH;
|
lvc.mask = LVCF_WIDTH;
|
||||||
lvc.cx = 12;
|
lvc.cx = 12;
|
||||||
ListView_InsertColumn(hwndList, colidx++, &lvc);
|
ListView_InsertColumn(hwndList, colidx++, &lvc);
|
||||||
|
@ -1102,6 +1115,9 @@ BOOL CALLBACK WndprocTasEdit(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||||
case LVN_GETDISPINFO:
|
case LVN_GETDISPINFO:
|
||||||
GetDispInfo((NMLVDISPINFO*)lParam);
|
GetDispInfo((NMLVDISPINFO*)lParam);
|
||||||
break;
|
break;
|
||||||
|
case NM_CLICK:
|
||||||
|
SingleClick((LPNMITEMACTIVATE)lParam);
|
||||||
|
break;
|
||||||
case NM_DBLCLK:
|
case NM_DBLCLK:
|
||||||
DoubleClick((LPNMITEMACTIVATE)lParam);
|
DoubleClick((LPNMITEMACTIVATE)lParam);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#define GREENZONE_MAX_CAPACITY 200000 // maybe even more
|
#define GREENZONE_MAX_CAPACITY 200000 // maybe even more
|
||||||
#define PAUSEFRAME_BLINKING_PERIOD 100
|
#define PAUSEFRAME_BLINKING_PERIOD 100
|
||||||
// listview column names
|
// listview column names
|
||||||
#define COLUMN_ARROW 0
|
#define COLUMN_ICONS 0
|
||||||
#define COLUMN_FRAMENUM 1
|
#define COLUMN_FRAMENUM 1
|
||||||
#define COLUMN_JOYPAD1_A 2
|
#define COLUMN_JOYPAD1_A 2
|
||||||
#define COLUMN_JOYPAD1_B 3
|
#define COLUMN_JOYPAD1_B 3
|
||||||
|
|
Loading…
Reference in New Issue