mirror of https://github.com/OpenTTD/OpenTTD
(svn r21111) -Add: Remove the buttons below the newgrf details if the list is not editable.
parent
a026ee9b4c
commit
17695611cb
|
@ -497,6 +497,7 @@ enum ShowNewGRFStateWidgets {
|
||||||
SNGRFS_CONTENT_DOWNLOAD,
|
SNGRFS_CONTENT_DOWNLOAD,
|
||||||
SNGRFS_CONTENT_DOWNLOAD2,
|
SNGRFS_CONTENT_DOWNLOAD2,
|
||||||
SNGRFS_SHOW_REMOVE, ///< Select active list buttons (0 = normal, 1 = simple layout).
|
SNGRFS_SHOW_REMOVE, ///< Select active list buttons (0 = normal, 1 = simple layout).
|
||||||
|
SNGRFS_SHOW_APPLY, ///< Select display of the buttons below the 'details'.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -549,6 +550,7 @@ struct NewGRFWindow : public QueryStringBaseWindow {
|
||||||
this->vscroll2 = this->GetScrollbar(SNGRFS_SCROLL2BAR);
|
this->vscroll2 = this->GetScrollbar(SNGRFS_SCROLL2BAR);
|
||||||
|
|
||||||
this->GetWidget<NWidgetStacked>(SNGRFS_SHOW_REMOVE)->SetDisplayedPlane(this->editable ? 0 : 1);
|
this->GetWidget<NWidgetStacked>(SNGRFS_SHOW_REMOVE)->SetDisplayedPlane(this->editable ? 0 : 1);
|
||||||
|
this->GetWidget<NWidgetStacked>(SNGRFS_SHOW_APPLY)->SetDisplayedPlane(this->editable ? 0 : SZSP_HORIZONTAL);
|
||||||
this->FinishInitNested(desc);
|
this->FinishInitNested(desc);
|
||||||
|
|
||||||
InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, EDITBOX_MAX_LENGTH);
|
InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, EDITBOX_MAX_LENGTH);
|
||||||
|
@ -1579,6 +1581,7 @@ static const NWidgetPart _nested_newgrf_infopanel_widgets[] = {
|
||||||
NWidget(WWT_EMPTY, COLOUR_MAUVE, SNGRFS_NEWGRF_INFO_TITLE), SetFill(1, 0), SetResize(1, 0),
|
NWidget(WWT_EMPTY, COLOUR_MAUVE, SNGRFS_NEWGRF_INFO_TITLE), SetFill(1, 0), SetResize(1, 0),
|
||||||
NWidget(WWT_EMPTY, COLOUR_MAUVE, SNGRFS_NEWGRF_INFO), SetFill(1, 1), SetResize(1, 1), SetMinimalSize(150, 100),
|
NWidget(WWT_EMPTY, COLOUR_MAUVE, SNGRFS_NEWGRF_INFO), SetFill(1, 1), SetResize(1, 1), SetMinimalSize(150, 100),
|
||||||
EndContainer(),
|
EndContainer(),
|
||||||
|
NWidget(NWID_SELECTION, INVALID_COLOUR, SNGRFS_SHOW_APPLY),
|
||||||
/* Right side, buttons. */
|
/* Right side, buttons. */
|
||||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(0, WD_RESIZEBOX_WIDTH, 0),
|
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(0, WD_RESIZEBOX_WIDTH, 0),
|
||||||
NWidget(NWID_VERTICAL),
|
NWidget(NWID_VERTICAL),
|
||||||
|
@ -1590,6 +1593,7 @@ static const NWidgetPart _nested_newgrf_infopanel_widgets[] = {
|
||||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, SNGRFS_APPLY_CHANGES), SetFill(1, 0), SetResize(1, 0),
|
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, SNGRFS_APPLY_CHANGES), SetFill(1, 0), SetResize(1, 0),
|
||||||
SetDataTip(STR_NEWGRF_SETTINGS_APPLY_CHANGES, STR_NULL),
|
SetDataTip(STR_NEWGRF_SETTINGS_APPLY_CHANGES, STR_NULL),
|
||||||
EndContainer(),
|
EndContainer(),
|
||||||
|
EndContainer(),
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Construct nested container widget for managing the lists and the info panel of the NewGRF GUI. */
|
/** Construct nested container widget for managing the lists and the info panel of the NewGRF GUI. */
|
||||||
|
|
Loading…
Reference in New Issue