forked from SuperABC/SOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfolder.c
40 lines (33 loc) · 781 Bytes
/
folder.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "folder.h"
textMap *folderCover;
char *tmpDir = "\\";
void folderInit() {
folderCover = (textMap *)malloc(sizeof(textMap));
getText(10, 3, 69, 25, folderCover);
folderPanel();
}
int folderKey(int key) {
if (key == SG_CTRL)return 0;
if (key == SG_ESC) {
putText(10, 3, folderCover);
free(folderCover->content);
free(folderCover);
disProc();
}
return 1;
}
void folderLoop() {
}
void folderPanel() {
setBfc(DARKGRAY, WHITE);
for (int i = 4; i < 26; i++) {
for (int j = 10; j < 70; j++) {
writeChar(' ', j, i);
}
}
setBfc(WHITE, BLACK);
writeString("Explorer ", 10, 3);
setBfc(LIGHTGRAY, CYAN);
writeString(" ", 20, 5);
writeString(tmpDir, 20, 5);
}