(svn r20221) -Codechange: Move unscrolled row calculation into a function.
This commit is contained in:
@@ -259,8 +259,7 @@ public:
|
||||
{
|
||||
switch (widget) {
|
||||
case TWA_COMMAND_LIST: {
|
||||
int y = (pt.y - this->GetWidget<NWidgetBase>(TWA_COMMAND_LIST)->pos_y - 1) / FONT_HEIGHT_NORMAL;
|
||||
|
||||
int y = this->GetRowFromWidget(pt.y, TWA_COMMAND_LIST, 1, FONT_HEIGHT_NORMAL);
|
||||
if (!IsInsideMM(y, 0, 5)) return;
|
||||
|
||||
y = GetNthSetBit(GetMaskOfTownActions(NULL, _local_company, this->town), y + this->vscroll.GetPosition() - 1);
|
||||
|
Reference in New Issue
Block a user