forked from KolibriOS/kolibrios
Pixie 1.31: Goto next/previous track using Ctrl+Left/Right keys
git-svn-id: svn://kolibrios.org@5795 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
b0a21af9f0
commit
2c702c3dda
@ -371,7 +371,7 @@ void main()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TestBit(key_modifier, 2))
|
if (key_modifier&KEY_LCTRL) || (key_modifier&KEY_RCTRL)
|
||||||
{
|
{
|
||||||
switch(key_scancode)
|
switch(key_scancode)
|
||||||
{
|
{
|
||||||
|
@ -84,6 +84,18 @@ char program_path[4096];
|
|||||||
#define SCAN_CODE_PGDN 081
|
#define SCAN_CODE_PGDN 081
|
||||||
#define SCAN_CODE_PGUP 073
|
#define SCAN_CODE_PGUP 073
|
||||||
|
|
||||||
|
#define KEY_LSHIFT 00000000001b
|
||||||
|
#define KEY_RSHIFT 00000000010b
|
||||||
|
#define KEY_LCTRL 00000000100b
|
||||||
|
#define KEY_RCTRL 00000001000b
|
||||||
|
#define KEY_LALT 00000010000b
|
||||||
|
#define KEY_RALT 00000100000b
|
||||||
|
#define KEY_CAPSLOCK 00001000000b
|
||||||
|
#define KEY_NUMLOCK 00010000000b
|
||||||
|
#define KEY_SCROLLLOCK 00100000000b
|
||||||
|
#define KEY_LWIN 01000000000b
|
||||||
|
#define KEY_RWIN 10000000000b
|
||||||
|
|
||||||
|
|
||||||
inline fastcall word GetKey() //+Gluk fix
|
inline fastcall word GetKey() //+Gluk fix
|
||||||
{
|
{
|
||||||
|
@ -20,6 +20,11 @@ od_filter filter2 = { "MP3", 0 };
|
|||||||
|
|
||||||
#include "..\lib\patterns\libimg_load_skin.h"
|
#include "..\lib\patterns\libimg_load_skin.h"
|
||||||
|
|
||||||
|
#define ABOUT_MESSAGE "'Pixies Player v1.31\n\nOpen file: O key\nChange skin: F1/F2
|
||||||
|
Play/Stop: Space or P key\nStart playing selected file: Enter
|
||||||
|
Goto next/previous track: Ctrl + Left/Right
|
||||||
|
Change sound volume: Left/Right key\nMute: M key' -St\n"
|
||||||
|
|
||||||
scroll_bar scroll1 = { 5,200,398,44,0,2,115,15,0,0xeeeeee,0xBBBbbb,0xeeeeee,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1};
|
scroll_bar scroll1 = { 5,200,398,44,0,2,115,15,0,0xeeeeee,0xBBBbbb,0xeeeeee,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1};
|
||||||
llist list;
|
llist list;
|
||||||
proc_info Form;
|
proc_info Form;
|
||||||
@ -133,9 +138,7 @@ void main()
|
|||||||
if (mouse.vert) if (list.MouseScroll(mouse.vert)) DrawPlayList();
|
if (mouse.vert) if (list.MouseScroll(mouse.vert)) DrawPlayList();
|
||||||
if (mouse.dblclick) {current_playing_file_n=list.current; StartPlayingMp3();}
|
if (mouse.dblclick) {current_playing_file_n=list.current; StartPlayingMp3();}
|
||||||
if (mouse.down) && (mouse.key&MOUSE_LEFT) if (list.ProcessMouse(mouse.x, mouse.y)) DrawPlayList();
|
if (mouse.down) && (mouse.key&MOUSE_LEFT) if (list.ProcessMouse(mouse.x, mouse.y)) DrawPlayList();
|
||||||
if (mouse.down) && (mouse.key&MOUSE_RIGHT) NotifyAndBackFocus(
|
if (mouse.down) && (mouse.key&MOUSE_RIGHT) NotifyAndBackFocus(ABOUT_MESSAGE);
|
||||||
"'Pixies Player v1.3\n\nOpen file: O key\nChange skin: F1/F2\nPlay/Stop: Space or P key\nStart playing selected file: Enter\nChange sound volume: Left/Right key\nMute: M key' -St\n"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
//drag window - emulate windows header
|
//drag window - emulate windows header
|
||||||
if(mouse.key&MOUSE_LEFT) && (mouse.y<skin.h) && (mouse.x < 13)
|
if(mouse.key&MOUSE_LEFT) && (mouse.y<skin.h) && (mouse.x < 13)
|
||||||
@ -189,11 +192,11 @@ void main()
|
|||||||
MoveSize(win_x_normal, win_y_normal, skin.w -1 ,skin.h + list.h);
|
MoveSize(win_x_normal, win_y_normal, skin.w -1 ,skin.h + list.h);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BUTTON_PLAYBACK_PREV:
|
case BUTTON_PLAYBACK_PREV: _PLAY_PREVIOUS:
|
||||||
current_playing_file_n--;
|
current_playing_file_n--;
|
||||||
StartPlayingMp3();
|
StartPlayingMp3();
|
||||||
break;
|
break;
|
||||||
case BUTTON_PLAYBACK_NEXT:
|
case BUTTON_PLAYBACK_NEXT: _PLAY_NEXT:
|
||||||
current_playing_file_n++;
|
current_playing_file_n++;
|
||||||
StartPlayingMp3();
|
StartPlayingMp3();
|
||||||
break;
|
break;
|
||||||
@ -204,6 +207,11 @@ void main()
|
|||||||
break;
|
break;
|
||||||
case evKey:
|
case evKey:
|
||||||
GetKeys();
|
GetKeys();
|
||||||
|
if (key_modifier&KEY_LCTRL) || (key_modifier&KEY_RCTRL) {
|
||||||
|
if (key_scancode==SCAN_CODE_LEFT) goto _PLAY_PREVIOUS;
|
||||||
|
if (key_scancode==SCAN_CODE_RIGHT) goto _PLAY_NEXT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (key_scancode==024) { OpenDialog_start stdcall (#o_dialog); if (o_dialog.status==1) OpenFolder(#openfile_path); }
|
if (key_scancode==024) { OpenDialog_start stdcall (#o_dialog); if (o_dialog.status==1) OpenFolder(#openfile_path); }
|
||||||
if (key_scancode==059) SetColorThemeLight();
|
if (key_scancode==059) SetColorThemeLight();
|
||||||
if (key_scancode==060) SetColorThemeDark();
|
if (key_scancode==060) SetColorThemeDark();
|
||||||
|
Loading…
Reference in New Issue
Block a user