summaryrefslogtreecommitdiff
path: root/src/ai/ai_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/ai_gui.cpp')
-rw-r--r--src/ai/ai_gui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index 14fc65cc8..49e37621e 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -190,7 +190,7 @@ struct AIListWindow : public Window {
{
switch (widget) {
case WID_AIL_LIST: { // Select one of the AIs
- int sel = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_AIL_LIST, 0, this->line_height) - 1;
+ int sel = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_AIL_LIST) - 1;
if (sel < (int)this->info_list->size()) {
this->selected = sel;
this->SetDirty();
@@ -784,6 +784,7 @@ struct AIConfigWindow : public Window {
case WID_AIC_LIST:
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
+ resize->height = this->line_height;
size->height = 8 * this->line_height;
break;
@@ -895,7 +896,7 @@ struct AIConfigWindow : public Window {
}
case WID_AIC_LIST: { // Select a slot
- this->selected_slot = (CompanyID)this->vscroll->GetScrolledRowFromWidget(pt.y, this, widget, 0, this->line_height);
+ this->selected_slot = (CompanyID)this->vscroll->GetScrolledRowFromWidget(pt.y, this, widget);
this->InvalidateData();
if (click_count > 1 && this->selected_slot != INVALID_COMPANY) ShowAIListWindow((CompanyID)this->selected_slot);
break;