forked from KolibriOS/kolibrios
CMM: lots of fixes
git-svn-id: svn://kolibrios.org@4885 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
10100a464c
commit
11b7b3cd30
@ -28,8 +28,8 @@ unsigned char icons[]= FROM "icons.raw";
|
||||
|
||||
|
||||
#define PANEL_H 30
|
||||
#define SKINS_STANDART_PATH "/kolibrios/res/skins/"
|
||||
#define WALP_STANDART_PATH "/kolibrios/res/wallpapers/"
|
||||
#define SKINS_STANDART_PATH "/kolibrios/res/skins"
|
||||
#define WALP_STANDART_PATH "/kolibrios/res/wallpapers"
|
||||
|
||||
llist list[2];
|
||||
int active;
|
||||
@ -65,11 +65,11 @@ void Open_Dir()
|
||||
{
|
||||
strcpy(#temp_filename, j*304 + buf+72);
|
||||
strlwr(#temp_filename);
|
||||
if (active==SKINS) if (strcmp(#temp_filename+strlen(#temp_filename)-4,".skn")!=0) continue;
|
||||
if (active==WALLPAPERS) if (strcmp(#temp_filename+strlen(#temp_filename)-4,".txt")==0) continue;
|
||||
if (active==SKINS) if (strcmpi(#temp_filename+strlen(#temp_filename)-4,".skn")!=0) continue;
|
||||
if (active==WALLPAPERS) if (strcmpi(#temp_filename+strlen(#temp_filename)-4,".txt")==0) continue;
|
||||
cur = list[active].count;
|
||||
files_mas[cur]=j;
|
||||
if (!strcmp("default.skn",#temp_filename)) files_mas[0]><files_mas[list[active].count];
|
||||
if (!strcmpi("default.skn",#temp_filename)) files_mas[0]><files_mas[list[active].count];
|
||||
list[active].count++;
|
||||
}
|
||||
Sort_by_Name(0, list[active].count-1);
|
||||
@ -118,13 +118,13 @@ void GetFiles()
|
||||
{
|
||||
strcpy(#folder_path, SKINS_STANDART_PATH);
|
||||
Open_Dir();
|
||||
if (!list[active].count) notify("No skins were found");
|
||||
if (!list[active].count) notify("'No skins were found' -E");
|
||||
}
|
||||
if (list[WALLPAPERS].active)
|
||||
{
|
||||
strcpy(#folder_path, WALP_STANDART_PATH);
|
||||
Open_Dir();
|
||||
if (!list[active].count) notify("No wallpapers were found");
|
||||
if (!list[active].count) notify("'No wallpapers were found' -E");
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,6 +134,7 @@ void Apply()
|
||||
{
|
||||
strcpy(#cur_file_path, #folder_path);
|
||||
cur = list[SKINS].current;
|
||||
chrcat(#cur_file_path, '/');
|
||||
strcat(#cur_file_path, files_mas[cur]*304 + buf+72);
|
||||
SetSystemSkin(#cur_file_path);
|
||||
//Draw_List();
|
||||
@ -143,6 +144,7 @@ void Apply()
|
||||
strcpy(#cur_file_path, "\\S__");
|
||||
strcat(#cur_file_path, #folder_path);
|
||||
cur = list[WALLPAPERS].current;
|
||||
chrcat(#cur_file_path, '/');
|
||||
strcat(#cur_file_path, files_mas[cur]*304 + buf+72);
|
||||
RunProgram("/sys/media/kiv", #cur_file_path);
|
||||
Draw_List();
|
||||
@ -163,7 +165,7 @@ void main()
|
||||
|
||||
mem_Init();
|
||||
SetEventMask(0x27);
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("Fatal Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();}
|
||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("'Fatal Error: library doesn't exists /rd/1/lib/box_lib.obj' -E");
|
||||
list[SKINS].current = list[WALLPAPERS].current = -1;
|
||||
list[SKINS].first = list[WALLPAPERS].first = 0;
|
||||
TabClick(WALLPAPERS);
|
||||
|
@ -10,14 +10,14 @@
|
||||
char *BUTTONS_CAPTIONS[]={
|
||||
"Ïåðåçàãðóçêà [Enter]"w, 13,
|
||||
"Âûêëþ÷åíèå [End]"w, 181,
|
||||
"ßäðî [Home]"w, 180,
|
||||
//"ßäðî [Home]"w, 180,
|
||||
"Îòìåíà [Esc]"w, 27,
|
||||
0};
|
||||
#else
|
||||
char *BUTTONS_CAPTIONS[]={
|
||||
" Reboot [Enter]",13,
|
||||
" Power off [End]",181,
|
||||
" Kernel [Home]",180,
|
||||
//" Kernel [Home]",180,
|
||||
" Close [Esc]",27,
|
||||
0};
|
||||
#endif
|
||||
@ -29,15 +29,11 @@ unsigned char moon[6*6] = FROM "moon.raw";
|
||||
int WIN_SIZE_X, WIN_SIZE_Y;
|
||||
int PANEL_X, PANEL_Y;
|
||||
|
||||
#define NIGHT_PALEL_HEIGHT 45
|
||||
#define STARS_COUNT 30
|
||||
#define NIGHT_PALEL_HEIGHT 50
|
||||
#define STARS_COUNT 25
|
||||
|
||||
#define PANEL_SIZE_X 260
|
||||
#define PANEL_SIZE_Y 165
|
||||
|
||||
dword stars_col[4]={0xD2CF19, 0x716900, 0x002041}; //0x005BFF - ãîëóáîé, ðåäêî
|
||||
|
||||
|
||||
#define PANEL_SIZE_Y 148
|
||||
|
||||
:void ShadowScreen(dword img, w, h)
|
||||
{
|
||||
@ -84,7 +80,7 @@ void main()
|
||||
goto _DRAW;
|
||||
loop()
|
||||
{
|
||||
WaitEventTimeout(130);
|
||||
WaitEventTimeout(330);
|
||||
switch(EAX & 0xFF)
|
||||
{
|
||||
case evButton:
|
||||
@ -130,7 +126,7 @@ void draw_main_area()
|
||||
DrawRectangle(PANEL_X, PANEL_Y, PANEL_SIZE_X, PANEL_SIZE_Y, 0);
|
||||
DrawBar(PANEL_X+1, PANEL_Y+NIGHT_PALEL_HEIGHT+1, PANEL_SIZE_X-1, PANEL_SIZE_Y-NIGHT_PALEL_HEIGHT-1, sc.work);
|
||||
|
||||
for (i=0; i<4; i++)
|
||||
for (i=0; i<3; i++)
|
||||
{
|
||||
DefineButton(PANEL_X+33, i*23 + PANEL_Y+NIGHT_PALEL_HEIGHT+16, 190,19, BUTTONS_CAPTIONS[i*2+1],sc.work_button);
|
||||
WriteText(PANEL_X+59, i*23 + PANEL_Y+NIGHT_PALEL_HEIGHT+22, 0x80,sc.work_button_text, BUTTONS_CAPTIONS[i*2]);
|
||||
@ -139,6 +135,8 @@ void draw_main_area()
|
||||
draw_stars();
|
||||
}
|
||||
|
||||
dword stars_col[4]={0xD2CF19, 0x716900, 0x002041, 0xEAE0DE}; //0x005BFF - ãîëóáîé, ðåäêî
|
||||
|
||||
void draw_stars()
|
||||
{
|
||||
|
||||
@ -148,24 +146,20 @@ void draw_stars()
|
||||
|
||||
for (i=0; i<STARS_COUNT; i++)
|
||||
{
|
||||
x_pic = random(PANEL_SIZE_X-1);
|
||||
y_pic = random(NIGHT_PALEL_HEIGHT-1);
|
||||
col = random(3);
|
||||
PutPixel(PANEL_X+1 +x_pic, PANEL_Y+1 +y_pic, stars_col[col]);
|
||||
}
|
||||
/*for (i=0; i<3; i++)
|
||||
x_pic = random(PANEL_SIZE_X-2);
|
||||
y_pic = random(NIGHT_PALEL_HEIGHT-2);
|
||||
col = random(4);
|
||||
PutPixel(PANEL_X+2 +x_pic, PANEL_Y+2 +y_pic, stars_col[col]);
|
||||
if (stars_col[col]==0xD2CF19)
|
||||
{
|
||||
x_pic = random(PANEL_SIZE_X-8)+4;
|
||||
y_pic = random(NIGHT_PALEL_HEIGHT-8)+4;
|
||||
PutPixel(PANEL_X+2 +x_pic+1, PANEL_Y+2 +y_pic, stars_col[col+1]);
|
||||
PutPixel(PANEL_X+2 +x_pic-1, PANEL_Y+2 +y_pic, stars_col[col+1]);
|
||||
PutPixel(PANEL_X+2 +x_pic, PANEL_Y+2 +y_pic-1, stars_col[col+1]);
|
||||
PutPixel(PANEL_X+2 +x_pic, PANEL_Y+2 +y_pic+1, stars_col[col+1]);
|
||||
}
|
||||
|
||||
PutPixel(PANEL_X +x_pic, PANEL_Y +y_pic, stars_col[0]);
|
||||
PutPixel(PANEL_X+1 +x_pic, PANEL_Y +y_pic, stars_col[1]);
|
||||
PutPixel(PANEL_X-1 +x_pic, PANEL_Y +y_pic, stars_col[1]);
|
||||
PutPixel(PANEL_X +x_pic, PANEL_Y +y_pic+1, stars_col[1]);
|
||||
PutPixel(PANEL_X +x_pic, PANEL_Y +y_pic-1, stars_col[1]);
|
||||
}*/
|
||||
|
||||
_PutImage(PANEL_X+PANEL_SIZE_X-60,PANEL_Y+10, 6,6, #moon);
|
||||
}
|
||||
_PutImage(PANEL_X+PANEL_SIZE_X-60+random(3),PANEL_Y+10+random(3), 6,6, #moon);
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,7 +29,6 @@ void main()
|
||||
{
|
||||
GetProcessInfo(#Process, i);
|
||||
if (strcmpi(#Process.name, "@icon")==0) KillProcess(Process.ID);
|
||||
if (strcmpi(#Process.name, "@panel")==0) KillProcess(Process.ID);
|
||||
if (strcmpi(#Process.name, "@docky")==0) KillProcess(Process.ID);
|
||||
}
|
||||
SetAddApplDir("kolibrios", abspath("kolibrios")+1);
|
||||
|
@ -38,7 +38,7 @@ void main()
|
||||
}
|
||||
}
|
||||
}
|
||||
notify("'<EFBFBD>¥ ¬®£ã ©â¨ installer.kex ¨ ¢ ®¤®¬ ª®à¥ ¤¨áª !\n<EFBFBD>®¯à®¡ã©â¥ ©â¨ ¨ § ¯ãáâ¨âì ¥£® ¢àãçãî.' -dE");
|
||||
notify("'KolibriN\n<EFBFBD>¥ ¬®£ã ©â¨ installer.kex ¨ ¢ ®¤®¬ ª®à¥ ¤¨áª !\n<EFBFBD>®¯à®¡ã©â¥ ©â¨ ¨ § ¯ãáâ¨âì ¥£® ¢àãçãî.' -dtE");
|
||||
ExitProcess();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user