src/dock_gui.cpp
branchcpp_gui
changeset 6251 cd413fa2e252
parent 6241 6a7a41b0cd32
child 6258 a2f86b8fd99b
equal deleted inserted replaced
6250:5135b200b376 6251:cd413fa2e252
   224 }
   224 }
   225 
   225 
   226 static void BuildDockStationWndProc(Window *w, WindowEvent *e)
   226 static void BuildDockStationWndProc(Window *w, WindowEvent *e)
   227 {
   227 {
   228 	switch (e->event) {
   228 	switch (e->event) {
   229 	case WE_CREATE: LowerWindowWidget(w, _station_show_coverage + 3); break;
   229 	case WE_CREATE: w->LowerWidget(_station_show_coverage + 3); break;
   230 
   230 
   231 	case WE_PAINT: {
   231 	case WE_PAINT: {
   232 		int rad;
   232 		int rad;
   233 
   233 
   234 		if (WP(w,def_d).close) return;
   234 		if (WP(w,def_d).close) return;
   244 
   244 
   245 	case WE_CLICK:
   245 	case WE_CLICK:
   246 		switch (e->we.click.widget) {
   246 		switch (e->we.click.widget) {
   247 			case 3:
   247 			case 3:
   248 			case 4:
   248 			case 4:
   249 				RaiseWindowWidget(w, _station_show_coverage + 3);
   249 				w->RaiseWidget(_station_show_coverage + 3);
   250 				_station_show_coverage = (e->we.click.widget != 3);
   250 				_station_show_coverage = (e->we.click.widget != 3);
   251 				LowerWindowWidget(w, _station_show_coverage + 3);
   251 				w->LowerWidget(_station_show_coverage + 3);
   252 				SndPlayFx(SND_15_BEEP);
   252 				SndPlayFx(SND_15_BEEP);
   253 				w->SetDirty();
   253 				w->SetDirty();
   254 				break;
   254 				break;
   255 		}
   255 		}
   256 		break;
   256 		break;
   303 }
   303 }
   304 
   304 
   305 static void BuildDocksDepotWndProc(Window *w, WindowEvent *e)
   305 static void BuildDocksDepotWndProc(Window *w, WindowEvent *e)
   306 {
   306 {
   307 	switch (e->event) {
   307 	switch (e->event) {
   308 	case WE_CREATE: LowerWindowWidget(w, _ship_depot_direction + 3); break;
   308 	case WE_CREATE: w->LowerWidget(_ship_depot_direction + 3); break;
   309 
   309 
   310 	case WE_PAINT:
   310 	case WE_PAINT:
   311 		w->DrawWidgets();
   311 		w->DrawWidgets();
   312 
   312 
   313 		DrawShipDepotSprite(67, 35, 0);
   313 		DrawShipDepotSprite(67, 35, 0);
   318 
   318 
   319 	case WE_CLICK: {
   319 	case WE_CLICK: {
   320 		switch (e->we.click.widget) {
   320 		switch (e->we.click.widget) {
   321 		case 3:
   321 		case 3:
   322 		case 4:
   322 		case 4:
   323 			RaiseWindowWidget(w, _ship_depot_direction + 3);
   323 			w->RaiseWidget(_ship_depot_direction + 3);
   324 			_ship_depot_direction = (e->we.click.widget == 3 ? AXIS_X : AXIS_Y);
   324 			_ship_depot_direction = (e->we.click.widget == 3 ? AXIS_X : AXIS_Y);
   325 			LowerWindowWidget(w, _ship_depot_direction + 3);
   325 			w->LowerWidget(_ship_depot_direction + 3);
   326 			SndPlayFx(SND_15_BEEP);
   326 			SndPlayFx(SND_15_BEEP);
   327 			UpdateDocksDirection();
   327 			UpdateDocksDirection();
   328 			w->SetDirty();
   328 			w->SetDirty();
   329 			break;
   329 			break;
   330 		}
   330 		}