void Create(PixelSize size) { SingleWindow::Create(_T("RunCanvas"), size); PixelRect rc = GetClientRect(); PixelRect button_rc = rc; button_rc.bottom -= 5; button_rc.top = button_rc.bottom - 25; #ifndef ENABLE_OPENGL button_rc.left += 5; button_rc.right = button_rc.left + 65; buffer_button.Create(*this, _T("Buffer"), ID_BUFFER, button_rc); buffer_button.SetFont(normal_font); #endif button_rc.right = rc.right - 5; button_rc.left = button_rc.right - 65; close_button.Create(*this, _T("Close"), ID_CLOSE, button_rc); close_button.SetFont(normal_font); }
void KeyboardControl::add_button(const TCHAR* caption) { assert(num_buttons < MAX_BUTTONS); button_values[num_buttons] = caption[0]; PixelRect rc; rc.left = 0; rc.top = 0; rc.right = button_width; rc.bottom = button_height; ButtonWindow *button = &buttons[num_buttons++]; button->set(*this, caption, (unsigned)caption[0], rc); button->SetFont(*look.button.font); }
void Create(PixelSize size) { TopWindowStyle style; style.Resizable(); SingleWindow::Create(_T("RunFAITriangleSectorRenderer"), size, style); const PixelRect rc = GetClientRect(); WindowStyle with_border; with_border.Border(); PixelRect button_rc = rc; button_rc.top = button_rc.bottom - 30; close_button.Create(*this, _T("Close"), ID_CLOSE, button_rc); close_button.SetFont(normal_font); triangle_window.Create(*this, rc, with_border); }
void Create(PixelSize size) { TopWindowStyle style; style.Resizable(); SingleWindow::Create(_T("RunMapWindow"), size, style); PixelRect rc = GetClientRect(); map.Create(*this, rc); map.SetWaypoints(&way_points); map.SetAirspaces(&airspace_database); map.SetTopography(topography); map.SetTerrain(terrain); if (terrain != NULL) map.SetLocation(terrain->GetTerrainCenter()); rc.left = 5; rc.top = 5; rc.right = rc.left + 60; rc.bottom = rc.top + 20; close_button.Create(*this, _T("Close"), ID_CLOSE, rc); close_button.SetFont(Fonts::map); close_button.BringToTop(); }