Esempio n. 1
0
CGameWindow::CGameWindow( HINSTANCE hInstance, std::string windowCaption )
{
	m_hInstance = hInstance;
	m_strWindowCaption = windowCaption;
	m_bPaused = false;

	initGameWindow();
	initDirect3D();

}
Esempio n. 2
0
File: gui.c Progetto: treejames/xv6
void
draw_window(struct Window* window)
{
  unsigned int x = window->Pos_x;
  unsigned int y = window->Pos_y;
  int icon_no = window->Cur_icon;
  int i, j;
  for(i = 0; i < WindowWidth; i++)
  {
    draw_point(i + x, y, 0);
    draw_point(i + x, WindowHeight - 1 + y, 0);
    for(j = 1; j < 20; j++)
      draw_point(i + x, j + y, 0x5ACB);
    for(j = 2; j <= 20; j++)
      draw_point(i + x, y + WindowHeight - j, 0x5ACB);
  }
  for(j = 0; j < WindowHeight; j++)
  {
    draw_point(x, j + y, 0);
    draw_point(WindowWidth - 1 + x, j + y, 0);
  }
  for(i = 3; i < 18; i++)
  {
    for(j = 3; j < 18; j++)
    {
      if(window_button_x[i-3][j-3] != 2016)
        draw_point(i + x, j + y, window_button_x[i-3][j-3]);
    }
  }

  int offset = 25;
  switch(icon_no)
  {
    case ICON_FINDER:
      draw_string(x + offset, y + 2, "FINDER", FONT_COLOR);
      InitFolder(window);
      break;
    case ICON_PHOTO:
      draw_string(x + offset, y + 2, "PHOTO", FONT_COLOR);
      init_photo(x, y);
      break;
    case ICON_TEXT:
      draw_string(x + offset, y + 2, "TEXT", FONT_COLOR);
      init_text(x, y);
      break;
    case ICON_GAME:
      draw_string(x + offset, y + 2, "GAME", FONT_COLOR);
      initGameWindow(x, y);
      break;
    case ICON_DRAW:
      draw_string(x + offset, y + 2, "DRAW", FONT_COLOR);
      init_draw(x, y);
      break;
    case ICON_SETTING:
      draw_string(x + offset, y + 2, "SETTING", FONT_COLOR);
      init_setting(x, y);
      break;
    case 8:
      draw_string(x + offset, y + 2, "FINDER", FONT_COLOR);
      InitFolder(window);
      break;
    case 9:
      draw_string(x + offset, y + 2, "FINDER", FONT_COLOR);
      InitFolder(window);
      break;
  }

  draw_string(x + 590, y + 380, "@meizhi", 0xFFFF);
}