Add support for map window resize in editor

This commit is contained in:
elasota
2020-05-02 01:51:32 -04:00
parent 92c4878492
commit 3b7858f96a
6 changed files with 177 additions and 21 deletions

View File

@@ -68,7 +68,7 @@ short BitchAboutColorDepth (void)
void HandleMouseEvent (const GpMouseInputEvent &theEvent, uint32_t tick)
{
WindowPtr whichWindow;
long menuChoice, newSize;
long menuChoice;
short thePart, hDelta, vDelta;
Boolean isDoubleClick;
Point evtPoint = Point::Create(theEvent.m_x, theEvent.m_y);
@@ -110,11 +110,11 @@ void HandleMouseEvent (const GpMouseInputEvent &theEvent, uint32_t tick)
}
break;
case RegionIDs::kExpand:
case RegionIDs::kResize:
if (whichWindow == mapWindow)
{
newSize = GrowWindow(mapWindow, evtPoint, &thisMac.gray);
ResizeMapWindow(LoWord(newSize), HiWord(newSize));
PortabilityLayer::Vec2i newSize = TrackResize(mapWindow, evtPoint, 47, 35, &thisMac.gray);
ResizeMapWindow(newSize.m_x, newSize.m_y);
}
break;