source: titan/titan/skinadjust.h @ 27944

Last change on this file since 27944 was 27781, checked in by obi, 10 years ago

atemio5200 disable skinadjust

File size: 5.9 KB
Line 
1#ifndef SKINADJUST_H
2#define SKINADJUST_H
3
4void screenskinadjust()
5{
6        int rcret = 0, oleftoffset = 0, orightoffset = 0, otopoffset = 0, obottomoffset = 0, reboot = 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* showrecfreesize = getscreennode(skinadjust, "showrecfreesize");
17        struct skin* listboxselect = getscreennode(skinadjust, "listboxselect");
18        struct skin* tmp = 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        oleftoffset = getconfigint("fbleftoffset", NULL);
45        orightoffset = getconfigint("fbrightoffset", NULL);
46        otopoffset = getconfigint("fbtopoffset", NULL);
47        obottomoffset = getconfigint("fbbottomoffset", NULL);
48
49        addchoicebox(showrecfreesize, "0", _("no"));
50        addchoicebox(showrecfreesize, "1", _("yes (Text in %)"));
51        addchoicebox(showrecfreesize, "2", _("yes (Text in MB)"));
52        setchoiceboxselection(showrecfreesize, getconfig("showrecfreesize", NULL));
53       
54        addchoicebox(listboxselect, "0", _("press red"));
55
56        drawscreen(skinadjust, 0, 0);
57        addscreenrc(skinadjust, listbox);
58
59        tmp = listbox->select;
60        while(1)
61        {
62                int offsetchange = 0;
63                addscreenrc(skinadjust, tmp);
64                rcret = waitrc(skinadjust, 0, 0);
65                tmp = listbox->select;
66
67                addconfigscreencheck("fbleftoffset", leftoffset, "0");
68                if(status.leftoffset != getconfigint("fbleftoffset", NULL)) offsetchange = 1;
69                status.leftoffset = getconfigint("fbleftoffset", NULL);
70               
71                addconfigscreencheck("fbrightoffset", rightoffset, "0");
72                if(status.rightoffset != getconfigint("fbrightoffset", NULL)) offsetchange = 1;
73                status.rightoffset = getconfigint("fbrightoffset", NULL);
74               
75                addconfigscreencheck("fbtopoffset", topoffset, "0");
76                if(status.topoffset != getconfigint("fbtopoffset", NULL)) offsetchange = 1;
77                status.topoffset = getconfigint("fbtopoffset", NULL);
78               
79                addconfigscreencheck("fbbottomoffset", bottomoffset, "0");
80                if(status.bottomoffset != getconfigint("fbbottomoffset", NULL)) offsetchange = 1;
81                status.bottomoffset = getconfigint("fbbottomoffset", NULL);
82               
83                if(offsetchange == 1 && (ostrcmp(getconfig("av_mode3d", NULL), "sbs") == 0 || ostrcmp(getconfig("av_mode3d", NULL), "tab") == 0)) clearfball();
84
85                drawscreen(skinadjust, 0, 0);
86
87                if(rcret == getrcconfigint("rcexit", NULL))
88                {
89                        addconfigint("fbleftoffset", oleftoffset);
90                        status.leftoffset = getconfigint("fbleftoffset", NULL);
91                        addconfigint("fbrightoffset", orightoffset);
92                        status.rightoffset = getconfigint("fbrightoffset", NULL);
93                        addconfigint("fbtopoffset", otopoffset);
94                        status.topoffset = getconfigint("fbtopoffset", NULL);
95                        addconfigint("fbbottomoffset", obottomoffset);
96                        status.bottomoffset = getconfigint("fbbottomoffset", NULL);
97                        clearfball();
98                        break;
99                }
100               
101                if(rcret == getrcconfigint("rcred", NULL))
102                {
103                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "listboxselect") == 0)
104                        {
105                                long oldlistboxselectcol = convertcol("listboxselect");
106                                char* tmpstr = screencolorpicker(getskinconfig("listboxselect", NULL), 0, 0, 0);
107                                if(tmpstr != NULL)
108                                        addskinconfigtmp("listboxselect", tmpstr);
109                                if(oldlistboxselectcol != convertcol("listboxselect")) reboot = 1;
110                                drawscreen(skinadjust, 0, 0);
111                        }
112                       
113                        continue;               
114                }
115
116                if(rcret == getrcconfigint("rcok", NULL))
117                {
118                        int oldfontsizeadjust = getskinconfigint("fontsizeadjust", NULL);
119                        addskinconfigscreencheck("fontsizeadjust", fontsizeadjust, "0");
120                        if(oldfontsizeadjust != getskinconfigint("fontsizeadjust", NULL)) reboot = 1;
121                        status.fontsizeadjust = getskinconfigint("fontsizeadjust", NULL);                       
122                       
123                        addskinconfigscreencheck("listboxselecttype", listboxselecttype, "0");
124                        status.listboxselecttype = getskinconfigint("listboxselecttype", NULL);
125                        addskinconfigscreencheck("osdtransparent", osdtransparent, "0");
126                        setosdtransparent(getskinconfigint("osdtransparent", NULL));
127                        addconfigscreencheck("showrecfreesize", showrecfreesize, "0");
128                        status.showrecfreesize = getconfigint("showrecfreesize", NULL);
129
130                        writeskinconfigtmp();
131                        if(reboot == 1)
132                        {
133                                textbox(_("Message"), _("Receiver now reboot !!!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
134                                oshutdown(3, 0);
135                        }
136     
137                        break;
138                }
139        }
140
141        delskinconfigtmpall();
142        delownerrc(skinadjust);
143        clearscreen(skinadjust);
144}
145
146#endif
Note: See TracBrowser for help on using the repository browser.