Subversion Repositories Kolibri OS

Rev

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

Rev 3045 Rev 3050
Line -... Line 1...
-
 
1
void Tip(int y, dword caption, id, arrow)
-
 
2
{
1
//03.04.2012
3
	DrawBar(17,y,160,1,0xEFEDEE);
-
 
4
	DrawBar(17,y+1,160,16,0xE4DFE1); //ñåðîå ñâåðõó
-
 
5
	WriteText(25,y+5,0x80,0,caption,0);
-
 
6
	IF (id<>0) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0xE4DFE1); //êíîïà äëÿ ñòðåëêè
-
 
7
	WriteText(165,y+5,0x80,0,arrow,0); //ñòðåëêà âíèç
-
 
8
	DrawBar(17,y+17,160,1,0x94AECE);		//ïîä÷¸ðêèâàíèå
-
 
9
}
-
 
10
 
Line 2... Line 11...
2
 
11
 
3
path_string disk_list[20];
12
path_string disk_list[20];
4
int disc_num;
13
int disc_num;
Line 40... Line 49...
40
	byte disc_icon;
49
	byte disc_icon;
41
	char dev_name[10];
50
	char dev_name[10];
42
	char disc_name[100];
51
	char disc_name[100];
43
	int i, dev_icon;
52
	int i, dev_icon;
Line -... Line 53...
-
 
53
	
44
	
54
	for (i=0; i<20; i++) DeleteButton(i);
45
	//ñïèñîê äèñêîâ
55
	//ñïèñîê äèñêîâ
46
	Tip(56, "Devices", 78, "=");
56
	Tip(56, "Devices", 78, "=");
47
	for (i=0;i
57
	for (i=0;i
48
	{
58
	{
Line 71... Line 81...
71
				break;
81
				break;
72
			case 't':
82
			case 't':
73
				dev_icon=4;
83
				dev_icon=4;
74
				strcpy(#disc_name, "RAM disk ");
84
				strcpy(#disc_name, "RAM disk ");
Line 75... Line -...
75
				
-
 
76
				//temp[0]=dev_name[4]; //àõóåòü ñèñòåìà
-
 
77
				//temp[1]=NULL;
85
				
78
				//DefineButton(17+143,i*16+74,16,16,StrToInt(#temp)+130+BT_HIDE+BT_NOFRAME,0xFFFFFF);
86
				DefineButton(17+143,i*16+74,16,16,i+130+BT_HIDE+BT_NOFRAME,0xFFFFFF);
79
				//WriteText(45+121,i*16+79,0x80,0xAC0000,"-",0);
87
				WriteText(45+121,i*16+79,0x80,0xD63535,"-",0);
80
				//WriteText(45+121,i*16+79+1,0x80,0xAC0000,"-",0);
88
				WriteText(45+121,i*16+79+1,0x80,0xBC2424,"-",0);
81
				break;
89
				break;
82
			default:
90
			default:
83
				dev_icon=3; //ïî-óìîë÷àíèþ óñòðîéñòâî âûãëÿäèò êàê æåñòÿê íî ýòî íåïðàâèëüíî
91
				dev_icon=3; //ïî-óìîë÷àíèþ óñòðîéñòâî âûãëÿäèò êàê æåñòÿê íî ýòî íåïðàâèëüíî
84
				strcpy(#disc_name, "Unknown ");				
92
				strcpy(#disc_name, "Unknown ");				
Line 87... Line 95...
87
		if (show_dev_name) WriteText(45,i*16+79,0x80,0,#disc_name,0);
95
		if (show_dev_name) WriteText(45,i*16+79,0x80,0,#disc_name,0);
88
			else WriteText(45,i*16+79,0x80,0,#dev_name,0);
96
			else WriteText(45,i*16+79,0x80,0,#dev_name,0);
89
		PutImage(dev_icon*14*13*3+#devices,14,13,21,i*16+76);
97
		PutImage(dev_icon*14*13*3+#devices,14,13,21,i*16+76);
90
	}
98
	}
91
}
99
}
92
>
100
 
-
 
101
 
-
 
102
void Actions()
-
 
103
{
-
 
104
	int actions_y=disc_num*16;
-
 
105
	
-
 
106
	DeleteButton(80);
-
 
107
	DeleteButton(81);
-
 
108
	DeleteButton(82);
-
 
109
	
-
 
110
	if (!show_actions)
-
 
111
		Tip(actions_y+90, "Actions", 77, "\x18");
-
 
112
	else
-
 
113
	{
-
 
114
		Tip(actions_y+90, "Actions", 77, "\x19"); //çàãîëîâîê
-
 
115
		DrawBar(17,actions_y+108,160,51,0xFFFFFF); //áåëîå
-
 
116
		PutImage(#factions,16,44,21,actions_y+113); //èêîíêè
-
 
117
		//rename file 
-
 
118
		DefineButton(17,actions_y+108,159,16,80+BT_HIDE,0xE4DFE1);
-
 
119
		WriteText(42,actions_y+113,0x80,0,"Rename file",0);
-
 
120
		WriteText(150,actions_y+113,0x80,0x999999,"[F2]",0);
-
 
121
		//delete file
-
 
122
		DefineButton(17,actions_y+125,159,16,81+BT_HIDE,0xE4DFE1);
-
 
123
		WriteText(42,actions_y+130,0x80,0,"Delete file",0);
-
 
124
		WriteText(144,actions_y+130,0x80,0x999999,"[Del]",0);
-
 
125
		//create folder
-
 
126
		DefineButton(17,actions_y+142,159,16,82+BT_HIDE,0xE4DFE1);
-
 
127
		WriteText(42,actions_y+147,0x80,0,"Create folder",0);
-
 
128
		WriteText(150,actions_y+147,0x80,0x999999,"[F6]",0);
-
 
129
	}
-
 
130
}
-
 
131
 
-
 
132
 
-
 
133
void LeftPanelBackground()
-
 
134
{
-
 
135
	int actions_y=disc_num*16;
-
 
136
	int start_y = show_actions*51+actions_y+108;
-
 
137
	DrawBar(2,41,190,15,lpanel_col);		      //ñèíèé ïðÿìîóãîëüíèê - íàä äåâàéñàìè
-
 
138
	DrawBar(17,actions_y+75,160,15,lpanel_col); //ñèíèé ïðÿìîóãîëüíèê - ïîä äåâàéñàìè
-
 
139
	DrawBar(2,56,15,actions_y+103,lpanel_col);	          //ñèíèé ïðÿìîóãîëüíèê - ñëåâà       
-
 
140
	DrawBar(177,56,15,actions_y+103,lpanel_col);            //ñèíèé ïðÿìîóãîëüíèê - ñïðàâà
-
 
141
	if (onTop(start_y, 6) < 268)
-
 
142
		PutPaletteImage(#blue_hl, 190, onTop(start_y, 6), 2, start_y, #blue_hl_pal);
-
 
143
	else
-
 
144
	{
-
 
145
		DrawBar(2,start_y,190,onTop(start_y,6+268),lpanel_col);
-
 
146
		PutPaletteImage(#blue_hl, 190, 268, 2, onTop(268,6), #blue_hl_pal);
-
 
147
		if (onTop(268,6)>300) PutPaletteImage(#blue_hl, 190, 87, 2, start_y+100, #blue_hl_pal);
-
 
148
	}
-
 
149
}
-
 
150
 
-
 
151
 
-
 
152
void DrawLeftPanel()
-
 
153
{
-
 
154
	DrawSystemDiscs();
-
 
155
	Actions();
-
 
156
	LeftPanelBackground();
-
 
157
}
-
 
158
>
-
 
159