|
@@ -134,25 +134,25 @@ struct SignListWindow : Window, SignList
|
|
|
y += this->resize.step_height;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
virtual void SetStringParameters(int widget) const
|
|
|
{
|
|
|
if (widget == SLW_CAPTION) SetDParam(0, this->vscroll.GetCount());
|
|
|
}
|
|
|
|
|
|
virtual void OnClick(Point pt, int widget)
|
|
|
virtual void OnClick(Point pt, int widget, int click_count)
|
|
|
{
|
|
|
if (widget == SLW_LIST) {
|
|
|
uint id_v = (pt.y - this->GetWidget<NWidgetBase>(SLW_LIST)->pos_y - WD_FRAMERECT_TOP) / this->resize.step_height;
|
|
|
|
|
|
if (id_v >= this->vscroll.GetCapacity()) return;
|
|
|
id_v += this->vscroll.GetPosition();
|
|
|
if (id_v >= this->vscroll.GetCount()) return;
|
|
|
|
|
|
const Sign *si = this->signs[id_v];
|
|
|
ScrollMainWindowToTile(TileVirtXY(si->x, si->y));
|
|
|
}
|
|
|
}
|
|
@@ -319,25 +319,25 @@ struct SignWindow : QueryStringBaseWindo
|
|
|
case QUERY_EDIT_SIGN_WIDGET_CAPTION:
|
|
|
SetDParam(0, this->caption);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
virtual void OnPaint()
|
|
|
{
|
|
|
this->DrawWidgets();
|
|
|
if (!this->IsShaded()) this->DrawEditBox(QUERY_EDIT_SIGN_WIDGET_TEXT);
|
|
|
}
|
|
|
|
|
|
virtual void OnClick(Point pt, int widget)
|
|
|
virtual void OnClick(Point pt, int widget, int click_count)
|
|
|
{
|
|
|
switch (widget) {
|
|
|
case QUERY_EDIT_SIGN_WIDGET_PREVIOUS:
|
|
|
case QUERY_EDIT_SIGN_WIDGET_NEXT: {
|
|
|
const Sign *si = this->PrevNextSign(widget == QUERY_EDIT_SIGN_WIDGET_NEXT);
|
|
|
|
|
|
/* Rebuild the sign list */
|
|
|
this->signs.ForceRebuild();
|
|
|
this->signs.NeedResort();
|
|
|
this->BuildSignsList();
|
|
|
this->SortSignsList();
|
|
|
|