menunextarea config file token

This commit is contained in:
Ianos Gnatiuc
2005-10-05 01:40:16 +00:00
parent 4285622f3f
commit 91d1d3ffdf
15 changed files with 52 additions and 10 deletions

View File

@@ -304,6 +304,7 @@ gkey getxch(int __tick) {
if(gwin.menu) {
_item_t* item = find_hotkey(gwin.menu,k);
if(item) {
gwin.menu->hotkey = true;
kbd_call_func(item->select);
#ifdef GOLD_MOUSE
if(gkbd.inmenu and gmou.FreeCursor())

View File

@@ -75,6 +75,7 @@ protected:
int itemmask;
int escape;
int overtag;
int finaltag;
int status;

View File

@@ -157,6 +157,7 @@ struct _menu_t {
int titleattr; // attribute of menu title
int shadattr; // shadow attribute or -1 if no shadow
int items; // number of items in menu
bool hotkey;
};

View File

@@ -44,6 +44,7 @@
// ------------------------------------------------------------------
int _overtagid;
int _finaltagid;
int gmnudropthrough = NO;
@@ -873,8 +874,11 @@ int wmenuget() {
char ch;
static int _depth = 0;
if(_depth == 0)
if (_depth == 0)
{
_overtagid = -1;
_finaltagid = -1;
}
// make sure we have a defined menu
if(gwin.cmenu==NULL) {
@@ -958,6 +962,7 @@ int wmenuget() {
gwin.help=citem->help;
// read mouse/keyboard for keypress, then test the keypress
gwin.menu->hotkey = false;
gkbd.inmenu=true;
xch = read_mouse(citem);
citem=gwin.cmenu->citem;
@@ -965,6 +970,9 @@ int wmenuget() {
xch = getxch();
}
gkbd.inmenu=false;
_overtagid = citem->tagid;
switch(xch) {
case Key_Esc:
@@ -1208,8 +1216,11 @@ int wmenuget() {
item=citem->next;
for(;;) {
while(item!=NULL) {
if((toupper(ch)==toupper(item->schar)) and not (item->fmask&M_NOSEL))
goto FARBREAK;
if ((toupper(ch)==toupper(item->schar)) && !(item->fmask & M_NOSEL))
{
if (!gwin.menu->hotkey) _overtagid = item->tagid;
goto FARBREAK;
}
if(citem==item) {
valid=NO;
goto FARBREAK;

View File

@@ -203,6 +203,7 @@ void GMnu::End() {
// ------------------------------------------------------------------
extern int _overtagid;
extern int _finaltagid;
void GMnu::Start() {
@@ -210,6 +211,7 @@ void GMnu::Start() {
int _prev_escape = wsetesc(escape);
wmenuget();
finaltag = _finaltagid;
overtag = _overtagid;
wsetesc(_prev_escape);
}