Subversion Repositories Kolibri OS

Rev

Rev 9439 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9439 Rev 9887
Line 95... Line 95...
95
			break;
95
			break;
Line 96... Line 96...
96
 
96
 
97
		case evButton:
97
		case evButton:
98
			Event_ProcessButtonId(GetButtonID());
98
			Event_ProcessButtonId(GetButtonID());
99
			break;
99
			break;
100
	  
100
 
101
		case evKey:
101
		case evKey:
102
			GetKeys();
102
			GetKeys();
103
			if (key_scancode == SCAN_CODE_ENTER) Event_ProcessButtonId(active_button_id);
103
			if (key_scancode == SCAN_CODE_ENTER) Event_ProcessButtonId(active_button_id);
104
			if (window_step == WINDOW_STEP_DRIVER_LIST) 
104
			if (window_step == WINDOW_STEP_DRIVER_LIST)
105
			{
105
			{
106
				if (select_list.ProcessKey(key_scancode)) SelectList_LineChanged();
106
				if (select_list.ProcessKey(key_scancode)) SelectList_LineChanged();
107
				if (key_scancode == SCAN_CODE_TAB) 
107
				if (key_scancode == SCAN_CODE_TAB)
108
				{
108
				{
109
					ActiveButtonSwitch(11, 12);
109
					ActiveButtonSwitch(11, 12);
110
					Draw_DriverListWindow();
110
					Draw_DriverListWindow();
111
				}
111
				}
112
			} 
112
			}
113
			break;
113
			break;
114
		 
114
 
115
		case evReDraw:
115
		case evReDraw:
116
			Event_DrawWindow();
116
			Event_DrawWindow();
117
	}
117
	}
Line 118... Line 118...
118
} 
118
}
119
 
119
 
120
 
120
 
121
void Draw_IntroWindow()
121
void Draw_IntroWindow()
122
{
122
{
123
	incn y;
123
	incn y;
124
	y.n = Form.cheight/2 - 80;
124
	y.n = Form.cheight/2 - 80;
125
	WriteTextB(30+2,y.n+2,0x81,MixColors(sc.work, 0xB92234,220),T_CAUTION_TITLE);
125
	WriteTextB(30+2,y.n+2,0x81,MixColors(sc.work, 0xB92234,220),T_CAUTION_TITLE);
126
	WriteTextB(30,y.n,0x81,0xB92234,T_CAUTION_TITLE);
126
	WriteTextB(30,y.n,0x81,0xB92234,T_CAUTION_TITLE);
127
	y.n = DrawTextViewArea(30, y.inc(30), Form.cwidth-60, Form.cheight-140, 
127
	y.n = DrawTextViewArea(30, y.inc(30), Form.cwidth-60, Form.cheight-140,
128
		T_CAUTION_PARAGRAPH, -1, sc.work_text);
128
		T_CAUTION_PARAGRAPH, -1, sc.work_text);
Line 135... Line 135...
135
{
135
{
136
	#define PADDING 12
136
	#define PADDING 12
137
	int right_frame_x = Form.cwidth*46/100;
137
	int right_frame_x = Form.cwidth*46/100;
138
	int readme_w = 0;
138
	int readme_w = 0;
139
	//LEFT FRAME
139
	//LEFT FRAME
140
	SelectList_Init(PADDING, PADDING, 
140
	SelectList_Init(PADDING, PADDING,
141
		right_frame_x - PADDING - PADDING - 8 - scroll1.size_x, 
141
		right_frame_x - PADDING - PADDING - 8 - scroll1.size_x,
142
		Form.cheight - PADDING - PADDING);
142
		Form.cheight - PADDING - PADDING);
143
	SelectList_Draw();
143
	SelectList_Draw();
144
	SelectList_DrawBorder();
144
	SelectList_DrawBorder();
145
	//RIGHT FRAME
145
	//RIGHT FRAME
146
	GetCurrentSectionData();
146
	GetCurrentSectionData();
147
	DrawBar(right_frame_x, PADDING+3, Form.cwidth - right_frame_x - PADDING, 80, sc.work);
147
	DrawBar(right_frame_x, PADDING+3, Form.cwidth - right_frame_x - PADDING, 80, sc.work);
148
	draw_icon_32(right_frame_x, PADDING, sc.work, cur_icon);	
148
	draw_icon_32(right_frame_x, PADDING, sc.work, cur_icon);
149
	WriteTextB(right_frame_x+44, PADDING+3, 0x81, sc.work_text, ini_sections.get(select_list.cur_y));
149
	WriteTextB(right_frame_x+44, PADDING+3, 0x81, sc.work_text, ini_sections.get(select_list.cur_y));
150
	WriteText(right_frame_x+44, PADDING+23, 0x80, sc.work_text, #cur_version);
150
	WriteText(right_frame_x+44, PADDING+23, 0x80, sc.work_text, #cur_version);
151
	if(cur_readme_path[0]) readme_w = DrawStandartCaptButton(right_frame_x, PADDING+45, BUTTON_ID_README, T_README);
151
	if(cur_readme_path[0]) readme_w = DrawStandartCaptButton(right_frame_x, PADDING+45, BUTTON_ID_README, T_README);
152
	DrawStandartCaptButton(right_frame_x + readme_w, PADDING+45, BUTTON_ID_INSTALL, T_INSTALL);
152
	DrawStandartCaptButton(right_frame_x + readme_w, PADDING+45, BUTTON_ID_INSTALL, T_INSTALL);
153
	DrawTextViewArea(right_frame_x-2, PADDING+83, Form.cwidth - right_frame_x - PADDING, Form.cheight-PADDING-PADDING, 
153
	DrawTextViewArea(right_frame_x-2, PADDING+83, Form.cwidth - right_frame_x - PADDING, Form.cheight-PADDING-PADDING,
154
		#cur_description, sc.work, sc.work_text);
154
		#cur_description, sc.work, sc.work_text);
155
}
155
}
Line 156... Line 156...
156
 
156
 
157
void SelectList_DrawLine(dword i)
157
void SelectList_DrawLine(dword i)
158
{
158
{
Line 159... Line 159...
159
	int yyy, list_last;
159
	int yyy, list_last;
160
 
160
 
161
	yyy = i*select_list.item_h+select_list.y;
161
	yyy = i*select_list.item_h+select_list.y;
162
	
162
 
163
	if (select_list.cur_y-select_list.first==i)
163
	if (select_list.cur_y-select_list.first==i)
164
	{
164
	{
165
		DrawBar(select_list.x, yyy, select_list.w, select_list.item_h, sc.button);
165
		DrawBar(select_list.x, yyy, select_list.w, select_list.item_h, sc.button);
166
		WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,sc.button_text, ini_sections.get(i));
166
		WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,sc.button_text, ini_sections.get(i+select_list.first));
167
	}
167
	}
168
	else
168
	else
169
	{
169
	{
170
		DrawBar(select_list.x,yyy,select_list.w, select_list.item_h, 0xFFFfff);
170
		DrawBar(select_list.x,yyy,select_list.w, select_list.item_h, 0xFFFfff);
171
		WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,0, ini_sections.get(i));
171
		WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,0, ini_sections.get(i+select_list.first));
Line 172... Line 172...
172
	}
172
	}
173
}
173
}
Line 200... Line 200...
200
	if (id==BUTTON_ID_ASSEPT_RISK) Event_AsseptRisk();
200
	if (id==BUTTON_ID_ASSEPT_RISK) Event_AsseptRisk();
201
	if (id==BUTTON_ID_README) Event_ShowReadme();
201
	if (id==BUTTON_ID_README) Event_ShowReadme();
202
	if (id==BUTTON_ID_INSTALL) Event_RunInstall();
202
	if (id==BUTTON_ID_INSTALL) Event_RunInstall();
203
}
203
}
Line 204... Line 204...
204
 
204
 
205
void Event_DrawWindow() 
205
void Event_DrawWindow()
206
{
206
{
207
	sc.get();
207
	sc.get();
208
	DefineAndDrawWindow(215, 100, 600, 400, 0x33, sc.work, WINDOW_TITLE,0);
208
	DefineAndDrawWindow(215, 100, 600, 400, 0x33, sc.work, WINDOW_TITLE,0);
209
	GetProcessInfo(#Form, SelfInfo);
209
	GetProcessInfo(#Form, SelfInfo);
Line 233... Line 233...
233
	result = io.run(#cur_install_path, NULL);
233
	result = io.run(#cur_install_path, NULL);
234
	if (result) notify(T_DRIVER_INSTALLARION_STARTED);
234
	if (result) notify(T_DRIVER_INSTALLARION_STARTED);
235
	pause(300);
235
	pause(300);
236
	if (cur_icon == 61) {
236
	if (cur_icon == 61) {
237
		RestartProcessByName("/sys/@taskbar", SINGLE);
237
		RestartProcessByName("/sys/@taskbar", SINGLE);
238
		RestartProcessByName("/sys/@docky", SINGLE);	
238
		RestartProcessByName("/sys/@docky", SINGLE);
239
		RestartProcessByName("/sys/@icon", MULTIPLE);	
239
		RestartProcessByName("/sys/@icon", MULTIPLE);
240
	}
240
	}
241
}
241
}
242
242