Пример #1
0
static void menu_manager(int nmenu) {
	int previous;
	char *command;
	previous = current_menu;
	current_menu = nmenu;
#if DOS || G32
#else
	if (first) {
		(*emacs_term.t_open)();
		(*emacs_term.t_close)();
		first = 0;
	}
#endif
	if (previous >= 0) {
		undisplay(previous);
	}else{
		undisplay(current_menu);
	}
	while((command = navigate(current_menu)) != (char *)0) {
		if (cexecute(command) == 4) { /* 4 means stop was executed */
			break;
		}
	}
	if (previous >= 0) {
		undisplay(current_menu);
	}
	current_menu = previous;
}
Пример #2
0
FloatingWindow::~FloatingWindow()
{
  gw_destroy_source (resize_event_id);
  on_titlebar_leave_notify (NULL);
  gtk_widget_destroy(vbox_window);
  // Added MAP 8/19/2016
  gtk_widget_destroy(vbox_client);
  undisplay();
  gtk_widget_destroy(focus_in_signal_button);
  gtk_widget_destroy(delete_signal_button);
}
Пример #3
0
void
drawstuff (CHAR_DATA *ch, char* argy, int maxy, int maxx)
{
  char *y = argy;
  char tt[50];
  int i,j,m;
  if (IS_MOB(ch)) return;
  if (IS_SET(ch->pcdata->act2, PLR_NOIBM))
    noibm = TRUE;
  else 
    noibm = FALSE;
  flip = FALSE;
  kk = FALSE;
  mb = FALSE;
  for (; *y != '\0'; y++)
    {
      if (*y == 'N' || *y == 'n')
	noibm = TRUE;
      if (*y == 'D' || *y == 'd')
	kk = TRUE;
      if (*y == 'M' || *y == 'm')
	mb = TRUE;
      if (*y == 'F' || *y == 'f')
	flip = TRUE;
    }
  for (i=0; i<80; i++)
    {
      for (j=0; j<25; j++)
	{
	  outp[i][j][0] = ' ';
	  outp[i][j][1] = '\0';
	  for (m=0; m < 15; m++)
	    scrnn[i][j][m]='\0';
	  colrs[i][j]='\0';
	}
    }
  reset_data();
  ch->pcdata->maxx = maxx;
  ch->pcdata->maxy = maxy;
  go_display (ch, ch->in_room, (maxx/2), (maxy/2), maxy, maxx);
  outp[(maxx/2)][(maxy/2)][0] = 'X';
  outp[(maxx/2)][(maxy/2)][1] = '\0';
  draw_data (ch, maxy);
  write_to_buffer(ch->desc, "\x1B[0;37m", 0);
  gotoxy (ch, 1, maxy+1);
  undisplay(ch, ch->in_room, 150); 
  gotoxy(ch, 1, ch->pcdata->pagelen);
  mb = FALSE;
  kk = FALSE;
  noibm = FALSE;
  flip = FALSE;
  return;
}
Пример #4
0
void 
undisplay (CHAR_DATA *ch, ROOM_DATA *rid, int distance)
{
  int i;
  ROOM_DATA *troom;
  EXIT_DATA *pexit;
  if (!rid->y) return;
  rid->y = FALSE;
  for (i = 0; i < 4; i++)
    {
      if (rid->mapexit[i] != NULL)
	{
	  undisplay(ch, rid->exit[i]->to_room, distance--);
	}
    }
  return;
}
Пример #5
0
void
small_map (CHAR_DATA *ch)
{
  int i,j;
  if (IS_MOB(ch)) return;
  if (IS_SET(ch->pcdata->act2, PLR_NOIBM)) noibm = TRUE;
  if (IS_SET(ch->pcdata->act2, PLR_VIEWMOBS)) mb = TRUE;
  if (IS_SET(ch->pcdata->act2, PLR_VIEWPLAYERS)) kk = TRUE;
  for (i=0; i < MAP_WIDTH; i++)
    {
      for (j=0; j < MAP_HEIGHT; j++)
	{
	  smlmap[i][j][0] = ' ';
	  smlmap[i][j][1] = '\0';
	  smlcolors[i][j]= 0;
	}
    }
  reset_small();
  ch->pcdata->x = (MAP_WIDTH/2);
  ch->pcdata->y = (MAP_HEIGHT/2);
  if (noibm)
    sml_noibm(ch, ch->in_room,MAP_WIDTH/2, MAP_HEIGHT/2);
  else
    sml_ibm(ch, ch->in_room, MAP_WIDTH/2, MAP_HEIGHT/2);
  smlmap[MAP_WIDTH/2][MAP_HEIGHT/2][0] = 'X';
  smlmap[MAP_WIDTH/2][MAP_HEIGHT/2][1] = '\0';
  smlcolors[MAP_WIDTH/2][MAP_HEIGHT/2] = 12;  
  draw_small (ch);
  write_to_buffer(ch->desc, "\x1B[0;37m", 0);
  undisplay(ch, ch->in_room, 50); 
  gotoxy(ch, 1, ch->pcdata->pagelen);
  mb = FALSE;
  noibm = FALSE;
  kk = FALSE;
  return;
}