add popup toggle
This commit is contained in:
7
strans.c
7
strans.c
@@ -2,6 +2,7 @@
|
||||
#include "fn.h"
|
||||
|
||||
static Im im;
|
||||
static int popup = 1;
|
||||
static void dictqmap(Im*);
|
||||
|
||||
static void
|
||||
@@ -45,6 +46,8 @@ show(void)
|
||||
Drawcmd dc;
|
||||
int i, first, n;
|
||||
|
||||
if(!popup)
|
||||
return;
|
||||
sclear(&dc.pre);
|
||||
if(!mapget(im.l->map, &im.pre, &dc.pre))
|
||||
dc.pre = im.pre;
|
||||
@@ -256,6 +259,10 @@ keystroke(u32int ks, u32int mod, Str *com)
|
||||
reset();
|
||||
if(ks >= 'a' && ks <= 'z')
|
||||
ks -= 'a' - 1;
|
||||
if(ks == 0x10){
|
||||
popup = !popup;
|
||||
return 1;
|
||||
}
|
||||
if(setlang(ks))
|
||||
return 1;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user