Rev 3533 | Rev 5485 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3533 | Rev 4583 | ||
---|---|---|---|
Line 103... | Line 103... | ||
103 | 103 | ||
104 | //Asper_____________________Play List code start_____________________________ |
104 | //Asper_____________________Play List code start_____________________________ |
105 | #define PLI_BUTTON_HEIGHT 13 |
105 | #define PLI_BUTTON_HEIGHT 13 |
106 | #define PL_MAX_SHOWN_ITEMS (pl_wh-PLI_BUTTON_HEIGHT-40)/PLI_BUTTON_HEIGHT |
106 | #define PL_MAX_SHOWN_ITEMS (pl_wh-PLI_BUTTON_HEIGHT-40)/PLI_BUTTON_HEIGHT |
- | 107 | #define MAX_TEXT_WIDTH 46 |
|
Line 107... | Line 108... | ||
107 | #define MAX_TEXT_WIDTH 46 |
108 | #define MAX_PATH_LEN 1024 |
108 | 109 | ||
109 | int currSelected, currActive, currFirstShowed; |
110 | int currSelected, currActive, currFirstShowed; |
110 | unsigned char *pl_buff; |
111 | unsigned char *pl_buff; |
Line 375... | Line 376... | ||
375 | ch=plbuff[i]; |
376 | ch=plbuff[i]; |
376 | if (ch!='#' && i && plbuff[i-1]=='\n') |
377 | if (ch!='#' && i && plbuff[i-1]=='\n') |
377 | count++; |
378 | count++; |
378 | if (count-1==index) |
379 | if (count-1==index) |
379 | { |
380 | { |
380 | if (j>MAX_TEXT_WIDTH || ch=='\r' || ch=='\n') |
381 | if (j>MAX_PATH_LEN || ch=='\r' || ch=='\n') |
381 | { |
382 | { |
382 | name[j]='\0'; |
383 | name[j]='\0'; |
383 | break; |
384 | break; |
384 | } |
385 | } |
385 | if (ch=='\\') ch='/'; |
386 | if (ch=='\\') ch='/'; |
Line 407... | Line 408... | ||
407 | return count; |
408 | return count; |
408 | } |
409 | } |
Line 409... | Line 410... | ||
409 | 410 | ||
410 | int ShowPLContent(char *filebuffer) |
411 | int ShowPLContent(char *filebuffer) |
411 | { |
412 | { |
412 | char st[MAX_TEXT_WIDTH+10]="", tmp[MAX_TEXT_WIDTH+1]=""; |
413 | char st[MAX_PATH_LEN+10]="", tmp[MAX_PATH_LEN+1]=""; |
413 | unsigned int len=8,i; |
414 | unsigned int len=8,i; |
Line 414... | Line 415... | ||
414 | DWORD text_color; |
415 | DWORD text_color; |
415 | 416 | ||
Line 435... | Line 436... | ||
435 | DWORD rc = 0xA0FFA0; //R button text color |
436 | DWORD rc = 0xA0FFA0; //R button text color |
436 | if (!replay) rc = 0x404040; |
437 | if (!replay) rc = 0x404040; |
437 | write_text(14,74,rc|FONT0,button_R,sizeof(button_R)-1); |
438 | write_text(14,74,rc|FONT0,button_R,sizeof(button_R)-1); |
438 | } |
439 | } |
Line 439... | Line 440... | ||
439 | 440 | ||
440 | void update_dinamic_content() //Asper + |
441 | void update_dynamic_content() //Asper + |
441 | { |
442 | { |
442 | int len = strlen(filename); |
443 | int len = strlen(filename); |
443 | if (len > 47) len = 47; |
444 | if (len > 47) len = 47; |
444 | draw_bar(7,41,286,11,main_wc); |
445 | draw_bar(7,41,286,11,main_wc); |
Line 463... | Line 464... | ||
463 | make_button(268,70,25,13, 0x16|BT_NORMAL,main_bc); //Asper+ PL button |
464 | make_button(268,70,25,13, 0x16|BT_NORMAL,main_bc); //Asper+ PL button |
464 | make_button(10,70,12,13, 0x17|BT_NORMAL,main_wc); //Asper+ R button |
465 | make_button(10,70,12,13, 0x17|BT_NORMAL,main_wc); //Asper+ R button |
Line 465... | Line 466... | ||
465 | 466 | ||
Line 466... | Line 467... | ||
466 | make_button(7,41,286,11, 0x30|BT_HIDE|BT_NOFRAME,main_wc); |
467 | make_button(7,41,286,11, 0x30|BT_HIDE|BT_NOFRAME,main_wc); |
467 | 468 | ||
468 | update_dinamic_content(); |
469 | update_dynamic_content(); |
469 | write_text(8,8,FONT0, header, sizeof(header)-1); /* uFMOD integration */ |
470 | write_text(8,8,FONT0, header, sizeof(header)-1); /* uFMOD integration */ |
Line 470... | Line 471... | ||
470 | write_text(12,28,main_wc|FONT0,buttons_text,sizeof(buttons_wav)-1); /* uFMOD integration */ |
471 | write_text(12,28,main_wc|FONT0,buttons_text,sizeof(buttons_wav)-1); /* uFMOD integration */ |
Line 1095... | Line 1096... | ||
1095 | }; |
1096 | }; |
1096 | break; |
1097 | break; |
Line 1097... | Line 1098... | ||
1097 | 1098 | ||
1098 | case EV_IPC: |
1099 | case EV_IPC: |
1099 | *ipc_buff='\0'; |
1100 | *ipc_buff='\0'; |
1100 | update_dinamic_content(); |
1101 | update_dynamic_content(); |
Line 1101... | Line 1102... | ||
1101 | break; |
1102 | break; |
1102 | 1103 | ||
1103 | }; |
1104 | }; |