Setting to disable windows titlebars
This commit is contained in:
@@ -1878,6 +1878,44 @@ class NWidgetVerticalToolbarContainer : public NWidgetToolbarContainer {
|
||||
|
||||
/* virtual */ const byte *GetButtonArrangement(uint &width, uint &arrangable_count, uint &button_count, uint &spacer_count) const
|
||||
{
|
||||
// Ultra-compact arrangement, ultra-huge buttons.
|
||||
// No WID_TN_SHIFT, WID_TN_STORY, WID_TN_GOAL, and WID_TN_LEAGUE buttons.
|
||||
static const byte arrange_left_compact[] = {
|
||||
WID_TN_DELETE,
|
||||
WID_TN_CTRL,
|
||||
WID_TN_ZOOM_IN,
|
||||
WID_TN_ZOOM_OUT,
|
||||
WID_TN_PAUSE,
|
||||
WID_TN_FAST_FORWARD,
|
||||
WID_TN_SETTINGS,
|
||||
WID_TN_SAVE,
|
||||
WID_TN_SMALL_MAP,
|
||||
WID_TN_TOWNS,
|
||||
};
|
||||
static const byte arrange_right_compact[] = {
|
||||
WID_TN_SWITCH_BAR,
|
||||
WID_TN_RAILS,
|
||||
WID_TN_ROADS,
|
||||
WID_TN_WATER,
|
||||
WID_TN_AIR,
|
||||
WID_TN_LANDSCAPE,
|
||||
WID_TN_TRAINS,
|
||||
WID_TN_ROADVEHS,
|
||||
WID_TN_SHIPS,
|
||||
WID_TN_AIRCRAFTS,
|
||||
|
||||
WID_TN_SWITCH_BAR,
|
||||
WID_TN_SUBSIDIES,
|
||||
WID_TN_STATIONS,
|
||||
WID_TN_FINANCES,
|
||||
WID_TN_COMPANIES,
|
||||
WID_TN_GRAPHS,
|
||||
WID_TN_INDUSTRIES,
|
||||
WID_TN_MUSIC_SOUND,
|
||||
WID_TN_MESSAGES,
|
||||
WID_TN_HELP,
|
||||
};
|
||||
|
||||
// Some rather artistic button arrangement, I'm proud of myself
|
||||
static const byte arrange_left_classic[] = {
|
||||
WID_TN_DELETE,
|
||||
@@ -1921,44 +1959,6 @@ class NWidgetVerticalToolbarContainer : public NWidgetToolbarContainer {
|
||||
WID_TN_HELP,
|
||||
};
|
||||
|
||||
// Ultra-compact arrangement, ultra-huge buttons.
|
||||
// No WID_TN_SHIFT, WID_TN_STORY, WID_TN_GOAL, and WID_TN_LEAGUE buttons.
|
||||
static const byte arrange_left_compact[] = {
|
||||
WID_TN_DELETE,
|
||||
WID_TN_CTRL,
|
||||
WID_TN_ZOOM_IN,
|
||||
WID_TN_ZOOM_OUT,
|
||||
WID_TN_PAUSE,
|
||||
WID_TN_FAST_FORWARD,
|
||||
WID_TN_SETTINGS,
|
||||
WID_TN_SAVE,
|
||||
WID_TN_SMALL_MAP,
|
||||
WID_TN_TOWNS,
|
||||
};
|
||||
static const byte arrange_right_compact[] = {
|
||||
WID_TN_SWITCH_BAR,
|
||||
WID_TN_RAILS,
|
||||
WID_TN_ROADS,
|
||||
WID_TN_WATER,
|
||||
WID_TN_AIR,
|
||||
WID_TN_LANDSCAPE,
|
||||
WID_TN_TRAINS,
|
||||
WID_TN_ROADVEHS,
|
||||
WID_TN_SHIPS,
|
||||
WID_TN_AIRCRAFTS,
|
||||
|
||||
WID_TN_SWITCH_BAR,
|
||||
WID_TN_SUBSIDIES,
|
||||
WID_TN_STATIONS,
|
||||
WID_TN_FINANCES,
|
||||
WID_TN_COMPANIES,
|
||||
WID_TN_GRAPHS,
|
||||
WID_TN_INDUSTRIES,
|
||||
WID_TN_MUSIC_SOUND,
|
||||
WID_TN_MESSAGES,
|
||||
WID_TN_HELP,
|
||||
};
|
||||
|
||||
// Full-length toolbar without switch button.
|
||||
// No WID_TN_SHIFT, WID_TN_STORY, WID_TN_GOAL, and WID_TN_LEAGUE buttons.
|
||||
static const byte arrange_left_almost_all[] = {
|
||||
@@ -2037,18 +2037,27 @@ class NWidgetVerticalToolbarContainer : public NWidgetToolbarContainer {
|
||||
if (_screen.height / this->smallest_y >= lengthof(arrange_left_all))
|
||||
{
|
||||
button_count = arrangable_count = lengthof(arrange_left_all);
|
||||
if (side == 0) {
|
||||
return arrange_left_all;
|
||||
}
|
||||
if (side == 0) return arrange_left_all;
|
||||
return arrange_right_all;
|
||||
}
|
||||
|
||||
if (side == 0) {
|
||||
button_count = arrangable_count = lengthof(arrange_left_classic);
|
||||
return arrange_left_classic;
|
||||
if (_screen.height / this->smallest_y >= lengthof(arrange_left_almost_all))
|
||||
{
|
||||
button_count = arrangable_count = lengthof(arrange_left_almost_all);
|
||||
if (side == 0) return arrange_left_almost_all;
|
||||
return arrange_right_almost_all;
|
||||
}
|
||||
button_count = arrangable_count = lengthof(arrange_right_classic) / 2;
|
||||
return &arrange_right_classic[((_toolbar_mode == TB_LOWER) ? button_count : 0)];
|
||||
|
||||
if (_screen.height / this->smallest_y >= lengthof(arrange_left_classic))
|
||||
{
|
||||
button_count = arrangable_count = lengthof(arrange_left_classic);
|
||||
if (side == 0) return arrange_left_classic;
|
||||
return &arrange_right_classic[((_toolbar_mode == TB_LOWER) ? button_count : 0)];
|
||||
}
|
||||
|
||||
button_count = arrangable_count = lengthof(arrange_left_compact);
|
||||
if (side == 0) return arrange_left_compact;
|
||||
return &arrange_right_compact[((_toolbar_mode == TB_LOWER) ? button_count : 0)];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user