bool dlgConfigurationVarioShowModal(Device &_device) { device = (VegaDevice *)&_device; changed = dirty = false; const DialogLook &look = UIGlobals::GetDialogLook(); WidgetDialog dialog(look); ArrowPagerWidget widget(dialog, look.button, new VegaConfigurationExtraButtons(dialog)); FillPager(widget); dialog.CreateFull(UIGlobals::GetMainWindow(), _("Vario Configuration"), &widget); widget.SetPageFlippedCallback([&dialog, &widget](){ UpdateCaption(dialog, widget.GetCurrentIndex()); }); UpdateCaption(dialog, widget.GetCurrentIndex()); dialog.ShowModal(); dialog.StealWidget(); return changed || dialog.GetChanged(); }
void dlgChecklistShowModal() { static unsigned int current_page = 0; static bool first = true; if (first) { LoadChecklist(); first = false; } const DialogLook &look = UIGlobals::GetDialogLook(); WidgetDialog dialog(look); ArrowPagerWidget widget(dialog, look.button); for (int i = 0; i < nLists; ++i) widget.Add(new LargeTextWidget(look, ChecklistText[i])); widget.SetCurrent(current_page); dialog.CreateFull(UIGlobals::GetMainWindow(), _("Checklist"), &widget); widget.SetPageFlippedCallback([&dialog, &widget](){ UpdateCaption(dialog, widget.GetCurrentIndex()); }); UpdateCaption(dialog, widget.GetCurrentIndex()); dialog.ShowModal(); dialog.StealWidget(); current_page = widget.GetCurrentIndex(); }
void Windows9::Execute(){ SDL_Event *currentEvent = myGraphic->getEvent(); UpdateCaption(); myGraphic->activeInputText(); myText = "NewFolder"; myNewFolder->setMessageChanged(true); while(termination == false){ displayBasics(); while(SDL_PollEvent(currentEvent)){ if(currentEvent->type == SDL_QUIT){ termination = true; } else if(currentEvent->type == SDL_MOUSEMOTION){ xPosOfMouse = currentEvent->button.x; yPosOfMouse = currentEvent->button.y; //cout << "x: " << xPosOfMouse << " y: " << yPosOfMouse << endl; checkMouseState(xPosOfMouse, yPosOfMouse); } else if(currentEvent->type == SDL_MOUSEBUTTONDOWN){ xPosOfMouse = currentEvent->button.x; yPosOfMouse = currentEvent->button.y; cout << "x: " << xPosOfMouse << " y: " << yPosOfMouse << endl; checkMouseClicked(xPosOfMouse, yPosOfMouse); } else if(currentEvent->type == SDL_KEYDOWN && myNewFolder->getActivation()){ if( currentEvent->key.keysym.sym == SDLK_BACKSPACE && myText.length() > 0 ){ myNewFolder->setMessageChanged(true); myText.pop_back(); } } if(currentEvent->type == SDL_TEXTINPUT && myNewFolder->getActivation()){ myNewFolder->setMessageChanged(true); myText += currentEvent->text.text; } } if(myNewFolder->getActivation() && myNewFolder->getMessageChanged() == true){ myNewFolder->setName(myText); cout << "text: " << myNewFolder->getName() << endl; } myGraphic->display(); UpdateCaption(); } myGraphic->deactiveInputText(); }
void DoHexEditor() { WNDCLASSEX wndclass; if (!HexEditorHWnd) { memset(&wndclass,0,sizeof(wndclass)); wndclass.cbSize=sizeof(WNDCLASSEX); wndclass.style = CS_HREDRAW | CS_VREDRAW ; wndclass.lpfnWndProc = HexEditorProc ; wndclass.cbClsExtra = 0 ; wndclass.cbWndExtra = 0 ; wndclass.hInstance = ghInstance; wndclass.hIcon = LoadIcon(ghInstance, MAKEINTRESOURCE(IDI_GENS)); wndclass.hIconSm = LoadIcon(ghInstance, MAKEINTRESOURCE(IDI_GENS)); wndclass.hCursor = LoadCursor (NULL, IDC_ARROW); wndclass.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wndclass.lpszClassName = "HEXEDITOR"; if(!RegisterClassEx(&wndclass)) { Put_Info("Error Registering HEXEDITOR Window Class."); return; } HexEditorHWnd = CreateWindowEx( 0, "HEXEDITOR", "HexEditor", WS_SYSMENU | WS_MINIMIZEBOX | WS_VSCROLL, CW_USEDEFAULT, CW_USEDEFAULT, 580, 248, NULL, NULL, ghInstance, NULL ); ShowWindow(HexEditorHWnd, SW_SHOW); UpdateCaption(); DialogsOpen++; } else { ShowWindow(HexEditorHWnd, SW_SHOWNORMAL); SetForegroundWindow(HexEditorHWnd); UpdateCaption(); } }
void PlaneEditWidget::Prepare(ContainerWindow &parent, const PixelRect &rc) { AddText(_("Registration"), nullptr, plane.registration, this); AddText(_("Comp. ID"), nullptr, plane.competition_id); AddButton(_("Polar"), *this, POLAR); AddText(_("Type"), nullptr, plane.type); AddInteger(_("Handicap"), nullptr, _T("%u %%"), _T("%u"), 50, 150, 1, plane.handicap); AddFloat(_("Wing Area"), nullptr, _T("%.1f m²"), _T("%.1f"), fixed(0), fixed(40), fixed(0.1), false, plane.wing_area); AddFloat(_("Max. Ballast"), nullptr, _T("%.0f l"), _T("%.0f"), fixed(0), fixed(500), fixed(5), false, plane.max_ballast); AddInteger(_("Dump Time"), nullptr, _T("%u s"), _T("%u"), 10, 300, 5, plane.dump_time); AddFloat(_("Max. Cruise Speed"), nullptr, _T("%.0f %s"), _T("%.0f"), fixed(0), fixed(300), fixed(5), false, UnitGroup::HORIZONTAL_SPEED, plane.max_speed); UpdateCaption(); UpdatePolarButton(); }
bool QuickMenu::KeyPress(unsigned key_code) { switch (key_code) { case KEY_LEFT: grid_view.MoveFocus(GridView::Direction::LEFT); break; case KEY_RIGHT: grid_view.MoveFocus(GridView::Direction::RIGHT); break; case KEY_UP: grid_view.MoveFocus(GridView::Direction::UP); break; case KEY_DOWN: grid_view.MoveFocus(GridView::Direction::DOWN); break; case KEY_MENU: grid_view.ShowNextPage(); SetFocus(); break; default: return false; } UpdateCaption(); return true; }
void __fastcall TConjoinDockHost::FormDockDrop(TObject *Sender, TDragDockObject *Source, int X, int Y) { UpdateCaption(NULL); DockManager->ResetBounds(true); // Force DockManager to redraw it's clients. }
void MainGameLoop::Run() { FrameCounter fc; // main game loop while (!m_bExitLoop) { OnTick(); ProcessEvents(); if (m_bExitLoop) break; if (!m_bAppActive) { // as we're not visible, just wait for next event SDL_WaitEvent(NULL); continue; } // render the scene { OpenGL::ResetPolycount(); OnRender(); fc.OnNextFrame(); } // count ticks for fps double dFramesPerSecond; if (m_bUpdateFrameCount && fc.GetUpdatedCount(dFramesPerSecond)) UpdateCaption(dFramesPerSecond); } }
static void OnSaveClicked(WndButton* pWnd){ int file_index; TCHAR task_name[MAX_PATH]; WndProperty* wp; DataFieldFileReader *dfe; wp = (WndProperty*)wf->FindByName(TEXT("prpFile")); if (!wp) return; dfe = (DataFieldFileReader*)wp->GetDataField(); file_index = dfe->GetAsInteger(); // TODO enhancement: suggest a good new name not already in the list _tcscpy(task_name,TEXT("NEW")); dlgTextEntryShowModal(task_name, 10); // max length if (_tcslen(task_name)>0) { _tcscat(task_name, TEXT(LKS_TSK)); dfe->Lookup(task_name); file_index = dfe->GetAsInteger(); if (file_index==0) { // good, this file is unique.. dfe->addFile(task_name, task_name); dfe->Lookup(task_name); wp->RefreshDisplay(); } } else { // TODO code: report error, task not saved since no name was given return; } if (file_index>0) { // file already exists! ask if want to overwrite TCHAR sTmp[500]; _sntprintf(sTmp, array_size(sTmp), TEXT("%s: '%s'"), // LKTOKEN _@M696_ = "Task file already exists" MsgToken(696), dfe->GetAsString()); if(MessageBoxX( sTmp, // LKTOKEN _@M510_ = "Overwrite?" MsgToken(510), mbYesNo) != IdYes) { return; } } TCHAR file_name[MAX_PATH]; LocalPath(file_name,TEXT(LKD_TASKS), task_name); SaveTask(file_name); UpdateCaption(); }
void CTreePropSheet::OnPageTreeSelChanged(NMHDR *pNotifyStruct, LRESULT *plResult) { *plResult = 0; UpdateCaption(); return; }
void __fastcall TfrmMain::UpdateAllCaptions() { int Index; for (Index = 0; Index < ControlCount; Index++) if (dynamic_cast<TJvFullColorLabel*>(Controls[Index])) UpdateCaption(dynamic_cast<TJvFullColorLabel*>(Controls[Index])); }
void __fastcall TfrmMain::JvFullColorDialogApply(TObject *Sender, TJvFullColor AFullColor) { TJvFullColorDialog* dialog = dynamic_cast<TJvFullColorDialog*>(Sender); reinterpret_cast<TJvFullColorLabel*>(dialog->Tag)->LabelColor = dialog->FullColor; UpdateCaption(reinterpret_cast<TJvFullColorLabel*>(dialog->Tag)); }
//----------------------------------------------------------------------------- //! //----------------------------------------------------------------------------- void tRudderBarMedusa::SetVirtualFeedback( bool on ) { if( m_VirtualFeedback != on ) { m_VirtualFeedback = on; UpdateCaption(); } }
static void OverviewRefreshTask(void) { LockTaskData(); RefreshTask(); int i; // Only need to refresh info where the removal happened // as the order of other taskpoints hasn't changed UpLimit = 0; lengthtotal = 0; for (i=0; i<MAXTASKPOINTS; i++) { if (Task[i].Index != -1) { lengthtotal += Task[i].Leg; UpLimit = i+1; } } // Simple FAI 2004 triangle rules fai_ok = true; if (lengthtotal>0) { for (i=0; i<MAXTASKPOINTS; i++) { if (Task[i].Index != -1) { double lrat = Task[i].Leg/lengthtotal; if ((lrat>0.45)||(lrat<0.10)) { fai_ok = false; } } } } else { fai_ok = false; } RefreshTaskStatistics(); WndProperty* wp; wp = (WndProperty*)wf->FindByName(TEXT("prpAATEst")); if (wp) { double dd = CALCULATED_INFO.TaskTimeToGo; // if ((CALCULATED_INFO.TaskStartTime>0.0)&&(CALCULATED_INFO.Flying)) { patchout 091126 if ( (CALCULATED_INFO.TaskStartTime>0.0)&&(CALCULATED_INFO.Flying) &&(ActiveTaskPoint>0)) { // patch 091126 dd += GPS_INFO.Time-CALCULATED_INFO.TaskStartTime; } dd= min(24.0*60.0,dd/60.0); wp->GetDataField()->SetAsFloat(dd); wp->RefreshDisplay(); } LowLimit =0; wTaskList->ResetList(); wTaskList->Redraw(); UpdateCaption(); UnlockTaskData(); }
void MacCreadySetupPanel::OnAction(int id) { TaskBehaviour &task_behaviour = CommonInterface::SetComputerSettings().task; task_behaviour.auto_mc = !task_behaviour.auto_mc; Profile::Set(ProfileKeys::AutoMc, task_behaviour.auto_mc); UpdateCaption(); }
void CPreferencesDlg::Localize() { SetTitle(RemoveAmbersand(GetResString(IDS_EM_PREFS))); m_wndGeneral.Localize(); m_wndDisplay.Localize(); m_wndConnection.Localize(); m_wndServer.Localize(); m_wndDirectories.Localize(); m_wndFiles.Localize(); m_wndStats.Localize(); m_wndNotify.Localize(); m_wndIRC.Localize(); m_wndSecurity.Localize(); m_wndTweaks.Localize(); m_wndWebServer.Localize(); m_wndScheduler.Localize(); m_wndProxy.Localize(); m_wndMessages.Localize(); m_wndXtreme.Localize(); //Xman Xtreme Mod m_wndXtreme2.Localize(); //Xman Xtreme Mod m_wndScar.Localize(); // ScarAngel Preferences window - Stulle int c = 0; CTreeCtrl* pTree = GetPageTreeControl(); if (pTree) { pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_GENERAL))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_DISPLAY))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_CONNECTION))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_PROXY))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_SERVER))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_DIR))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_FILES))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_EKDEV_OPTIONS))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_STATSSETUPINFO))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_IRC))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_MESSAGESCOMMENTS))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_SECURITY))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_SCHEDULER))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_WS))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_PW_TWEAK))); pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_XTREMESETTINGS)) + _T(" I")); //Xman Xtreme Mod pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_XTREMESETTINGS)) + _T(" II")); //Xman Xtreme Mod pTree->SetItemText(GetPageTreeItem(c++), RemoveAmbersand(GetResString(IDS_SCARANGEL))); // ScarAngel Preferences window - Stulle #if defined(_DEBUG) || defined(USE_DEBUG_DEVICE) pTree->SetItemText(GetPageTreeItem(c++), _T("Debug")); #endif } //Xman Preferences Banner m_banner.UpdateSize(); //Xman end UpdateCaption(); }
static void OnLoadClicked(WndButton* pWnd){ // 091216 TCHAR file_name[MAX_PATH]; WndProperty* wp; DataFieldFileReader *dfe; wp = (WndProperty*)wf->FindByName(TEXT("prpFile")); if (!wp) return; wp->OnLButtonDown((POINT){0,0}); dfe = (DataFieldFileReader*) wp->GetDataField(); int file_index = dfe->GetAsInteger(); if (file_index>0) { if (ValidTaskPoint(ActiveWayPoint) && ValidTaskPoint(1)) { _stprintf(file_name, TEXT("%s '%s' ?"), gettext(TEXT("_@M891_")), dfe->GetAsString()); // Clear old task and load if(MessageBoxX(file_name, _T(" "), mbYesNo) == IdNo) { return; } } } else { // LKTOKEN _@M467_ = "No Task to load" MessageBoxX(gettext(TEXT("_@M467_")),_T(" "), mbOk); return; } if (file_index>0) { LPCTSTR szFileName = dfe->GetPathFile(); LPCTSTR wextension = _tcsrchr(szFileName, _T('.')); if(wextension) { bool bOK = false; if(_tcsicmp(wextension,_T(LKS_TSK))==0) { CTaskFileHelper helper; bOK = helper.Load(szFileName); } #ifdef OLDTASK_COMPAT else if (_tcsicmp(wextension,_T(LKS_OLD_TSK))==0) { LoadNewTask(szFileName); bOK = true; } #endif else if (_tcsicmp(wextension,_T(LKS_WP_CUP))==0) { bOK = LoadCupTask(szFileName); } else if (_tcsicmp(wextension,_T(LKS_WP_GPX))==0) { bOK = LoadGpxTask(szFileName); } if(!bOK) { MessageBoxX(gettext(TEXT("_@M467_")),_T(" "), mbOk); return; } OverviewRefreshTask(); UpdateFilePointer(); UpdateCaption(); } } }
LRESULT CTreePropSheet::OnSetCurSelId(WPARAM wParam, LPARAM lParam) { LRESULT lResult = DefWindowProc(PSM_SETCURSEL, wParam, lParam); if (!m_bTreeViewMode) return lResult; SelectCurrentPageTreeItem(); UpdateCaption(); return lResult; }
static void OnLoadClicked(WindowControl * Sender, WndListFrame::ListInfo_t *ListInfo){ // 091216 (void)ListInfo; (void)Sender; TCHAR file_name[MAX_PATH]; WndProperty* wp; DataFieldFileReader *dfe; wp = (WndProperty*)wf->FindByName(TEXT("prpFile")); if (!wp) return; HWND hwnd = wp->GetHandle(); SendMessage(hwnd,WM_LBUTTONDOWN,0,0); dfe = (DataFieldFileReader*) wp->GetDataField(); int file_index = dfe->GetAsInteger(); if (file_index>0) { if (ValidTaskPoint(ActiveWayPoint) && ValidTaskPoint(1)) { _stprintf(file_name, TEXT("%s '%s' ?"), gettext(TEXT("_@M891_")), dfe->GetAsString()); // Clear old task and load if(MessageBoxX(hWndMapWindow, file_name, _T(" "), MB_YESNO|MB_ICONQUESTION) == IDNO) { return; } } } else { // LKTOKEN _@M467_ = "No Task to load" MessageBoxX(hWndMapWindow, gettext(TEXT("_@M467_")),_T(" "), MB_OK|MB_ICONEXCLAMATION); return; } if (file_index>0) { LPCTSTR szFileName = dfe->GetPathFile(); LPCTSTR wextension = _tcsrchr(szFileName, _T('.')); if(wextension) { bool bOK = false; if(_tcsicmp(wextension,_T(LKS_TSK))==0) { CTaskFileHelper helper; bOK = helper.Load(szFileName); } else if (_tcsicmp(wextension,_T(LKS_OLD_TSK))==0) { LoadNewTask(szFileName); bOK = true; } else if (_tcsicmp(wextension,_T(LKS_WP_CUP))==0) { bOK = LoadCupTask(szFileName); } else if (_tcsicmp(wextension,_T(LKS_WP_GPX))==0) { bOK = LoadGpxTask(szFileName); } if(!bOK) { MessageBoxX(hWndMapWindow, gettext(TEXT("_@M467_")),_T(" "), MB_OK|MB_ICONEXCLAMATION); return; } OverviewRefreshTask(); UpdateFilePointer(); UpdateCaption(); } } }
static void RegistrationClicked(gcc_unused WndButton &button) { if (!dlgTextEntryShowModal(*(SingleWindow *)dialog->get_root_owner(), plane.registration.buffer(), plane.registration.MAX_SIZE)) return; UpdateCaption(); UpdateButton(_T("RegistrationButton"), plane.registration); }
void QuickMenu::Prepare(ContainerWindow &parent, const PixelRect &rc) { WindowStyle grid_view_style; grid_view_style.ControlParent(); grid_view_style.Hide(); const auto &dialog_look = UIGlobals::GetDialogLook(); const auto &font = *dialog_look.button.font; const unsigned column_width = Layout::Scale(78u); const unsigned row_height = std::max(2 * (Layout::GetTextPadding() + font.GetHeight()), Layout::GetMaximumControlHeight()); grid_view.Create(parent, dialog_look, rc, grid_view_style, column_width, row_height); SetWindow(&grid_view); WindowStyle buttonStyle; buttonStyle.TabStop(); for (unsigned i = 0; i < menu.MAX_ITEMS; ++i) { if (buttons.full()) continue; const auto &menuItem = menu[i]; if (!menuItem.IsDefined()) continue; TCHAR buffer[100]; const auto expanded = ButtonLabel::Expand(menuItem.label, buffer, ARRAY_SIZE(buffer)); if (!expanded.visible) continue; PixelRect button_rc; button_rc.left = 0; button_rc.top = 0; button_rc.right = 80; button_rc.bottom = 30; auto *button = new Button(grid_view, button_rc, buttonStyle, new QuickMenuButtonRenderer(dialog_look, expanded.text), *this, menuItem.event); button->SetEnabled(expanded.enabled); buttons.append(button); grid_view.AddItem(*button); } grid_view.RefreshLayout(); UpdateCaption(); }
void __fastcall TfrmMain::JvFullColorLabelDblClick(TObject *Sender) { TJvFullColorLabel* label = dynamic_cast<TJvFullColorLabel*>(Sender); JvFullColorDialog->FullColor = label->LabelColor; JvFullColorDialog->Tag = reinterpret_cast<int>(Sender); if (JvFullColorDialog->Execute()) { label->LabelColor = JvFullColorDialog->FullColor; UpdateCaption(label); } }
void __fastcall TConjoinDockHost::FormUnDock(TObject *Sender, TControl *Client, TWinControl *NewTarget, bool &Allow) { // Only 2 dock clients means the host must be destroyed and // the remaining window undocked to its old position and size. // (Recall that OnUnDock gets called before the undocking actually occurs) if (dynamic_cast<TDockableForm*>(Client) != NULL) (static_cast<TDockableForm*>(Client))->DockSite = true; if ((DockClientCount == 2) && (NewTarget != this)) PostMessage(this->Handle, WM_CLOSE, 0, 0); UpdateCaption(Client); }
void CTreePropSheetBase::OnPageTreeSelChanged(NMHDR *pNotifyStruct, LRESULT *plResult) { UNREFERENCED_PARAMETER(pNotifyStruct); // Refilling the tree control, ignore selection change. if( m_nRefillingPageTreeContent ) return; *plResult = 0; UpdateCaption(); return; }
static void OnClearClicked(WndButton* pWnd){ if (MessageBoxX( // LKTOKEN _@M179_ = "Clear the task?" MsgToken(179), // LKTOKEN _@M178_ = "Clear task" MsgToken(178), mbYesNo) == IdYes) { if (CheckDeclaration()) { ClearTask(); UpdateFilePointer(); OverviewRefreshTask(); UpdateCaption(); } } }
static void Update() { UpdateCaption(); loading = true; LoadPolarShape(*dialog, plane.polar_shape); LoadFormProperty(*dialog, _T("ReferenceMassEdit"), plane.reference_mass); LoadFormProperty(*dialog, _T("DryMassEdit"), plane.dry_mass); loading = false; UpdatePolarLabel(); UpdateInvalidLabel(); }
static void OnClearClicked(WindowControl * Sender, WndListFrame::ListInfo_t *ListInfo){ (void)ListInfo; (void)Sender; if (MessageBoxX(hWndMapWindow, // LKTOKEN _@M179_ = "Clear the task?" gettext(TEXT("_@M179_")), // LKTOKEN _@M178_ = "Clear task" gettext(TEXT("_@M178_")), MB_YESNO|MB_ICONQUESTION) == IDYES) { if (CheckDeclaration()) { ClearTask(); UpdateFilePointer(); OverviewRefreshTask(); UpdateCaption(); } } }
static void Update() { UpdateCaption(); UpdateButton(_T("RegistrationButton"), plane.registration); UpdateButton(_T("CompetitionIDButton"), plane.competition_id); UpdateButton(_T("TypeButton"), plane.type); UpdateButton(_T("PolarButton"), plane.polar_name); LoadFormProperty(*dialog, _T("HandicapEdit"), plane.handicap); LoadFormProperty(*dialog, _T("WingAreaEdit"), plane.wing_area); LoadFormProperty(*dialog, _T("MaxBallastEdit"), plane.max_ballast); LoadFormProperty(*dialog, _T("DumpTimeEdit"), plane.dump_time); LoadFormProperty(*dialog, _T("MaxSpeedEdit"), ugHorizontalSpeed, plane.max_speed); }
void dlgWaypointDetailsShowModal(const Waypoint &_waypoint, bool allow_navigation) { LastUsedWaypoints::Add(_waypoint); const DialogLook &look = UIGlobals::GetDialogLook(); WidgetDialog dialog(look); WaypointDetailsWidget widget(dialog, _waypoint, allow_navigation, protected_task_manager); dialog.CreateFull(UIGlobals::GetMainWindow(), _T(""), &widget); UpdateCaption(&dialog, &_waypoint); dialog.ShowModal(); dialog.StealWidget(); }
static void Update() { LoadFormProperty(*dialog, _T("Registration"), plane.registration); LoadFormProperty(*dialog, _T("CompetitionID"), plane.competition_id); LoadFormProperty(*dialog, _T("Type"), plane.type); UpdateButton(_T("PolarButton"), plane.polar_name); LoadFormProperty(*dialog, _T("HandicapEdit"), plane.handicap); LoadFormProperty(*dialog, _T("WingAreaEdit"), plane.wing_area); LoadFormProperty(*dialog, _T("MaxBallastEdit"), plane.max_ballast); LoadFormProperty(*dialog, _T("DumpTimeEdit"), plane.dump_time); LoadFormProperty(*dialog, _T("MaxSpeedEdit"), UnitGroup::HORIZONTAL_SPEED, plane.max_speed); UpdateCaption(); }