Rev 7765 | Rev 8389 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7765 | Rev 7995 | ||
---|---|---|---|
Line 94... | Line 94... | ||
94 | enum { |
94 | enum { |
95 | PLAYBACK_MODE_STOPED, |
95 | PLAYBACK_MODE_STOPED, |
96 | PLAYBACK_MODE_PLAYING |
96 | PLAYBACK_MODE_PLAYING |
97 | }; |
97 | }; |
Line -... | Line 98... | ||
- | 98 | ||
- | 99 | libimg_image skin; |
|
98 | 100 | ||
Line 99... | Line 101... | ||
99 | #define LAST_FOLDER_EXISTS 1 |
101 | #define LAST_FOLDER_EXISTS 1 |
100 | 102 | ||
101 | //===================================================// |
103 | //===================================================// |
Line 125... | Line 127... | ||
125 | if (!param) { |
127 | if (!param) { |
126 | notify("'Pixie Player\nPress O key to open MP3/WAV/XM file' -St"); |
128 | notify("'Pixie Player\nPress O key to open MP3/WAV/XM file' -St"); |
127 | if (work_folder) param=LAST_FOLDER_EXISTS; |
129 | if (work_folder) param=LAST_FOLDER_EXISTS; |
128 | } |
130 | } |
129 | kfont.init(DEFAULT_FONT); |
131 | kfont.init(DEFAULT_FONT); |
130 | SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
132 | @SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
131 | loop() |
133 | loop() switch(@WaitEventTimeout(10)) |
132 | { |
134 | { |
133 | WaitEventTimeout(10); |
- | |
134 | switch(EAX & 0xFF) { |
- | |
135 | case evMouse: |
135 | case evMouse: |
136 | mouse.get(); |
136 | mouse.get(); |
137 | scrollbar_v_mouse (#scroll1); |
137 | scrollbar_v_mouse (#scroll1); |
138 | if (list.first != scroll1.position) |
138 | if (list.first != scroll1.position) |
139 | { |
139 | { |
Line 151... | Line 151... | ||
151 | if(mouse.key&MOUSE_LEFT) && (mouse.x<14) |
151 | if(mouse.key&MOUSE_LEFT) && (mouse.x<14) |
152 | && (window_mode == WINDOW_MODE_SMALL) EventDragWindow(); |
152 | && (window_mode == WINDOW_MODE_SMALL) EventDragWindow(); |
153 | if (mouse.down) && (mouse.y>skin_height) && (mouse.key&MOUSE_RIGHT) EventShowAbout(); |
153 | if (mouse.down) && (mouse.y>skin_height) && (mouse.key&MOUSE_RIGHT) EventShowAbout(); |
154 | break; |
154 | break; |
155 | case evButton: |
155 | case evButton: |
156 | switch(GetButtonID()) { |
156 | switch(@GetButtonID()) { |
157 | case BUTTON_WINDOW_CLOSE: EventExitApp(); break; |
157 | case BUTTON_WINDOW_CLOSE: EventExitApp(); break; |
158 | case BUTTON_WINDOW_MINIMIZE: MinimizeWindow(); break; |
158 | case BUTTON_WINDOW_MINIMIZE: MinimizeWindow(); break; |
159 | case BUTTON_WINDOW_REDUCE: EventChangeWindowMode(); break; |
159 | case BUTTON_WINDOW_REDUCE: EventChangeWindowMode(); break; |
160 | case BUTTON_PLAYBACK_PREV: EventPlaybackPrevious(); break; |
160 | case BUTTON_PLAYBACK_PREV: EventPlaybackPrevious(); break; |
161 | case BUTTON_PLAYBACK_NEXT: EventPlaybackNext(); break; |
161 | case BUTTON_PLAYBACK_NEXT: EventPlaybackNext(); break; |
Line 204... | Line 204... | ||
204 | break; |
204 | break; |
205 | default: |
205 | default: |
206 | EventCheckSongFinished(); |
206 | EventCheckSongFinished(); |
207 | } |
207 | } |
208 | } |
208 | } |
209 | } |
- | |
Line 210... | Line 209... | ||
210 | 209 | ||
211 | 210 | ||
212 | void DrawPlayList() |
211 | void DrawPlayList() |
Line 339... | Line 338... | ||
339 | theme.color_top_panel_folder_name, list.font_type, #title); |
338 | theme.color_top_panel_folder_name, list.font_type, #title); |
340 | } |
339 | } |
Line 341... | Line 340... | ||
341 | 340 | ||
342 | void DrawAboutWindow() |
341 | void DrawAboutWindow() |
- | 342 | { |
|
343 | { |
343 | #define ABOUT_W 400 |
344 | proc_info pop_up; |
344 | #define ABOUT_H 410 |
345 | loop() switch(WaitEvent()) |
345 | loop() switch(@WaitEvent()) |
346 | { |
- | |
347 | case evButton: |
346 | { |
348 | ExitProcess(); |
- | |
349 | break; |
- | |
350 | case evKey: |
- | |
351 | GetKeys(); |
347 | case evButton: ExitProcess(); break; |
352 | if (key_scancode == SCAN_CODE_ESC) ExitProcess(); |
- | |
353 | break; |
348 | case evKey: if (GetKeyScancode() == SCAN_CODE_ESC) ExitProcess(); break; |
354 | case evReDraw: |
349 | case evReDraw: |
355 | DefineDragableWindow(150, 200, 400, 400); |
- | |
Line 356... | Line 350... | ||
356 | GetProcessInfo(#pop_up, SelfInfo); |
350 | DefineDragableWindow(150, 200, ABOUT_W, ABOUT_H); |
357 | 351 | ||
Line 358... | Line 352... | ||
358 | DrawBar(0, 0, pop_up.width, pop_up.height, theme.color_top_panel_bg); |
352 | DrawBar(0, 0, ABOUT_W, ABOUT_H, theme.color_top_panel_bg); |
359 | DrawRectangle(0, 0, pop_up.width, pop_up.height, theme.color_list_border); |
353 | DrawRectangle(0, 0, ABOUT_W, ABOUT_H, theme.color_list_border); |
360 | 354 | ||
361 | DefineHiddenButton(pop_up.width - 27, 1, 26, 15, BUTTON_WINDOW_CLOSE); |
355 | //DefineHiddenButton(ABOUT_W - 27, 1, 26, 15, BUTTON_WINDOW_CLOSE); |
Line 362... | Line 356... | ||
362 | //img_draw stdcall(skin.image, pop_up.width-28, 0, 28, 18, skin.w - 29, 0); |
356 | //skin.draw(ABOUT_W-28, 0, 28, 18, skin.w - 29, 0); |
363 | DrawCaptButton(pop_up.width-10-80, pop_up.height - 34, 80, 24, 2, |
357 | DrawCaptButton(ABOUT_W-10-80, ABOUT_H - 34, 80, 24, 2, |
Line 364... | Line 358... | ||
364 | 0x171717, 0xF5EFB3, "Cool"); |
358 | theme.color_top_panel_bg, 0xF5EFB3, "Cool"); |
365 | 359 | ||
366 | WriteText(131,16, 0x81, 0x8E7C61, "Pixie Player"); |
360 | WriteText(131,16, 0x81, 0x8E7C61, "Pixie Player"); |
367 | WriteText(130,15, 0x81, 0xF5EFB3, "Pixie Player"); |
- | |
368 | 361 | WriteText(130,15, 0x81, 0xF5EFB3, "Pixie Player"); |
|
369 | WriteTextLines(10, 40, 0x90, theme.color_top_panel_song_name, ABOUT_MESSAGE, 19); |
362 | |
Line 370... | Line 363... | ||
370 | DrawIcon32(45, 15, theme.color_top_panel_bg, 65); |
363 | WriteTextLines(10, 40, 0x90, theme.color_top_panel_song_name, ABOUT_MESSAGE, 19); |
371 | DrawIcon32(pop_up.width-32-45, 15, theme.color_top_panel_bg, 65); |
364 | DrawIcon32(45, 15, theme.color_top_panel_bg, 65); |