Index: bauer/warenbauer.cc =================================================================== --- bauer/warenbauer.cc (revision 7987) +++ bauer/warenbauer.cc (working copy) @@ -9,7 +9,7 @@ #include "../besch/ware_besch.h" #include "../besch/spezial_obj_tpl.h" #include "../simware.h" -#include "../simcolor.h" +#include "../gui/gui_theme.h" #include "warenbauer.h" #include "../dataobj/translator.h" Index: besch/reader/obj_reader.cc =================================================================== --- besch/reader/obj_reader.cc (revision 7987) +++ besch/reader/obj_reader.cc (working copy) @@ -2,7 +2,7 @@ #include // for the progress bar -#include "../../simcolor.h" +#include "../../gui/gui_theme.h" #include "../../display/simimg.h" #include "../../simsys.h" #include "../../simtypes.h" Index: boden/wege/schiene.h =================================================================== --- boden/wege/schiene.h (revision 7987) +++ boden/wege/schiene.h (working copy) @@ -11,6 +11,7 @@ #include "weg.h" #include "../../convoihandle_t.h" +#include "../../gui/gui_theme.h" class vehicle_t; Index: gui/components/gui_image_list.cc =================================================================== --- gui/components/gui_image_list.cc (revision 7987) +++ gui/components/gui_image_list.cc (working copy) @@ -8,7 +8,7 @@ #include "gui_image_list.h" #include "../../display/simgraph.h" #include "../../simevent.h" -#include "../../simcolor.h" +#include "../gui_theme.h" gui_image_list_t::gui_image_list_t(vector_tpl *images) : Index: gui/components/gui_map_preview.h =================================================================== --- gui/components/gui_map_preview.h (revision 7987) +++ gui/components/gui_map_preview.h (working copy) @@ -11,7 +11,7 @@ #define gui_gui_map_preview_h #include "gui_komponente.h" -#include "../../simcolor.h" +#include "../gui_theme.h" #include "../../display/simgraph.h" #include "../../tpl/array2d_tpl.h" Index: gui/components/gui_speedbar.cc =================================================================== --- gui/components/gui_speedbar.cc (revision 7987) +++ gui/components/gui_speedbar.cc (working copy) @@ -9,7 +9,7 @@ #include "gui_speedbar.h" #include "../../display/simgraph.h" -#include "../../simcolor.h" +#include "../gui_theme.h" #include "../../simtypes.h" Index: gui/components/gui_world_view_t.cc =================================================================== --- gui/components/gui_world_view_t.cc (revision 7987) +++ gui/components/gui_world_view_t.cc (working copy) @@ -13,7 +13,7 @@ #include "../../display/viewport.h" #include "../../simobj.h" #include "../../display/simgraph.h" -#include "../../simcolor.h" +#include "../gui_theme.h" #include "../../vehicle/simvehicle.h" #include "../../boden/grund.h" Index: gui/gui_theme.cc =================================================================== --- gui/gui_theme.cc (revision 7987) +++ gui/gui_theme.cc (working copy) @@ -20,6 +20,70 @@ #include "../besch/reader/obj_reader.h" /** + * Fixed Colours + */ +COLOR_VAL gui_theme_t::mn_grey0 = 229; +COLOR_VAL gui_theme_t::mn_grey1 = 230; +COLOR_VAL gui_theme_t::mn_grey2 = 231; +COLOR_VAL gui_theme_t::mn_grey3 = 232; +COLOR_VAL gui_theme_t::mn_grey4 = 233; + +COLOR_VAL gui_theme_t::col_black = 240; +COLOR_VAL gui_theme_t::col_white = 215; +COLOR_VAL gui_theme_t::col_red = 131; +COLOR_VAL gui_theme_t::col_dark_red = 128; +COLOR_VAL gui_theme_t::col_light_red = 134; +COLOR_VAL gui_theme_t::col_yellow = 171; +COLOR_VAL gui_theme_t::col_dark_yellow = 168; +COLOR_VAL gui_theme_t::col_light_yellow = 175; +COLOR_VAL gui_theme_t::col_lemon_yellow = 31; +COLOR_VAL gui_theme_t::col_blue = 147; +COLOR_VAL gui_theme_t::col_dark_blue = 144; +COLOR_VAL gui_theme_t::col_light_blue = 103; +COLOR_VAL gui_theme_t::col_green = 140; +COLOR_VAL gui_theme_t::col_dark_green = 136; +COLOR_VAL gui_theme_t::col_light_green = 143; +COLOR_VAL gui_theme_t::col_orange = 155; +COLOR_VAL gui_theme_t::col_dark_orange = 153; +COLOR_VAL gui_theme_t::col_light_orange = 158; +COLOR_VAL gui_theme_t::col_bright_orange = 133; +COLOR_VAL gui_theme_t::col_lilac = 221; +COLOR_VAL gui_theme_t::col_magenta = 63; +COLOR_VAL gui_theme_t::col_purple = 76; +COLOR_VAL gui_theme_t::col_dark_purple = 73; +COLOR_VAL gui_theme_t::col_light_purple = 79; +COLOR_VAL gui_theme_t::col_turquoise = 53; +COLOR_VAL gui_theme_t::col_light_turquoise = 55; +COLOR_VAL gui_theme_t::col_dark_turquoise = 50; +COLOR_VAL gui_theme_t::col_light_brown = 191; +COLOR_VAL gui_theme_t::col_brown = 189; +COLOR_VAL gui_theme_t::col_dark_brown = 178; + +COLOR_VAL gui_theme_t::city_ki = 209; + +COLOR_VAL gui_theme_t::col_grey1 = 208; +COLOR_VAL gui_theme_t::col_grey2 = 210; +COLOR_VAL gui_theme_t::col_grey3 = 212; +COLOR_VAL gui_theme_t::col_grey4 = 11; +COLOR_VAL gui_theme_t::col_grey5 = 213; +COLOR_VAL gui_theme_t::col_grey6 = 15; + +COLOR_VAL gui_theme_t::win_titel = 154; + +COLOR_VAL gui_theme_t::col_revenue = 142; +COLOR_VAL gui_theme_t::col_operation = 132; +COLOR_VAL gui_theme_t::col_toll = 157; +COLOR_VAL gui_theme_t::col_powerlines = 46; +COLOR_VAL gui_theme_t::col_ops_profit = 87; +COLOR_VAL gui_theme_t::col_construction = 110; +COLOR_VAL gui_theme_t::col_profit = 6; + +COLOR_VAL gui_theme_t::col_cash = 52; +COLOR_VAL gui_theme_t::col_wealth = 95; + +COLOR_VAL gui_theme_t::col_growth = 122; + +/** * Colours */ COLOR_VAL gui_theme_t::gui_color_text; Index: gui/gui_theme.h =================================================================== --- gui/gui_theme.h (revision 7987) +++ gui/gui_theme.h (working copy) @@ -118,7 +118,7 @@ #define BUTTON_Y(row) ( (row) * (D_BUTTON_HEIGHT + D_V_SPACE) ) // The width of a typical dialogue (either list/covoi/factory) and initial width when it makes sense -#define D_DEFAULT_WIDTH (D_MARGIN_LEFT + 4*D_BUTTON_WIDTH + 3*D_H_SPACE + D_MARGIN_RIGHT) +#define D_DEFAULT_WIDTH (D_MARGINS_X + 4*D_BUTTON_WIDTH + 3*D_H_SPACE) #define D_DEFAULT_HEIGHT (max(56, get_base_tile_raster_width() * 7 / 8) + 208 + D_SCROLLBAR_HEIGHT) // Max Kielland: align helper, returns the offset to apply to N1 for a center alignment around N2 @@ -200,6 +200,70 @@ class gui_theme_t { public: + /// @name fixed system colours used by gui components + /// @{ + static COLOR_VAL mn_grey0; + static COLOR_VAL mn_grey1; + static COLOR_VAL mn_grey2; + static COLOR_VAL mn_grey3; + static COLOR_VAL mn_grey4; + + static COLOR_VAL col_black; + static COLOR_VAL col_white; + static COLOR_VAL col_red; + static COLOR_VAL col_dark_red; + static COLOR_VAL col_light_red; + static COLOR_VAL col_yellow; + static COLOR_VAL col_dark_yellow; + static COLOR_VAL col_light_yellow; + static COLOR_VAL col_lemon_yellow; + static COLOR_VAL col_blue; + static COLOR_VAL col_dark_blue; + static COLOR_VAL col_light_blue; + static COLOR_VAL col_green; + static COLOR_VAL col_dark_green; + static COLOR_VAL col_light_green; + static COLOR_VAL col_orange; + static COLOR_VAL col_dark_orange; + static COLOR_VAL col_light_orange; + static COLOR_VAL col_bright_orange; + static COLOR_VAL col_lilac; + static COLOR_VAL col_magenta; + static COLOR_VAL col_purple; + static COLOR_VAL col_dark_purple; + static COLOR_VAL col_light_purple; + static COLOR_VAL col_turquoise; + static COLOR_VAL col_light_turquoise; + static COLOR_VAL col_dark_turquoise; + static COLOR_VAL col_light_brown; + static COLOR_VAL col_brown; + static COLOR_VAL col_dark_brown; + + static COLOR_VAL city_ki; + + static COLOR_VAL col_grey1; + static COLOR_VAL col_grey2; + static COLOR_VAL col_grey3; + static COLOR_VAL col_grey4; + static COLOR_VAL col_grey5; + static COLOR_VAL col_grey6; + + static COLOR_VAL win_titel; + + static COLOR_VAL col_revenue; + static COLOR_VAL col_operation; + static COLOR_VAL col_toll; + static COLOR_VAL col_powerlines; + static COLOR_VAL col_ops_profit; + static COLOR_VAL col_construction; + static COLOR_VAL col_profit; + + static COLOR_VAL col_cash; + static COLOR_VAL col_wealth; + + static COLOR_VAL col_growth; + /// @} + /// @name system colours used by gui components /// @{ static COLOR_VAL gui_color_text; //@< Color to draw standard text Index: obj/baum.h =================================================================== --- obj/baum.h (revision 7987) +++ obj/baum.h (working copy) @@ -13,7 +13,7 @@ #include "../tpl/vector_tpl.h" #include "../tpl/weighted_vector_tpl.h" #include "../besch/baum_besch.h" -#include "../simcolor.h" +#include "../gui/gui_theme.h" #include "../dataobj/environment.h" /** Index: simcolor.h =================================================================== --- simcolor.h (revision 7987) +++ simcolor.h (working copy) @@ -19,85 +19,85 @@ typedef unsigned char COLOR_VAL; // Menu colours (they don't change between day and night) -#define MN_GREY0 (229) -#define MN_GREY1 (230) -#define MN_GREY2 (231) -#define MN_GREY3 (232) -#define MN_GREY4 (233) +#define MN_GREY0 gui_theme_t::mn_grey0 +#define MN_GREY1 gui_theme_t::mn_grey1 +#define MN_GREY2 gui_theme_t::mn_grey2 +#define MN_GREY3 gui_theme_t::mn_grey3 +#define MN_GREY4 gui_theme_t::mn_grey4 // fixed colors -#define COL_BLACK (240) -#define COL_WHITE (215) -#define COL_RED (131) -#define COL_DARK_RED (128) -#define COL_LIGHT_RED (134) -#define COL_YELLOW (171) -#define COL_DARK_YELLOW (168) -#define COL_LIGHT_YELLOW (175) -#define COL_LEMON_YELLOW (31) -#define COL_BLUE (147) -#define COL_DARK_BLUE (144) -#define COL_LIGHT_BLUE (103) -#define COL_GREEN (140) -#define COL_DARK_GREEN (136) -#define COL_LIGHT_GREEN (143) -#define COL_ORANGE (155) -#define COL_DARK_ORANGE (153) -#define COL_LIGHT_ORANGE (158) -#define COL_BRIGHT_ORANGE (133) -#define COL_LILAC (221) -#define COL_MAGENTA (63) -#define COL_PURPLE (76) -#define COL_DARK_PURPLE (73) -#define COL_LIGHT_PURPLE (79) -#define COL_TURQUOISE (53) -#define COL_LIGHT_TURQUOISE (55) -#define COL_DARK_TURQUOISE (50) -#define COL_LIGHT_BROWN (191) -#define COL_BROWN (189) -#define COL_DARK_BROWN (178) +#define COL_BLACK gui_theme_t::col_black +#define COL_WHITE gui_theme_t::col_white +#define COL_RED gui_theme_t::col_red +#define COL_DARK_RED gui_theme_t::col_dark_red +#define COL_LIGHT_RED gui_theme_t::col_light_red +#define COL_YELLOW gui_theme_t::col_yellow +#define COL_DARK_YELLOW gui_theme_t::col_dark_yellow +#define COL_LIGHT_YELLOW gui_theme_t::col_light_yellow +#define COL_LEMON_YELLOW gui_theme_t::col_lemon_yellow +#define COL_BLUE gui_theme_t::col_blue +#define COL_DARK_BLUE gui_theme_t::col_dark_blue +#define COL_LIGHT_BLUE gui_theme_t::col_light_blue +#define COL_GREEN gui_theme_t::col_green +#define COL_DARK_GREEN gui_theme_t::col_dark_green +#define COL_LIGHT_GREEN gui_theme_t::col_light_green +#define COL_ORANGE gui_theme_t::col_orange +#define COL_DARK_ORANGE gui_theme_t::col_dark_orange +#define COL_LIGHT_ORANGE gui_theme_t::col_light_orange +#define COL_BRIGHT_ORANGE gui_theme_t::col_bright_orange +#define COL_LILAC gui_theme_t::col_lilac +#define COL_MAGENTA gui_theme_t::col_magenta +#define COL_PURPLE gui_theme_t::col_purple +#define COL_DARK_PURPLE gui_theme_t::col_dark_purple +#define COL_LIGHT_PURPLE gui_theme_t::col_light_purple +#define COL_TURQUOISE gui_theme_t::col_turquoise +#define COL_LIGHT_TURQUOISE gui_theme_t::col_light_turquoise +#define COL_DARK_TURQUOISE gui_theme_t::col_dark_turquoise +#define COL_LIGHT_BROWN gui_theme_t::col_light_brown +#define COL_BROWN gui_theme_t::col_brown +#define COL_DARK_BROWN gui_theme_t::col_dark_brown // message colors -#define CITY_KI (209) -#define NEW_VEHICLE COL_PURPLE +#define CITY_KI gui_theme_t::city_ki +#define NEW_VEHICLE COL_PURPLE // by niels -#define COL_GREY1 (208) -#define COL_GREY2 (210) -#define COL_GREY3 (212) -#define COL_GREY4 (11) -#define COL_GREY5 (213) -#define COL_GREY6 (15) +#define COL_GREY1 gui_theme_t::col_grey1 +#define COL_GREY2 gui_theme_t::col_grey2 +#define COL_GREY3 gui_theme_t::col_grey3 +#define COL_GREY4 gui_theme_t::col_grey4 +#define COL_GREY5 gui_theme_t::col_grey5 +#define COL_GREY6 gui_theme_t::col_grey6 -#define VEHIKEL_KENN COL_YELLOW +#define VEHIKEL_KENN COL_YELLOW -#define WIN_TITLE (154) +#define WIN_TITLE gui_theme_t::win_titel // used in many dialogues graphs -#define COL_REVENUE (142) -#define COL_OPERATION (132) +#define COL_REVENUE gui_theme_t::col_revenue +#define COL_OPERATION gui_theme_t::col_operation #define COL_MAINTENANCE COL_LIGHT_RED -#define COL_TOLL (157) -#define COL_POWERLINES (46) -#define COL_OPS_PROFIT (87) +#define COL_TOLL gui_theme_t::col_toll +#define COL_POWERLINES gui_theme_t::col_powerlines +#define COL_OPS_PROFIT gui_theme_t::col_ops_profit #define COL_NEW_VEHICLES COL_LIGHT_PURPLE -#define COL_CONSTRUCTION (110) -#define COL_PROFIT (6) +#define COL_CONSTRUCTION gui_theme_t::col_construction +#define COL_PROFIT gui_theme_t::col_profit #define COL_TRANSPORTED COL_YELLOW #define COL_MAXSPEED COL_TURQUOISE -#define COL_CASH (52) +#define COL_CASH gui_theme_t::col_cash #define COL_VEHICLE_ASSETS COL_MAGENTA #define COL_MARGIN COL_LIGHT_YELLOW -#define COL_WEALTH (95) +#define COL_WEALTH gui_theme_t::col_wealth -#define COL_COUNVOI_COUNT (55) +#define COL_COUNVOI_COUNT COL_LIGHT_TURQUOISE #define COL_FREE_CAPACITY COL_TOLL #define COL_DISTANCE COL_OPS_PROFIT #define COL_CITICENS COL_WHITE -#define COL_GROWTH (122) +#define COL_GROWTH gui_theme_t::col_growth #define COL_HAPPY COL_WHITE #define COL_UNHAPPY COL_RED #define COL_NO_ROUTE COL_BLUE Index: simplan.cc =================================================================== --- simplan.cc (revision 7987) +++ simplan.cc (working copy) @@ -9,6 +9,7 @@ #include "simobj.h" #include "simfab.h" #include "display/simgraph.h" +#include "gui/gui_theme.h" #include "simmenu.h" #include "simplan.h" #include "simworld.h" Index: simticker.h =================================================================== --- simticker.h (revision 7987) +++ simticker.h (working copy) @@ -8,7 +8,7 @@ #ifndef SIMTICKER_H #define SIMTICKER_H -#include "simcolor.h" +#include "gui/gui_theme.h" // ticker height #define TICKER_HEIGHT (LINESPACE+3) Index: vehicle/simvehicle.h =================================================================== --- vehicle/simvehicle.h (revision 7987) +++ vehicle/simvehicle.h (working copy) @@ -21,6 +21,7 @@ #include "../besch/vehikel_besch.h" #include "../vehicle/overtaker.h" #include "../tpl/slist_tpl.h" +#include "../gui/gui_theme.h" class convoi_t; class schedule_t;