Exemplo n.º 1
0
void graph3d_sdl::screen_resize(tpos width, tpos height)
{
  graphics_width = width;
  graphics_height = height;
  
  camera_interface::screen_size_set(width, height);

  screen_regenerate();

  if(p_screen_resize_callback)
    p_screen_resize_callback(width, height);
}
Exemplo n.º 2
0
void *
read_keys() {
	int ch = '\0';
	printHeader();
	while (1) {

		switch (ch) {
		case 'c':
			sort_type = 0;
			sort_accounts();
			break;
		case 'r':
			sort_type = 1;
			sort_accounts();
			break;
		case 'w':
			sort_type = 2;
			sort_accounts();
			break;
		case 'u':
			sort_type = 3;
			sort_accounts();
			break;
		case 'l':
			sort_type = 4;
			sort_accounts();
			break;
		case 't':
			sort_type = 5;
			sort_accounts();
			break;
		case '1':
			screen_view = 1;
			sort_accounts();
			break;
		case KEY_F (10):
			end_screen ();
			//closesock();
			exit(0);
			break;
		case CTRLC:
			end_screen ();
			//closesock();
			exit(0);
			break;
		case 'q':
			end_screen ();
			//closesock();
			exit(0);
			break;
		case 'h':
		case '?':
			screen_view = 5;
			break;

		case 'z':
			colorize();
			break;

		}
        screen_regenerate();

        ch = getch ();
        if (ch == ERR) {
            screen_regenerate();
        	continue;
        }

	}
}