Subversion Repositories Kolibri OS

Rev

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

Rev 6782 Rev 7225
Line 31... Line 31...
31
	?define T_SKINS       "Skins"
31
	?define T_SKINS       "Skins"
32
	?define T_WALLPAPERS  "Wallpappers"
32
	?define T_WALLPAPERS  "Wallpappers"
33
#endif
33
#endif
Line 34... Line 34...
34
 
34
 
35
#define PANEL_H 40
35
#define PANEL_H 40
36
#define LIST_PADDING 20
36
#define LP 10 //LIST_PADDING
37
#define SKINS_STANDART_PATH "/kolibrios/res/skins"							
37
#define SKINS_STANDART_PATH "/kolibrios/res/skins"							
Line 38... Line 38...
38
#define WALP_STANDART_PATH "/kolibrios/res/wallpapers"
38
#define WALP_STANDART_PATH "/kolibrios/res/wallpapers"
39
 
39
 
Line 47... Line 47...
47
 
47
 
Line 48... Line 48...
48
int cur;
48
int cur;
Line -... Line 49...
-
 
49
 
-
 
50
proc_info Form;
49
 
51
 
50
proc_info Form;
52
_tabs tabs = { LP, LP, NULL, NULL, SKINS };
51
 
53
 
52
//===================================================//
54
//===================================================//
53
//                                                   //
55
//                                                   //
Line 84... Line 86...
84
	  
86
	  
85
		case evKey:
87
		case evKey:
86
			GetKeys(); 
88
			GetKeys(); 
87
			if (select_list.ProcessKey(key_scancode)) EventApply();
89
			if (select_list.ProcessKey(key_scancode)) EventApply();
-
 
90
			if (key_scancode==SCAN_CODE_ENTER) EventOpenFile();
88
			if (key_scancode==SCAN_CODE_ENTER) EventOpenFile();
91
			if (key_scancode==SCAN_CODE_TAB) 
-
 
92
				if (tabs.active_tab==SKINS) EventTabClick(WALLPAPERS); 
89
			if (key_scancode==SCAN_CODE_TAB) if (tabs.active_tab==SKINS) EventTabClick(WALLPAPERS); else EventTabClick(SKINS);
93
				else EventTabClick(SKINS);
90
			if (key_scancode==SCAN_CODE_DEL) EventDeleteFile();
94
			if (key_scancode==SCAN_CODE_DEL) EventDeleteFile();
91
			for (id=select_list.cur_y+1; id
95
			for (id=select_list.cur_y+1; id
92
			{
96
			{
93
				strcpy(#temp_filename, io.dir.position(files_mas[id]));
97
				strcpy(#temp_filename, io.dir.position(files_mas[id]));
Line 116... Line 120...
116
}
120
}
Line 117... Line 121...
117
 
121
 
118
void DrawWindowContent()
122
void DrawWindowContent()
119
{
123
{
-
 
124
	int id;
-
 
125
 
-
 
126
	DrawWideRectangle(0, 0, Form.cwidth, Form.cheight, LP, system.color.work);
-
 
127
 
-
 
128
	tabs.w = Form.cwidth-LP-LP;
-
 
129
	tabs.h = Form.cheight-LP-LP;
-
 
130
	tabs.draw_wrapper();
-
 
131
	
-
 
132
	tabs.draw_button(tabs.x+TAB_PADDING, tabs.y+TAB_HEIGHT, SKINS, T_SKINS);	
-
 
133
	tabs.draw_button(strlen(T_SKINS)*8+tabs.x+TAB_PADDING+TAB_PADDING, tabs.y+TAB_HEIGHT, WALLPAPERS, T_WALLPAPERS);
120
	int id;
134
 
121
	id = select_list.cur_y;
135
	id = select_list.cur_y;
122
	SelectList_Init(
136
	SelectList_Init(
123
		LIST_PADDING, 
137
		tabs.x+TAB_PADDING,
124
		PANEL_H, 
138
		tabs.y+TAB_HEIGHT+TAB_PADDING, 
125
		Form.cwidth-scroll1.size_x-LIST_PADDING-LIST_PADDING, 
139
		tabs.w - TAB_PADDING - TAB_PADDING - scroll1.size_x, 
126
		Form.cheight-PANEL_H-LIST_PADDING, 
140
		tabs.h - TAB_PADDING - TAB_PADDING - TAB_HEIGHT, 
127
		false
141
		false
128
		);
142
		);
129
	select_list.cur_y = id;
-
 
130
	DrawBar(0,0, Form.cwidth, PANEL_H-LIST_PADDING, system.color.work);
-
 
131
	DrawWideRectangle(select_list.x-LIST_PADDING, select_list.y-LIST_PADDING, LIST_PADDING*2+select_list.w+scroll1.size_x, 
-
 
132
		LIST_PADDING*2+select_list.h, LIST_PADDING-2, system.color.work);
-
 
133
	tabs.draw(select_list.x+10, select_list.y, SKINS, T_SKINS);
-
 
134
	if (dir_exists(WALP_STANDART_PATH)) tabs.draw(strlen(T_SKINS)*8+TAB_PADDING+select_list.x+21, select_list.y, 
-
 
135
		WALLPAPERS, T_WALLPAPERS);
143
	select_list.cur_y = id;
136
	SelectList_Draw();
144
	SelectList_Draw();
137
	SelectList_DrawBorder();
145
	SelectList_DrawBorder();