Merge branch 'master' into jgrpp
# Conflicts: # .github/workflows/ci-build.yml # .github/workflows/release-linux.yml # .github/workflows/release-macos.yml # .github/workflows/release-windows.yml # .gitignore # COMPILING.md # src/company_gui.cpp # src/date_gui.cpp # src/engine.cpp # src/engine_func.h # src/fileio.cpp # src/linkgraph/linkgraph_gui.h # src/newgrf_debug_gui.cpp # src/newgrf_gui.cpp # src/order_gui.cpp # src/osk_gui.cpp # src/rail_gui.cpp # src/road_gui.cpp # src/script/api/script_event_types.hpp # src/sl/oldloader_sl.cpp # src/smallmap_gui.cpp # src/station_cmd.cpp # src/toolbar_gui.cpp # src/town_gui.cpp # src/transparency_gui.cpp # src/vehicle_gui.cpp # src/widget.cpp # src/widget_type.h # src/widgets/dropdown.cpp # src/widgets/dropdown_func.h # src/widgets/dropdown_type.h # src/widgets/group_widget.h # src/widgets/vehicle_widget.h # src/window.cpp # src/window_gui.h # src/window_type.h
This commit is contained in:
@@ -260,7 +260,7 @@ public:
|
||||
this->Window::Close();
|
||||
}
|
||||
|
||||
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
virtual void UpdateWidgetSize(WidgetID widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
{
|
||||
switch (widget) {
|
||||
case TRW_WIDGET_TOP_MATRIX:
|
||||
@@ -312,7 +312,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void SetStringParameters(int widget) const override
|
||||
virtual void SetStringParameters(WidgetID widget) const override
|
||||
{
|
||||
switch (widget) {
|
||||
case TRW_CAPTION:
|
||||
@@ -321,7 +321,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void DrawWidget(const Rect &r, int widget) const override
|
||||
virtual void DrawWidget(const Rect &r, WidgetID widget) const override
|
||||
{
|
||||
switch (widget) {
|
||||
case TRW_WIDGET_TOP_MATRIX: {
|
||||
@@ -404,7 +404,7 @@ public:
|
||||
this->DrawWidgets();
|
||||
}
|
||||
|
||||
virtual void OnClick(Point pt, int widget, int click_count) override
|
||||
virtual void OnClick(Point pt, WidgetID widget, int click_count) override
|
||||
{
|
||||
if (this->editInProgress) return;
|
||||
|
||||
@@ -495,7 +495,7 @@ public:
|
||||
ShowDropDownList(this, GetRailTypeDropDownList(true, true), this->sel_railtype, TRW_WIDGET_TRAIN_RAILTYPE_DROPDOWN);
|
||||
break;
|
||||
case TRW_WIDGET_TOP_MATRIX: {
|
||||
uint16 newindex = (uint16)((pt.y - this->nested_array[TRW_WIDGET_TOP_MATRIX]->pos_y) / (GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.matrix.Vertical()) ) + this->vscroll[0]->GetPosition();
|
||||
uint16 newindex = (uint16)((pt.y - this->GetWidget<NWidgetBase>(TRW_WIDGET_TOP_MATRIX)->pos_y) / (GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.matrix.Vertical()) ) + this->vscroll[0]->GetPosition();
|
||||
if (newindex == this->selected_group_index || newindex >= this->groups.size()) {
|
||||
this->selected_group_index = -1;
|
||||
} else if (newindex < this->groups.size()) {
|
||||
@@ -505,7 +505,7 @@ public:
|
||||
break;
|
||||
}
|
||||
case TRW_WIDGET_BOTTOM_MATRIX: {
|
||||
uint16 newindex = (uint16)((pt.y - this->nested_array[TRW_WIDGET_BOTTOM_MATRIX]->pos_y) / this->bottom_matrix_item_size) + this->vscroll[1]->GetPosition();
|
||||
uint16 newindex = (uint16)((pt.y - this->GetWidget<NWidgetBase>(TRW_WIDGET_BOTTOM_MATRIX)->pos_y) / this->bottom_matrix_item_size) + this->vscroll[1]->GetPosition();
|
||||
if (newindex == this->selected_template_index || newindex >= templates.size()) {
|
||||
this->selected_template_index = -1;
|
||||
} else if (newindex < templates.size()) {
|
||||
@@ -560,7 +560,7 @@ public:
|
||||
this->RaiseButtons();
|
||||
}
|
||||
|
||||
virtual void OnDropdownSelect(int widget, int index) override
|
||||
virtual void OnDropdownSelect(WidgetID widget, int index) override
|
||||
{
|
||||
RailType temp = (RailType) index;
|
||||
if (temp == this->sel_railtype) return; // we didn't select a new one. No need to change anything
|
||||
|
Reference in New Issue
Block a user