diff --git a/src/citymania/cm_station_gui.cpp b/src/citymania/cm_station_gui.cpp index be7509de81..773b6cf66e 100644 --- a/src/citymania/cm_station_gui.cpp +++ b/src/citymania/cm_station_gui.cpp @@ -197,8 +197,6 @@ bool CheckStationJoin(TileIndex start_tile, TileIndex end_tile) { return false; } -// using JoinAndBuildCmdProc = std::function; - template void JoinAndBuild(Tcommand command, Tcallback *callback) { auto join_to = _highlight_station_to_join; diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp index 61454a5fc4..0e9b938024 100644 --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -334,8 +334,7 @@ void NetworkExecuteLocalCommandQueue() if (_frame_counter > cp->frame) { /* If we reach here, it means for whatever reason, we've already executed * past the command we need to execute. */ - error("[net] Trying to execute a packet in the past! (frame=%u cmd_frame=%u)", (uint)_frame_counter, (uint)cp->frame); - // FIXME error("[net] Trying to execute a packet in the past! (frame=%u cmd_frame=%u tile=%u p1=%u p2=%u cmd=%u)", (uint)_frame_counter, (uint)cp->frame, (uint)cp->tile, (uint)cp->p1, (uint)cp->p2, (uint)cp->cmd); + error("[net] Trying to execute a packet in the past! (frame=%u cmd_frame=%u cmd=%u tile=%u)", (uint)_frame_counter, (uint)cp->frame, (uint)cp->cmd, (uint)cp->tile); } /* We can execute this command */ diff --git a/src/settings_table.cpp b/src/settings_table.cpp index 95fa3526af..322cb20a0e 100644 --- a/src/settings_table.cpp +++ b/src/settings_table.cpp @@ -490,4 +490,17 @@ static void cm_v_RedrawStatusBar(int32 p1) { // TODO is this function even needed? CM_RedrawStatusBar(); } + +static void cm_v_RedrawGraphs(int32 p1) { + InvalidateWindowData(WC_INCOME_GRAPH, 0); + InvalidateWindowData(WC_OPERATING_PROFIT, 0); + InvalidateWindowData(WC_DELIVERED_CARGO, 0); + InvalidateWindowData(WC_PERFORMANCE_HISTORY, 0); + InvalidateWindowData(WC_COMPANY_VALUE, 0); + InvalidateWindowData(WC_PAYMENT_RATES, 0); + InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0); +} + + + /* End - Callback Functions */ diff --git a/src/table/settings/cmclient_settings.ini b/src/table/settings/cmclient_settings.ini index 5e9501ec48..94c74f9411 100644 --- a/src/table/settings/cmclient_settings.ini +++ b/src/table/settings/cmclient_settings.ini @@ -1,9 +1,11 @@ [pre-amble] -static void cm_v_RedrawStatusBar(int32 p1); +static void cm_v_RedrawStatusBar(int32 new_value); +static void cm_v_RedrawGraphs(int32 new_value); static std::initializer_list _order_mod_actions{"nothing", "full_load", "transfer", "unload_all", "feeder_load", "feeder_unload", "no_load"}; static std::initializer_list _mod_keys{"none", "shift", "ctrl", "alt"}; static std::initializer_list _shaded_tree_options{"always_off", "always_on", "as_server"}; +static std::initializer_list _graph_background_options{"black", "grey"}; static const SettingVariant _cmclient_settings_table[] = { [post-amble] @@ -211,7 +213,7 @@ cat = SC_ADVANCED [SDTC_OMANY] var = gui.cm_shaded_trees type = SLE_UINT8 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN +flags = SF_GUI_DROPDOWN full = _shaded_tree_options def = 2 min = 0 @@ -230,10 +232,11 @@ strhelp = STR_CM_CONFIG_SETTING_SHOW_APM_HELPTEXT cat = SC_ADVANCED post_cb = cm_v_RedrawStatusBar -[SDTC_VAR] +[SDTC_OMANY] var = gui.cm_graph_background type = SLE_UINT8 -guiflags = SGF_MULTISTRING +flags = SF_GUI_DROPDOWN +full = _graph_background_options def = 0 min = 0 max = 1 @@ -241,6 +244,7 @@ str = STR_CM_CONFIG_SETTING_GRAPH_BACKGROUND strhelp = STR_CM_CONFIG_SETTING_GRAPH_BACKGROUND_HELPTEXT strval = STR_CM_CONFIG_SETTING_GRAPH_BACKGROUND_BLACK cat = SC_ADVANCED +post_cb = cm_v_RedrawGraphs [SDTC_BOOL] var = gui.cm_open_vehicle_for_shared_clone