1 | #ifndef SKINADJUST_H |
---|
2 | #define SKINADJUST_H |
---|
3 | |
---|
4 | void screenskinadjust() |
---|
5 | { |
---|
6 | int rcret = 0, oleftoffset = 0, orightoffset = 0, otopoffset = 0, obottomoffset = 0; |
---|
7 | struct skin* skinadjust = getscreen("skinadjust"); |
---|
8 | struct skin* listbox = getscreennode(skinadjust, "listbox"); |
---|
9 | struct skin* fontsizeadjust = getscreennode(skinadjust, "fontsizeadjust"); |
---|
10 | struct skin* listboxselecttype = getscreennode(skinadjust, "listboxselecttype"); |
---|
11 | struct skin* osdtransparent = getscreennode(skinadjust, "osdtransparent"); |
---|
12 | struct skin* leftoffset = getscreennode(skinadjust, "leftoffset"); |
---|
13 | struct skin* rightoffset = getscreennode(skinadjust, "rightoffset"); |
---|
14 | struct skin* topoffset = getscreennode(skinadjust, "topoffset"); |
---|
15 | struct skin* bottomoffset = getscreennode(skinadjust, "bottomoffset"); |
---|
16 | struct skin* piconpath = getscreennode(skinadjust, "piconpath"); |
---|
17 | struct skin* tmp = NULL; |
---|
18 | char* ret = NULL; |
---|
19 | |
---|
20 | changeinput(fontsizeadjust, "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n-15\n-14\n-13\n-12\n-11\n-10\n-9\n-8\n-7\n-6\n-5\n-4\n-3\n-2\n-1"); |
---|
21 | setchoiceboxselection(fontsizeadjust, getskinconfig("fontsizeadjust", NULL)); |
---|
22 | |
---|
23 | addchoicebox(listboxselecttype, "0", _("border")); |
---|
24 | addchoicebox(listboxselecttype, "1", _("bar")); |
---|
25 | addchoicebox(listboxselecttype, "2", _("text")); |
---|
26 | addchoicebox(listboxselecttype, "3", _("picture")); |
---|
27 | setchoiceboxselection(listboxselecttype, getskinconfig("listboxselecttype", NULL)); |
---|
28 | |
---|
29 | changeinput(osdtransparent, "0\n5\n10\n15\n20\n25\n30\n35\n40\n45\n50\n55\n60\n65\n70"); |
---|
30 | setchoiceboxselection(osdtransparent, getskinconfig("osdtransparent", NULL)); |
---|
31 | |
---|
32 | changeinput(leftoffset, "0\n10\n20\n30\n40\n50\n60\n70\n80\n90\n100"); |
---|
33 | setchoiceboxselection(leftoffset, getconfig("fbleftoffset", NULL)); |
---|
34 | |
---|
35 | changeinput(rightoffset, "0\n10\n20\n30\n40\n50\n60\n70\n80\n90\n100"); |
---|
36 | setchoiceboxselection(rightoffset, getconfig("fbrightoffset", NULL)); |
---|
37 | |
---|
38 | changeinput(topoffset, "0\n10\n20\n30\n40\n50\n60\n70\n80\n90\n100"); |
---|
39 | setchoiceboxselection(topoffset, getconfig("fbtopoffset", NULL)); |
---|
40 | |
---|
41 | changeinput(bottomoffset, "0\n10\n20\n30\n40\n50\n60\n70\n80\n90\n100"); |
---|
42 | setchoiceboxselection(bottomoffset, getconfig("fbbottomoffset", NULL)); |
---|
43 | |
---|
44 | changeinput(piconpath, getconfig("piconpath", NULL)); |
---|
45 | |
---|
46 | oleftoffset = getconfigint("fbleftoffset", NULL); |
---|
47 | orightoffset = getconfigint("fbrightoffset", NULL); |
---|
48 | otopoffset = getconfigint("fbtopoffset", NULL); |
---|
49 | obottomoffset = getconfigint("fbbottomoffset", NULL); |
---|
50 | |
---|
51 | drawscreen(skinadjust, 0); |
---|
52 | addscreenrc(skinadjust, listbox); |
---|
53 | |
---|
54 | tmp = listbox->select; |
---|
55 | while(1) |
---|
56 | { |
---|
57 | addscreenrc(skinadjust, tmp); |
---|
58 | rcret = waitrc(skinadjust, 0, 0); |
---|
59 | tmp = listbox->select; |
---|
60 | |
---|
61 | addconfigscreencheck("fbleftoffset", leftoffset, "0"); |
---|
62 | status.leftoffset = getconfigint("fbleftoffset", NULL); |
---|
63 | addconfigscreencheck("fbrightoffset", rightoffset, "0"); |
---|
64 | status.rightoffset = getconfigint("fbrightoffset", NULL); |
---|
65 | addconfigscreencheck("fbtopoffset", topoffset, "0"); |
---|
66 | status.topoffset = getconfigint("fbtopoffset", NULL); |
---|
67 | addconfigscreencheck("fbbottomoffset", bottomoffset, "0"); |
---|
68 | status.bottomoffset = getconfigint("fbbottomoffset", NULL); |
---|
69 | |
---|
70 | drawscreen(skinadjust, 0); |
---|
71 | |
---|
72 | if(rcret == getrcconfigint("rcexit", NULL)) |
---|
73 | { |
---|
74 | addconfigint("fbleftoffset", oleftoffset); |
---|
75 | status.leftoffset = getconfigint("fbleftoffset", NULL); |
---|
76 | addconfigint("fbrightoffset", orightoffset); |
---|
77 | status.rightoffset = getconfigint("fbrightoffset", NULL); |
---|
78 | addconfigint("fbtopoffset", otopoffset); |
---|
79 | status.topoffset = getconfigint("fbtopoffset", NULL); |
---|
80 | addconfigint("fbbottomoffset", obottomoffset); |
---|
81 | status.bottomoffset = getconfigint("fbbottomoffset", NULL); |
---|
82 | break; |
---|
83 | } |
---|
84 | |
---|
85 | if(rcret == getrcconfigint("rcok", NULL)) |
---|
86 | { |
---|
87 | addskinconfigscreencheck("fontsizeadjust", fontsizeadjust, "0"); |
---|
88 | addskinconfigscreencheck("listboxselecttype", listboxselecttype, "0"); |
---|
89 | status.listboxselecttype = getskinconfigint("listboxselecttype", NULL); |
---|
90 | addskinconfigscreencheck("osdtransparent", osdtransparent, "0"); |
---|
91 | setosdtransparent(getskinconfigint("osdtransparent", NULL)); |
---|
92 | addconfigscreen("piconpath", piconpath); |
---|
93 | |
---|
94 | if(listbox->select != NULL && ostrcmp(listbox->select->name, "piconpath") == 0) |
---|
95 | { |
---|
96 | clearscreen(skinadjust); |
---|
97 | ret = screendir(listbox->select->ret, "", NULL, NULL, NULL, NULL, 0, "SELECT", 0, NULL, 0, NULL, 0, 700, 0, 650, 0, 0); |
---|
98 | if(ret != NULL) |
---|
99 | changeinput(listbox->select, ret); |
---|
100 | free(ret); |
---|
101 | |
---|
102 | drawscreen(skinadjust, 0); |
---|
103 | continue; |
---|
104 | } |
---|
105 | |
---|
106 | break; |
---|
107 | } |
---|
108 | } |
---|
109 | |
---|
110 | delownerrc(skinadjust); |
---|
111 | clearscreen(skinadjust); |
---|
112 | } |
---|
113 | |
---|
114 | #endif |
---|