Subversion Repositories Kolibri OS

Rev

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

Rev 4057 Rev 4063
Line 104... Line 104...
104
				
104
				
105
		case evKey:
105
		case evKey:
106
				key = GetKey();
106
				key = GetKey();
107
				if (key==27) ExitProcess();
107
				if (key==27) ExitProcess();
108
				if (key==13) { RunProgram(#app_paths[app_list.current].item, #file_path); ExitProcess(); }
108
				if (key==13) { RunProgram(#app_paths[app_list.current].item, #file_path); ExitProcess(); }
109
				if (key==177) //down
109
				if (key==177)
110
				{
110
				{
111
					if (app_list.KeyDown()) DrawAppList();
111
					if (app_list.KeyDown()) DrawAppList();
112
				}
112
				}
113
				if (key==178) //up
113
				if (key==178)
114
				{
114
				{
115
					if (app_list.KeyUp()) DrawAppList();
115
					if (app_list.KeyUp()) DrawAppList();
-
 
116
				}
-
 
117
				if (key==180)
-
 
118
				{
-
 
119
					if (app_list.KeyHome()) DrawAppList();
-
 
120
				}
-
 
121
				if (key==181)
-
 
122
				{
-
 
123
					if (app_list.KeyEnd()) DrawAppList();
116
				}
124
				}
Line 117... Line 125...
117
				break;
125
				break;
118
				
126
				
119
		case evReDraw: _APP_LIST_DRAW:
127
		case evReDraw: _APP_LIST_DRAW:
Line 142... Line 150...
142
		if (index+app_list.first==app_list.current) col_bg = col_selec; else col_bg = 0xFFFfff;
150
		if (index+app_list.first==app_list.current) col_bg = col_selec; else col_bg = 0xFFFfff;
143
		DrawBar(app_list.x, index*app_list.line_h+app_list.y, app_list.w, app_list.line_h, col_bg);
151
		DrawBar(app_list.x, index*app_list.line_h+app_list.y, app_list.w, app_list.line_h, col_bg);
144
		Put_icon(#app_paths[index+app_list.first].ext, app_list.x+4, index*app_list.line_h+app_list.y+2, col_bg, 6);
152
		Put_icon(#app_paths[index+app_list.first].ext, app_list.x+4, index*app_list.line_h+app_list.y+2, col_bg, 6);
145
		WriteText(app_list.x+25, index*app_list.line_h+app_list.y+7, 0x80, 0, #app_paths[index+app_list.first].item);
153
		WriteText(app_list.x+25, index*app_list.line_h+app_list.y+7, 0x80, 0, #app_paths[index+app_list.first].item);
146
	}
154
	}
147
	tiny_scroll.h = app_list.w*app_list.visible/app_list.count;
-
 
148
	tiny_scroll.x = app_list.x+app_list.w-SCROLL_WIDTH-1;
155
	tiny_scroll.x = app_list.x+app_list.w-SCROLL_WIDTH-1;
-
 
156
	tiny_scroll.h = app_list.h * app_list.visible / app_list.count;
149
	tiny_scroll.y = app_list.first * app_list.h / app_list.count + app_list.y;
157
	tiny_scroll.y = app_list.h * app_list.first / app_list.count + app_list.y;
-
 
158
	debugi(tiny_scroll.y + tiny_scroll.h - app_list.y - app_list.h);
150
	if (tiny_scroll.y + tiny_scroll.h - app_list.y > app_list.h) tiny_scroll.y = app_list.y + app_list.h - tiny_scroll.h-1;
159
	if (tiny_scroll.y + tiny_scroll.h - app_list.y - app_list.h >= 0) tiny_scroll.y = app_list.y + app_list.h - tiny_scroll.h-1;
151
	DrawBar(tiny_scroll.x, tiny_scroll.y, SCROLL_WIDTH, tiny_scroll.h, 0x555555); //scroll
160
	DrawBar(tiny_scroll.x, tiny_scroll.y, SCROLL_WIDTH, tiny_scroll.h, 0x555555); //scroll
152
}
161
}
153
>
162
>