src/timetable_gui.cpp
branchnoai
changeset 10513 33cb70ff2f5d
parent 10455 22c441f5adf9
child 10645 8cbdb511a674
equal deleted inserted replaced
10455:22c441f5adf9 10513:33cb70ff2f5d
   247 
   247 
   248 			w->SetDirty();
   248 			w->SetDirty();
   249 		} break;
   249 		} break;
   250 
   250 
   251 		case WE_ON_EDIT_TEXT: {
   251 		case WE_ON_EDIT_TEXT: {
       
   252 			if (we->we.edittext.str == NULL) break;
       
   253 
   252 			const Vehicle *v = GetVehicle(w->window_number);
   254 			const Vehicle *v = GetVehicle(w->window_number);
   253 
   255 
   254 			uint32 p1 = PackTimetableArgs(v, WP(w, timetable_d).sel);
   256 			uint32 p1 = PackTimetableArgs(v, WP(w, timetable_d).sel);
   255 
   257 
   256 			uint64 time = StrEmpty(we->we.edittext.str) ? 0 : strtoul(we->we.edittext.str, NULL, 10);
   258 			uint64 time = StrEmpty(we->we.edittext.str) ? 0 : strtoul(we->we.edittext.str, NULL, 10);
   299 	TimetableWndProc
   301 	TimetableWndProc
   300 };
   302 };
   301 
   303 
   302 void ShowTimetableWindow(const Vehicle *v)
   304 void ShowTimetableWindow(const Vehicle *v)
   303 {
   305 {
   304 	Window *w = AllocateWindowDescFront(&_timetable_desc, v->index);
   306 	Window *w = AllocateWindowDescFront<Window>(&_timetable_desc, v->index);
   305 
   307 
   306 	if (w != NULL) {
   308 	if (w != NULL) {
   307 		w->caption_color = v->owner;
   309 		w->caption_color = v->owner;
   308 		w->vscroll.cap = 8;
   310 		w->vscroll.cap = 8;
   309 		w->resize.step_height = 10;
   311 		w->resize.step_height = 10;