@@ -92,25 +92,25 @@ public:
case EVW_CAPTION:
/* set the number in the title bar */
SetDParam(0, this->window_number + 1);
break;
}
virtual void OnPaint()
{
this->DrawWidgets();
virtual void OnClick(Point pt, int widget)
virtual void OnClick(Point pt, int widget, int click_count)
switch (widget) {
case EVW_ZOOMIN: DoZoomInOutWindow(ZOOM_IN, this); break;
case EVW_ZOOMOUT: DoZoomInOutWindow(ZOOM_OUT, this); break;
case EVW_MAIN_TO_VIEW: { // location button (move main view to same spot as this view) 'Paste Location'
Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
int x = this->viewport->scrollpos_x; // Where is the main looking at
int y = this->viewport->scrollpos_y;
/* set this view to same location. Based on the center, adjusting for zoom */
w->viewport->dest_scrollpos_x = x - (w->viewport->virtual_width - this->viewport->virtual_width) / 2;