]> git.webhop.me Git - msgbox.git/commitdiff
fix scrolling of buttons
authorGetAway <get-away@t-online.de>
Sun, 27 Aug 2017 14:04:59 +0000 (16:04 +0200)
committerJacek Jendrzej <satbaby@kawaii.com>
Sun, 27 Aug 2017 17:27:21 +0000 (19:27 +0200)
msgbox.c
text.c

index 85229ca4bd52c89dc78bc0c0ecd7431b1394ea8c..16bfb57fad047d67f6208143c4d7011e4c4f72b6 100644 (file)
--- a/msgbox.c
+++ b/msgbox.c
@@ -17,7 +17,7 @@
        typeof (b) __b = (b); \
        __a > __b ? __a : __b; })
 
-#define M_VERSION 2.04
+#define M_VERSION 2.05
 
 #define NCF_FILE       "/var/tuxbox/config/neutrino.conf"
 #define HDF_FILE       "/tmp/.msgbox_hidden"
@@ -257,12 +257,13 @@ char *pt1=strdup(sptr),*pt2=NULL,*pt3=NULL;
        return rv;
 }
 
+static int dy, psx, psy, pxw, pyw, myo=0, buttsize=0, buttxstart=0, buttystart=0;
+
 int show_txt(int buttonly)
 {
 FILE *tfh;
 char const *fname=NULL;
-int yo=scale2res(80),dy;
-int psx, psy, pxw, pyw, myo=0, buttx=scale2res(80), butty=scale2res(30), buttdx=scale2res(20), buttdy=scale2res(10), buttsize=0, buttxstart=0, buttystart=0;
+int yo=scale2res(80), buttx=scale2res(80), butty=scale2res(30), buttdx=scale2res(20), buttdy=scale2res(10);
 int icon_w=0, icon_h=0, xsize=0, ysize=0;
 int i,bx,by,x1,y1,rv=-1,run=1,line=0,action=1,cut,itmp,btns=buttons,lbtns=(buttons>bpline)?bpline:buttons,blines=1+((btns-1)/lbtns);
 
diff --git a/text.c b/text.c
index 83cf34de99ebd6017931c00b56b9e5515ca10c35..b43db7f7b0727414775f79feb7ea1ba461a12092 100644 (file)
--- a/text.c
+++ b/text.c
@@ -12,6 +12,7 @@ int OFFSET_SMALL=5;
 int OFFSET_MIN=2;
 
 extern int flash;
+extern int scale2res(int s);
 
 static char *sc = "aouAOUzd",
        *su= "\xA4\xB6\xBC\x84\x96\x9C\x9F",