Subversion Repositories Kolibri OS

Rev

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

Rev 9453 Rev 9539
Line 1... Line 1...
1
#define MEMSIZE 4096*20
1
#define MEMSIZE 1024*40
2
#include "..\lib\strings.h" 
2
#include "..\lib\strings.h" 
3
#include "..\lib\mem.h" 
3
#include "..\lib\mem.h" 
4
#include "..\lib\gui.h"
4
#include "..\lib\gui.h"
5
#include "..\lib\obj\proc_lib.h"
5
#include "..\lib\obj\proc_lib.h"
6
#include "..\lib\patterns\simple_open_dialog.h"
6
#include "..\lib\patterns\simple_open_dialog.h"
Line 11... Line 11...
11
//                                                   //
11
//                                                   //
12
//                       DATA                        //
12
//                       DATA                        //
13
//                                                   //
13
//                                                   //
14
//===================================================//
14
//===================================================//
Line -... Line 15...
-
 
15
 
15
 
16
#define WINW 570
16
proc_info Form;
17
#define WINH 300
-
 
18
#define CONX 30 //content X pos
-
 
19
#define SCRX WINW-180
Line 17... Line 20...
17
#define CONX 30 //content X pos
20
#define SCRY 20
18
 
21
 
19
char default_dir[] = "/rd/1";
-
 
20
od_filter filter2 = {"",0};
-
 
21
 
-
 
22
dword scr = FROM "scr.raw_8bit";
-
 
Line 23... Line 22...
23
dword scr_pal[] = {0xFFFFFF,0xBBDDFF,0x4166B5,0xE0E4E6,0xAFBEDD,0xC4D4E8,0x52ACDD,0x000000,
22
char default_dir[] = "/rd/1";
24
0xE9DAB2,0xC99811,0xFDF9D4,0xF8B93C,0xFDEEBE,0xFBEBA6,0xDFAF4F,0xF3D57C};
23
od_filter filter2;
Line 25... Line 24...
25
 
24
 
Line 40... Line 39...
40
?define DESCRIPTION_TEXT "®¯à®¡ã©â¥ ­ ©â¨ ¥¥ á ¬®áâ®ï⥫쭮.
39
?define DESCRIPTION_TEXT "®¯à®¡ã©â¥ ­ ©â¨ ¥¥ á ¬®áâ®ï⥫쭮.
41
‘®¤¥à¦¨¬®¥ ¨áª®¬®© ¯ ¯ª¨ ¯®ª § ­® ­  
40
‘®¤¥à¦¨¬®¥ ¨áª®¬®© ¯ ¯ª¨ ¯®ª § ­® ­  
42
ª à⨭ª¥ á¯à ¢ . ‚ á«ãç ¥ ­¥¢¥à­® 
41
ª à⨭ª¥ á¯à ¢ . ‚ á«ãç ¥ ­¥¢¥à­® 
43
¢ë¡à ­­®© ¯ ¯ª¨ âॡã¥âáï ¢ë¯®«­¨âì 
42
¢ë¡à ­­®© ¯ ¯ª¨ âॡã¥âáï ¢ë¯®«­¨âì 
44
¯¥à¥§ £à㧪㠏Š ¨ ¯®¯à®¡®¢ âì á­®¢ ."
43
¯¥à¥§ £à㧪㠏Š ¨ ¯®¯à®¡®¢ âì á­®¢ ."
45
?define MANUALLY_BUTTON_TEXT " ©â¨ /kolibrios/..."
44
?define MANUALLY_BUTTON_TEXT "“ª § âì ¯ ¯ªã /kolibrios/..."
46
?define OPEN_ANYWAY_BUTTON_TEXT "‡ ¯ãáâ¨âì APP+ (­¥ª®â®àë¥ ¯à®£à ¬¬ë ¡ã¤ãâ ­¥¤®áâ㯭ë)"
45
?define OPEN_ANYWAY_BUTTON_TEXT "‡ ¯ãáâ¨âì APP+ (­¥ª®â®àë¥ ¯à®£à ¬¬ë ¡ã¤ãâ ­¥¤®áâ㯭ë)"
47
#else
46
#else
48
?define WINDOW_TITLE_TEXT "Warning! It's important."
47
?define WINDOW_TITLE_TEXT "Warning! It's important."
49
?define CONTENT_HEADER_TEXT "/KOLIBRIOS/ IS NOT MOUNTED"
48
?define CONTENT_HEADER_TEXT "/KOLIBRIOS/ IS NOT MOUNTED"
50
?define DESCRIPTION_TEXT "Try to find it manually. It should look
49
?define DESCRIPTION_TEXT "Try to find it manually. It should look
51
like image on the right.
50
like image on the right.
52
Note: this action can be done only once 
51
Note: this action can be done only once 
53
per 1 session of the OS running. If you 
52
per 1 session of the OS running. If you 
54
will choose the wrong folder then you 
53
will choose the wrong folder then you 
55
need to reboot system to try again."
54
need to reboot a system to try again."
56
?define MANUALLY_BUTTON_TEXT "Choose /kolibrios/ folder..."
55
?define MANUALLY_BUTTON_TEXT "Choose /kolibrios/ folder..."
57
?define OPEN_ANYWAY_BUTTON_TEXT "Open APP+ anyway (some apps will be unavailable)"
56
?define OPEN_ANYWAY_BUTTON_TEXT "Open APP+ anyway (some programs won't be available)  "
58
#endif
57
#endif
Line -... Line 58...
-
 
58
 
-
 
59
char kolibrios_dirs[] = "..\0     3D     \0demos  \0develop\0drivers\0emul   \0games  \0grafx2";
59
 
60
 
60
//===================================================//
61
//===================================================//
61
//                                                   //
62
//                                                   //
62
//                       CODE                        //
63
//                       CODE                        //
63
//                                                   //
64
//                                                   //
Line 99... Line 100...
99
	}
100
	}
100
}
101
}
Line 101... Line 102...
101
 
102
 
102
void draw_window()
103
void draw_window()
103
{
-
 
104
	incn y;
104
{
105
	sc.get();
105
	sc.get();
106
	DefineAndDrawWindow(screen.width-570/2, 100, 570, 300+skin_height, 0x34, sc.work, WINDOW_TITLE_TEXT,0);
-
 
107
	GetProcessInfo(#Form, SelfInfo);
106
	DefineAndDrawWindow(screen.width-WINW/2, 100, WINW, WINH+skin_height, 0x34, sc.work, WINDOW_TITLE_TEXT,0);
108
	WriteTextB(CONX+2,y.set(20)+2,0x81,MixColors(sc.work, 0xB92234,220),CONTENT_HEADER_TEXT);
107
	WriteTextB(CONX+2,SCRY+2,0x81,MixColors(sc.work, 0xB92234,220),CONTENT_HEADER_TEXT);
109
	WriteTextB(CONX,y.n,0x81,0xB92234,CONTENT_HEADER_TEXT);
-
 
110
	
108
	WriteTextB(CONX,SCRY,0x81,0xB92234,CONTENT_HEADER_TEXT);
111
	PutPaletteImage(#scr,144,171,Form.cwidth-180,y.n,8,#scr_pal);
-
 
112
	DrawRectangle(Form.cwidth-180-1,y.n-1, 144+1,171+1, sc.work_graph);
-
 
113
 
109
	draw_screen();
114
	WriteTextLines(CONX,y.inc(50),0x90,sc.work_text,DESCRIPTION_TEXT,20);
-
 
115
 
110
	WriteTextLines(CONX,SCRY+50,0x90,sc.work_text,DESCRIPTION_TEXT,20);
116
	DrawButtons();	
111
	DrawButtons();	
Line -... Line 112...
-
 
112
}
-
 
113
 
-
 
114
void draw_screen()
-
 
115
{
-
 
116
	char i;
-
 
117
	int icon_n=1;
-
 
118
	DrawRectangle(WINW-180-1,SCRY-1, 145+1,170+1, sc.work_graph);
-
 
119
	DrawBar(SCRX,SCRY,145,170,0xFFFfff);
-
 
120
	DrawBar(SCRX+25,SCRY+5,144-25,20,0xBBDDFF);
-
 
121
	for (i=0; i<8; i++) {
-
 
122
		draw_icon_16(SCRX+5, i*20+SCRY+5, icon_n);
-
 
123
		WriteText(SCRX+27, i*20+SCRY+11, 0x80, 0, i*8 + #kolibrios_dirs);
-
 
124
		icon_n = 0;
-
 
125
	}
117
}
126
}
118
 
127
 
119
void DrawButtons()
128
void DrawButtons()
120
{
129
{
-
 
130
	DrawStandartCaptButton(CONX, WINH-80, BTN_MANUAL_SEARCH, MANUALLY_BUTTON_TEXT);
-
 
131
	DrawStandartCaptButton(CONX, WINH-42, BTN_OPEN_ANYWAY, OPEN_ANYWAY_BUTTON_TEXT);
121
	DrawStandartCaptButton(CONX, Form.cheight-80, BTN_MANUAL_SEARCH, MANUALLY_BUTTON_TEXT);
132
	//DrawCaptButton(CONX, WINH-80, 300, 25, BTN_MANUAL_SEARCH, sc.button, sc.button_text, MANUALLY_BUTTON_TEXT);
Line 122... Line 133...
122
	DrawStandartCaptButton(CONX, Form.cheight-42, BTN_OPEN_ANYWAY, OPEN_ANYWAY_BUTTON_TEXT);
133
	//DrawCaptButton(CONX, WINH-42, 500, 25, BTN_OPEN_ANYWAY, sc.button, sc.button_text, OPEN_ANYWAY_BUTTON_TEXT);
123
}
134
}
124
 
135