1 #ifndef __SIMSKIN_H
2 #define __SIMSKIN_H
3 
4 #include "simcolor.h"
5 
6 // Max Kielland
7 // Classic helper macro to transform a #define value into a "string"
8 #define STR_HELPER(x) #x
9 #define STR(x) STR_HELPER(x)
10 
11 // For test purposes themes can be disabled or an alternative theme.tab file can be used.
12 //  -1 = No theme, use internal fallback
13 //   0 = Normal use, read theme.tab
14 // n>0 = Use alternative file named theme_n.tab
15 
16 template<class T> class slist_tpl;
17 class skin_desc_t;
18 
19 
20 class skinverwaltung_t {
21 public:
22 	enum skintyp_t { nothing, menu, cursor, symbol, misc };
23 
24 	/// @name icons used in the toolbars
25 	/// @{
26 
27 	/// icon images for advanced tools (everything that involves clicking on the map)
28 	static const skin_desc_t *tool_icons_general;
29 	/// icon images for simple tools (eg pause, fast forward)
30 	static const skin_desc_t *tool_icons_simple;
31 	/// icon images for GUI tools (which open windows)
32 	static const skin_desc_t *tool_icons_dialoge;
33 	/// icon images for toolbars
34 	static const skin_desc_t *tool_icons_toolbars;
35 	/// icon to skin toolbar background
36 	static const skin_desc_t *toolbar_background;
37 	/// @}
38 
39 	/**
40 	 * Different GUI elements
41 	 * @author prissi
42 	 */
43 	static const skin_desc_t* button;
44 	static const skin_desc_t* round_button;
45 	static const skin_desc_t* check_button;
46 	static const skin_desc_t* posbutton;
47 	static const skin_desc_t* back;
48 	static const skin_desc_t* scrollbar;
49 	static const skin_desc_t* divider;
50 	static const skin_desc_t* editfield;
51 	static const skin_desc_t* listbox;
52 	static const skin_desc_t* gadget;
53 
54 	/// @name pictures used in the GUI
55 	/// @{
56 
57 	/// image shown in welcome screen @see banner.cc
58 	static const skin_desc_t *logosymbol;
59 	/// image shown when loading pakset
60 	static const skin_desc_t *biglogosymbol;
61 	/// image shown with 'happy new year' message
62 	static const skin_desc_t *neujahrsymbol;
63 	/// image shown when creating new world
64 	static const skin_desc_t *neueweltsymbol;
65 	/// image shown in language selection
66 	static const skin_desc_t *flaggensymbol;
67 	/// image shown in message boxes @see gui/messagebox.h
68 	static const skin_desc_t *meldungsymbol;
69 	/// image shown in message options window
70 	static const skin_desc_t *message_options;
71 	/// image shown in color selection window
72 	static const skin_desc_t *color_options;
73 	// isometric compass for main map (evt. minimap)
74 	static const skin_desc_t *compass_iso;
75 	// normal staight compass for minimap
76 	static const skin_desc_t *compass_map;
77 	/// @}
78 
79 	/// @name icons used for the tabs in the line management window
80 	/// @{
81 	static const skin_desc_t *zughaltsymbol;
82 	static const skin_desc_t *autohaltsymbol;
83 	static const skin_desc_t *schiffshaltsymbol;
84 	static const skin_desc_t *airhaltsymbol;
85 	static const skin_desc_t *monorailhaltsymbol;
86 	static const skin_desc_t *maglevhaltsymbol;
87 	static const skin_desc_t *narrowgaugehaltsymbol;
88 	static const skin_desc_t *bushaltsymbol;
89 	static const skin_desc_t *tramhaltsymbol;
90 	///@}
91 
92 	/// @name icons shown in status bar at the bottom of the screen
93 	/// @{
94 	static const skin_desc_t *networksymbol;
95 	static const skin_desc_t *timelinesymbol;
96 	static const skin_desc_t *fastforwardsymbol;
97 	static const skin_desc_t *pausesymbol;
98 	static const skin_desc_t *seasons_icons;
99 	/// @}
100 
101 	/// @name icons used to show which halt serves passengers / mail / freight
102 	/// @{
103 	static const skin_desc_t *passengers;
104 	static const skin_desc_t *mail;
105 	static const skin_desc_t *goods;
106 	/// @}
107 
108 	/// images shown in display of lines in mini-map
109 	static const skin_desc_t *station_type;
110 
111 	/// image to indicate power supply of factories
112 	static const skin_desc_t *electricity;
113 	/// image to indicate that an attraction is inside a town (attraction list window)
114 	static const skin_desc_t *intown;
115 
116 
117 	/// @name cursors
118 	/// @{
119 
120 	/// cursors for tools
121 	static const skin_desc_t *cursor_general;
122 	/// for allegro: emulate mouse cursor
123 	static const skin_desc_t *mouse_cursor;
124 	/// symbol to mark tiles by AI players and text labels
125 	static const skin_desc_t *belegtzeiger;
126 	/// icon to mark start tiles for construction (ie the bulldozer image)
127 	static const skin_desc_t *bauigelsymbol;
128 	/// @}
129 
130 	/// shown in hidden-buildings mode instead of buildings images
131 	static const skin_desc_t *construction_site;
132 	/// texture to be shown beneath city roads to indicate pavements
133 	static const skin_desc_t *fussweg;
134 	/// transformer image: supply
135 	static const skin_desc_t *pumpe;
136 	/// transformer image: consumer
137 	static const skin_desc_t *senke;
138 	/// texture to be shown beneath ways in tunnel
139 	static const skin_desc_t *tunnel_texture;
140 
141 	static bool register_desc(skintyp_t type, const skin_desc_t *desc);
142 	static bool successfully_loaded(skintyp_t type);
143 
144 	/**
145 	 * retrieves objects with type=menu and given name
146 	 * @param str pointer to beginning of name string (not null-terminated)
147 	 * @param len length of string
148 	 * @return pointer to skin object or NULL if nothing found
149 	 */
150 	static const skin_desc_t *get_extra( const char *str, int len );
151 
152 private:
153 	/// holds objects from paks with type 'menu'
154 	static slist_tpl<const skin_desc_t *>extra_obj;
155 };
156 
157 #endif
158