summaryrefslogtreecommitdiff
path: root/dock_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'dock_gui.c')
-rw-r--r--dock_gui.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/dock_gui.c b/dock_gui.c
index 396c81694..6c8288955 100644
--- a/dock_gui.c
+++ b/dock_gui.c
@@ -157,8 +157,7 @@ static void BuildDocksToolbWndProc(Window *w, WindowEvent *e)
break;
case WE_ABORT_PLACE_OBJ:
- UnclickWindowButtons(w);
- SetWindowDirty(w);
+ RaiseWindowButtons(w);
w = FindWindowById(WC_BUILD_STATION, 0);
if (w != NULL) WP(w,def_d).close = true;
@@ -224,11 +223,12 @@ void ShowBuildDocksToolbar(void)
static void BuildDockStationWndProc(Window *w, WindowEvent *e)
{
switch (e->event) {
+ case WE_CREATE: LowerWindowWidget(w, _station_show_coverage + 3); break;
+
case WE_PAINT: {
int rad;
if (WP(w,def_d).close) return;
- w->click_state = (1<<3) << _station_show_coverage;
DrawWindowWidgets(w);
rad = (_patches.modified_catchment) ? CA_DOCK : 4;
@@ -243,7 +243,9 @@ static void BuildDockStationWndProc(Window *w, WindowEvent *e)
switch (e->we.click.widget) {
case 3:
case 4:
+ RaiseWindowWidget(w, _station_show_coverage + 3);
_station_show_coverage = e->we.click.widget - 3;
+ LowerWindowWidget(w, _station_show_coverage + 3);
SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
@@ -300,8 +302,9 @@ static void UpdateDocksDirection(void)
static void BuildDocksDepotWndProc(Window *w, WindowEvent *e)
{
switch (e->event) {
+ case WE_CREATE: LowerWindowWidget(w, _ship_depot_direction + 3); break;
+
case WE_PAINT:
- w->click_state = (1<<3) << _ship_depot_direction;
DrawWindowWidgets(w);
DrawShipDepotSprite(67, 35, 0);
@@ -314,7 +317,9 @@ static void BuildDocksDepotWndProc(Window *w, WindowEvent *e)
switch (e->we.click.widget) {
case 3:
case 4:
+ RaiseWindowWidget(w, _ship_depot_direction + 3);
_ship_depot_direction = e->we.click.widget - 3;
+ LowerWindowWidget(w, _ship_depot_direction + 3);
SndPlayFx(SND_15_BEEP);
UpdateDocksDirection();
SetWindowDirty(w);