Subversion Repositories Kolibri OS

Rev

Rev 3458 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3458 Rev 4885
Line 8... Line 8...
8
 
8
 
9
#ifndef ru
9
#ifndef ru
10
	char *BUTTONS_CAPTIONS[]={
10
	char *BUTTONS_CAPTIONS[]={
11
	"Ïåðåçàãðóçêà    [Enter]"w, 13,
11
	"Ïåðåçàãðóçêà    [Enter]"w, 13,
12
	"Âûêëþ÷åíèå        [End]"w, 181,
12
	"Âûêëþ÷åíèå        [End]"w, 181,
13
	"ßäðî             [Home]"w, 180,
13
	//"ßäðî             [Home]"w, 180,
14
	"Îòìåíà            [Esc]"w, 27,
14
	"Îòìåíà            [Esc]"w, 27,
15
	0};
15
	0};
16
#else
16
#else
17
	char *BUTTONS_CAPTIONS[]={
17
	char *BUTTONS_CAPTIONS[]={
18
	" Reboot        [Enter]",13,
18
	" Reboot        [Enter]",13,
19
	" Power off       [End]",181,
19
	" Power off       [End]",181,
20
	" Kernel         [Home]",180,
20
	//" Kernel         [Home]",180,
21
	" Close           [Esc]",27,
21
	" Close           [Esc]",27,
22
	0};
22
	0};
Line 23... Line 23...
23
#endif
23
#endif
Line 27... Line 27...
27
unsigned char moon[6*6] = FROM "moon.raw";
27
unsigned char moon[6*6] = FROM "moon.raw";
Line 28... Line 28...
28
 
28
 
29
int WIN_SIZE_X, WIN_SIZE_Y;
29
int WIN_SIZE_X, WIN_SIZE_Y;
Line 30... Line 30...
30
int PANEL_X, PANEL_Y;
30
int PANEL_X, PANEL_Y;
31
 
31
 
Line 32... Line 32...
32
#define NIGHT_PALEL_HEIGHT	45
32
#define NIGHT_PALEL_HEIGHT	50
33
#define STARS_COUNT			30
33
#define STARS_COUNT			25
34
 
-
 
35
#define PANEL_SIZE_X		260
-
 
36
#define PANEL_SIZE_Y		165
-
 
37
 
-
 
Line 38... Line 34...
38
dword stars_col[4]={0xD2CF19, 0x716900, 0x002041}; //0x005BFF - ãîëóáîé, ðåäêî
34
 
39
 
35
#define PANEL_SIZE_X		260
40
 
36
#define PANEL_SIZE_Y		148
41
 
37
 
Line 82... Line 78...
82
 
78
 
83
 
79
 
84
	goto _DRAW;
80
	goto _DRAW;
85
	loop()
81
	loop()
86
   {
82
   {
87
		WaitEventTimeout(130);
83
		WaitEventTimeout(330);
88
		switch(EAX & 0xFF)
84
		switch(EAX & 0xFF)
89
		{
85
		{
90
		case evButton:
86
		case evButton:
Line 128... Line 124...
128
	int i=0;
124
	int i=0;
Line 129... Line 125...
129
	
125
	
130
	DrawRectangle(PANEL_X, PANEL_Y, PANEL_SIZE_X, PANEL_SIZE_Y, 0);
126
	DrawRectangle(PANEL_X, PANEL_Y, PANEL_SIZE_X, PANEL_SIZE_Y, 0);
Line 131... Line 127...
131
	DrawBar(PANEL_X+1, PANEL_Y+NIGHT_PALEL_HEIGHT+1, PANEL_SIZE_X-1, PANEL_SIZE_Y-NIGHT_PALEL_HEIGHT-1, sc.work);
127
	DrawBar(PANEL_X+1, PANEL_Y+NIGHT_PALEL_HEIGHT+1, PANEL_SIZE_X-1, PANEL_SIZE_Y-NIGHT_PALEL_HEIGHT-1, sc.work);
132
	
128
	
133
	for (i=0; i<4; i++)
129
	for (i=0; i<3; i++)
134
	{
130
	{
135
		DefineButton(PANEL_X+33, i*23 + PANEL_Y+NIGHT_PALEL_HEIGHT+16, 190,19, BUTTONS_CAPTIONS[i*2+1],sc.work_button);
131
		DefineButton(PANEL_X+33, i*23 + PANEL_Y+NIGHT_PALEL_HEIGHT+16, 190,19, BUTTONS_CAPTIONS[i*2+1],sc.work_button);
Line 136... Line 132...
136
		WriteText(PANEL_X+59, i*23 + PANEL_Y+NIGHT_PALEL_HEIGHT+22, 0x80,sc.work_button_text, BUTTONS_CAPTIONS[i*2]);
132
		WriteText(PANEL_X+59, i*23 + PANEL_Y+NIGHT_PALEL_HEIGHT+22, 0x80,sc.work_button_text, BUTTONS_CAPTIONS[i*2]);
137
	}
133
	}
Line -... Line 134...
-
 
134
		
-
 
135
	draw_stars();
138
		
136
}
139
	draw_stars();
137
 
Line 140... Line 138...
140
}
138
dword stars_col[4]={0xD2CF19, 0x716900, 0x002041, 0xEAE0DE}; //0x005BFF - ãîëóáîé, ðåäêî
Line 141... Line 139...
141
 
139
 
Line 142... Line 140...
142
void draw_stars()
140
void draw_stars()
143
{
141
{
144
 
142
 
145
	int i, x_pic, y_pic, col;
143
	int i, x_pic, y_pic, col;
146
	
144
	
147
	DrawBar(PANEL_X+1, PANEL_Y+1, PANEL_SIZE_X-1, NIGHT_PALEL_HEIGHT, 0x002041);
145
	DrawBar(PANEL_X+1, PANEL_Y+1, PANEL_SIZE_X-1, NIGHT_PALEL_HEIGHT, 0x002041);
148
	
-
 
149
	for (i=0; i
146
	
150
	{
147
	for (i=0; i
151
		x_pic = random(PANEL_SIZE_X-1);
-
 
152
		y_pic = random(NIGHT_PALEL_HEIGHT-1);
-
 
153
		col = random(3);
-
 
154
		PutPixel(PANEL_X+1 +x_pic, PANEL_Y+1 +y_pic, stars_col[col]);
-
 
155
	}
148
	{
156
	/*for (i=0; i<3; i++)
149
		x_pic = random(PANEL_SIZE_X-2);
157
	{
150
		y_pic = random(NIGHT_PALEL_HEIGHT-2);
158
		x_pic = random(PANEL_SIZE_X-8)+4;
151
		col = random(4);
159
		y_pic = random(NIGHT_PALEL_HEIGHT-8)+4;
152
		PutPixel(PANEL_X+2 +x_pic, PANEL_Y+2 +y_pic, stars_col[col]);
Line -... Line 153...
-
 
153
		if (stars_col[col]==0xD2CF19)
160
		
154
		{
161
		PutPixel(PANEL_X +x_pic, PANEL_Y +y_pic, stars_col[0]);
155
			PutPixel(PANEL_X+2 +x_pic+1, PANEL_Y+2 +y_pic, stars_col[col+1]);