Proper transparent confirmation window

This commit is contained in:
Sergii Pylypenko
2016-04-07 23:39:16 +03:00
parent 67d27d79b0
commit fd0a3f9ffc
4 changed files with 72 additions and 53 deletions

View File

@@ -2151,6 +2151,8 @@ static void PlaceObject()
Point pt;
Window *w;
if (BuildConfirmationWindowProcessViewportClick()) return;
pt = GetTileBelowCursor();
if (pt.x == -1) return;
@@ -2164,7 +2166,6 @@ static void PlaceObject()
w = _thd.GetCallbackWnd();
if (w != NULL) w->OnPlaceObject(pt, TileVirtXY(pt.x, pt.y));
HideBuildConfirmationWindow();
}
@@ -3216,7 +3217,6 @@ void SetObjectToPlace(CursorID icon, PaletteID pal, HighLightStyle mode, WindowC
* place or not properly reset the original selection. */
_thd.window_class = WC_INVALID;
if (w != NULL) w->OnPlaceObjectAbort();
HideBuildConfirmationWindow();
}
/* Mark the old selection dirty, in case the selection shape or colour changes */