From 116c77c342d0f628235a7f5dbacfbb5bc3fb0829 Mon Sep 17 00:00:00 2001 From: alberth Date: Sat, 19 Sep 2009 11:31:12 +0000 Subject: (svn r17572) -Codechange: Use the Window::GetWidget() function to access nested widgets through the nested_array. --- src/dock_gui.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/dock_gui.cpp') diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 2feaa2e2a..a2af30d55 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -370,8 +370,8 @@ public: } /* strings such as 'Size' and 'Coverage Area' */ - int top = this->nested_array[BDSW_LT_OFF]->pos_y + this->nested_array[BDSW_LT_OFF]->current_y + WD_PAR_VSEP_NORMAL; - NWidgetCore *back_nwi = this->nested_array[BDSW_BACKGROUND]; + int top = this->GetWidget(BDSW_LT_OFF)->pos_y + this->GetWidget(BDSW_LT_OFF)->current_y + WD_PAR_VSEP_NORMAL; + NWidgetBase *back_nwi = this->GetWidget(BDSW_BACKGROUND); int right = back_nwi->pos_x + back_nwi->current_x; int bottom = back_nwi->pos_y + back_nwi->current_y; top = DrawStationCoverageAreaText(back_nwi->pos_x + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, SCT_ALL, rad, false) + WD_PAR_VSEP_NORMAL; @@ -463,10 +463,10 @@ public: { this->DrawWidgets(); - DrawShipDepotSprite(this->nested_array[BDDW_X]->pos_x + 64, this->nested_array[BDDW_X]->pos_y + 18, 0); - DrawShipDepotSprite(this->nested_array[BDDW_X]->pos_x + 32, this->nested_array[BDDW_X]->pos_y + 34, 1); - DrawShipDepotSprite(this->nested_array[BDDW_Y]->pos_x + 32, this->nested_array[BDDW_Y]->pos_y + 18, 2); - DrawShipDepotSprite(this->nested_array[BDDW_Y]->pos_x + 64, this->nested_array[BDDW_Y]->pos_y + 34, 3); + DrawShipDepotSprite(this->GetWidget(BDDW_X)->pos_x + 64, this->GetWidget(BDDW_X)->pos_y + 18, 0); + DrawShipDepotSprite(this->GetWidget(BDDW_X)->pos_x + 32, this->GetWidget(BDDW_X)->pos_y + 34, 1); + DrawShipDepotSprite(this->GetWidget(BDDW_Y)->pos_x + 32, this->GetWidget(BDDW_Y)->pos_y + 18, 2); + DrawShipDepotSprite(this->GetWidget(BDDW_Y)->pos_x + 64, this->GetWidget(BDDW_Y)->pos_y + 34, 3); } virtual void OnClick(Point pt, int widget) -- cgit v1.2.3-54-g00ecf