Merge branch 'veh_gui_owner_colour' into jgrpp
This commit is contained in:
@@ -1377,6 +1377,8 @@ STR_CONFIG_SETTING_OSK_ACTIVATION_DOUBLE_CLICK :Double click
|
|||||||
STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK_FOCUS :Single click (when focussed)
|
STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK_FOCUS :Single click (when focussed)
|
||||||
STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK :Single click (immediately)
|
STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK :Single click (immediately)
|
||||||
STR_CONFIG_SETTING_SHOW_VEHICLE_ROUTE_STEPS :Show the vehicle's route steps: {STRING2}
|
STR_CONFIG_SETTING_SHOW_VEHICLE_ROUTE_STEPS :Show the vehicle's route steps: {STRING2}
|
||||||
|
STR_CONFIG_SETTING_SHOW_VEHICLE_LIST_COMPANY_COLOUR :Mark other companies' vehicles in lists with their company colour: {STRING2}
|
||||||
|
STR_CONFIG_SETTING_SHOW_VEHICLE_LIST_COMPANY_COLOUR_HELPTEXT :Vehicles in a vehicle list window which are owned by a different company than the owner of the vehicle list are marked with a coloured square in the vehicle's company colour.
|
||||||
|
|
||||||
STR_CONFIG_SETTING_VIEWPORT_MAP_SCAN_SURROUNDINGS :Scan surroundings (better for high zoom out levels): {STRING2}
|
STR_CONFIG_SETTING_VIEWPORT_MAP_SCAN_SURROUNDINGS :Scan surroundings (better for high zoom out levels): {STRING2}
|
||||||
STR_CONFIG_SETTING_VIEWPORT_MAP_SHOW_SLOPES :Show slopes: {STRING2}
|
STR_CONFIG_SETTING_VIEWPORT_MAP_SHOW_SLOPES :Show slopes: {STRING2}
|
||||||
|
@@ -1590,6 +1590,7 @@ static SettingsContainer &GetSettingsTree()
|
|||||||
interface->Add(new SettingEntry("gui.expenses_layout"));
|
interface->Add(new SettingEntry("gui.expenses_layout"));
|
||||||
interface->Add(new SettingEntry("gui.show_train_length_in_details"));
|
interface->Add(new SettingEntry("gui.show_train_length_in_details"));
|
||||||
interface->Add(new SettingEntry("gui.show_vehicle_group_in_details"));
|
interface->Add(new SettingEntry("gui.show_vehicle_group_in_details"));
|
||||||
|
interface->Add(new SettingEntry("gui.show_vehicle_list_company_colour"));
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsPage *advisors = main->Add(new SettingsPage(STR_CONFIG_SETTING_ADVISORS));
|
SettingsPage *advisors = main->Add(new SettingsPage(STR_CONFIG_SETTING_ADVISORS));
|
||||||
|
@@ -170,6 +170,7 @@ struct GUISettings {
|
|||||||
bool show_vehicle_group_in_details; ///< show vehicle group in vehicle details window top widget
|
bool show_vehicle_group_in_details; ///< show vehicle group in vehicle details window top widget
|
||||||
uint8 osk_activation; ///< Mouse gesture to trigger the OSK.
|
uint8 osk_activation; ///< Mouse gesture to trigger the OSK.
|
||||||
bool show_vehicle_route_steps; ///< when a window related to a specific vehicle is focused, show route steps
|
bool show_vehicle_route_steps; ///< when a window related to a specific vehicle is focused, show route steps
|
||||||
|
bool show_vehicle_list_company_colour; ///< show the company colour of vehicles which have an owner different to the owner of the vehicle list
|
||||||
|
|
||||||
uint16 console_backlog_timeout; ///< the minimum amount of time items should be in the console backlog before they will be removed in ~3 seconds granularity.
|
uint16 console_backlog_timeout; ///< the minimum amount of time items should be in the console backlog before they will be removed in ~3 seconds granularity.
|
||||||
uint16 console_backlog_length; ///< the minimum amount of items in the console backlog before items will be removed.
|
uint16 console_backlog_length; ///< the minimum amount of items in the console backlog before items will be removed.
|
||||||
|
@@ -3879,6 +3879,15 @@ strhelp = STR_CONFIG_SETTING_SHOW_VEHICLE_GROUP_IN_DETAILS_HELPTEXT
|
|||||||
proc = RedrawScreen
|
proc = RedrawScreen
|
||||||
cat = SC_BASIC
|
cat = SC_BASIC
|
||||||
|
|
||||||
|
[SDTC_BOOL]
|
||||||
|
var = gui.show_vehicle_list_company_colour
|
||||||
|
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||||
|
def = true
|
||||||
|
str = STR_CONFIG_SETTING_SHOW_VEHICLE_LIST_COMPANY_COLOUR
|
||||||
|
strhelp = STR_CONFIG_SETTING_SHOW_VEHICLE_LIST_COMPANY_COLOUR_HELPTEXT
|
||||||
|
proc = RedrawScreen
|
||||||
|
cat = SC_BASIC
|
||||||
|
|
||||||
; For the dedicated build we'll enable dates in logs by default.
|
; For the dedicated build we'll enable dates in logs by default.
|
||||||
[SDTC_BOOL]
|
[SDTC_BOOL]
|
||||||
ifdef = DEDICATED
|
ifdef = DEDICATED
|
||||||
|
@@ -1452,6 +1452,16 @@ void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int
|
|||||||
DrawVehicleImage(v, image_left, image_right, y + FONT_HEIGHT_SMALL - 1, selected_vehicle, EIT_IN_LIST, 0);
|
DrawVehicleImage(v, image_left, image_right, y + FONT_HEIGHT_SMALL - 1, selected_vehicle, EIT_IN_LIST, 0);
|
||||||
DrawString(text_left, text_right, y + line_height - FONT_HEIGHT_SMALL - WD_FRAMERECT_BOTTOM - 1, STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR);
|
DrawString(text_left, text_right, y + line_height - FONT_HEIGHT_SMALL - WD_FRAMERECT_BOTTOM - 1, STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR);
|
||||||
|
|
||||||
|
/* company colour stripe along vehicle description row */
|
||||||
|
if (_settings_client.gui.show_vehicle_list_company_colour && v->owner != this->vli.company) {
|
||||||
|
byte ccolour = 0;
|
||||||
|
Company *c = Company::Get(v->owner);
|
||||||
|
if (c != NULL) {
|
||||||
|
ccolour = _colour_gradient[c->colour][6];
|
||||||
|
}
|
||||||
|
GfxFillRect((text_right - 1) - (FONT_HEIGHT_SMALL - 2), y + 1, text_right - 1, (y + 1) + (FONT_HEIGHT_SMALL - 2), ccolour, FILLRECT_OPAQUE);
|
||||||
|
}
|
||||||
|
|
||||||
if (v->name != NULL) {
|
if (v->name != NULL) {
|
||||||
/* The vehicle got a name so we will print it */
|
/* The vehicle got a name so we will print it */
|
||||||
SetDParam(0, v->index);
|
SetDParam(0, v->index);
|
||||||
|
Reference in New Issue
Block a user