1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
#include "besch/skin_besch.h"
#include "besch/spezial_obj_tpl.h"
#include "simskin.h"
/*
* Alle Skin-Bestandteile, die wir brauchen
*/
// menus
const skin_besch_t* skinverwaltung_t::werkzeuge_general = NULL;
const skin_besch_t* skinverwaltung_t::werkzeuge_simple = NULL;
const skin_besch_t* skinverwaltung_t::werkzeuge_dialoge = NULL;
const skin_besch_t* skinverwaltung_t::werkzeuge_toolbars = NULL;
/* Window skin images are menus too! */
const skin_besch_t* skinverwaltung_t::window_skin = NULL;
// symbol images
const skin_besch_t* skinverwaltung_t::biglogosymbol = NULL;
const skin_besch_t* skinverwaltung_t::logosymbol = NULL;
const skin_besch_t* skinverwaltung_t::neujahrsymbol = NULL;
const skin_besch_t* skinverwaltung_t::neueweltsymbol = NULL;
const skin_besch_t* skinverwaltung_t::flaggensymbol = NULL;
const skin_besch_t* skinverwaltung_t::meldungsymbol = NULL;
const skin_besch_t* skinverwaltung_t::zughaltsymbol = NULL;
const skin_besch_t* skinverwaltung_t::autohaltsymbol = NULL;
const skin_besch_t* skinverwaltung_t::schiffshaltsymbol = NULL;
const skin_besch_t* skinverwaltung_t::airhaltsymbol = NULL;
const skin_besch_t* skinverwaltung_t::monorailhaltsymbol = NULL;
const skin_besch_t* skinverwaltung_t::bushaltsymbol = NULL;
const skin_besch_t* skinverwaltung_t::tramhaltsymbol = NULL;
const skin_besch_t* skinverwaltung_t::electricity = NULL;
const skin_besch_t* skinverwaltung_t::intown = NULL;
const skin_besch_t* skinverwaltung_t::passagiere = NULL;
const skin_besch_t* skinverwaltung_t::post = NULL;
const skin_besch_t* skinverwaltung_t::waren = NULL;
const skin_besch_t* skinverwaltung_t::seasons_icons = NULL;
const skin_besch_t* skinverwaltung_t::message_options = NULL;
const skin_besch_t* skinverwaltung_t::color_options = NULL;
// cursors
const skin_besch_t* skinverwaltung_t::cursor_general = NULL; // new cursors
const skin_besch_t* skinverwaltung_t::bauigelsymbol = NULL;
const skin_besch_t* skinverwaltung_t::belegtzeiger = NULL;
const skin_besch_t* skinverwaltung_t::mouse_cursor = NULL;
// misc images
const skin_besch_t* skinverwaltung_t::construction_site = NULL;
const skin_besch_t* skinverwaltung_t::fussweg = NULL;
const skin_besch_t* skinverwaltung_t::pumpe = NULL;
const skin_besch_t* skinverwaltung_t::senke = NULL;
static spezial_obj_tpl<skin_besch_t> misc_objekte[] = {
{ &skinverwaltung_t::senke, "PowerDest" },
{ &skinverwaltung_t::pumpe, "PowerSource" },
{ &skinverwaltung_t::construction_site, "Construction" },
{ &skinverwaltung_t::fussweg, "Sidewalk" },
{ NULL, NULL }
};
static spezial_obj_tpl<skin_besch_t> menu_objekte[] = {
// new menu system
{ &skinverwaltung_t::window_skin, "WindowSkin" },
{ &skinverwaltung_t::werkzeuge_general, "GeneralTools" },
{ &skinverwaltung_t::werkzeuge_simple, "SimpleTools" },
{ &skinverwaltung_t::werkzeuge_dialoge, "DialogeTools" },
{ &skinverwaltung_t::werkzeuge_toolbars,"BarTools" },
{ NULL, NULL }
};
static spezial_obj_tpl<skin_besch_t> symbol_objekte[] = {
{ &skinverwaltung_t::biglogosymbol, "BigLogo" },
{ &skinverwaltung_t::seasons_icons, "Seasons" },
{ &skinverwaltung_t::message_options, "MessageOptions" },
{ &skinverwaltung_t::color_options, "ColorOptions" },
{ &skinverwaltung_t::logosymbol, "Logo" },
{ &skinverwaltung_t::neujahrsymbol, "NewYear" },
{ &skinverwaltung_t::neueweltsymbol, "NewWorld" },
{ &skinverwaltung_t::flaggensymbol, "Flags" },
{ &skinverwaltung_t::meldungsymbol, "Message" },
{ &skinverwaltung_t::zughaltsymbol, "TrainStop" },
{ &skinverwaltung_t::autohaltsymbol, "CarStop" },
{ &skinverwaltung_t::schiffshaltsymbol, "ShipStop" },
{ &skinverwaltung_t::bushaltsymbol, "BusStop" },
{ &skinverwaltung_t::airhaltsymbol, "AirStop" },
{ &skinverwaltung_t::monorailhaltsymbol, "MonorailStop" },
{ &skinverwaltung_t::tramhaltsymbol, "TramStop" },
{ &skinverwaltung_t::electricity, "Electricity" },
{ &skinverwaltung_t::intown, "InTown" },
{ &skinverwaltung_t::passagiere, "Passagiere" },
{ &skinverwaltung_t::post, "Post" },
{ &skinverwaltung_t::waren, "Waren" },
{ NULL, NULL }
};
static spezial_obj_tpl<skin_besch_t> cursor_objekte[] = {
// old cursors
{ &skinverwaltung_t::mouse_cursor, "Mouse" },
{ &skinverwaltung_t::bauigelsymbol, "Builder" },
{ &skinverwaltung_t::cursor_general, "GeneralTools" },
{ &skinverwaltung_t::belegtzeiger, "Marked" },
{ NULL, NULL }
};
bool skinverwaltung_t::alles_geladen(skintyp_t type)
{
spezial_obj_tpl<skin_besch_t>* sb;
switch (type) {
case menu: sb = menu_objekte; break;
case cursor: sb = cursor_objekte + 1; break; // forget about MousePointer
case symbol: sb = symbol_objekte + 1; break; // forget about BigLogo
case misc: sb = misc_objekte; break;
case nothing: return true;
default: return false;
}
return ::alles_geladen(sb);
}
bool skinverwaltung_t::register_besch(skintyp_t type, const skin_besch_t* besch)
{
spezial_obj_tpl<skin_besch_t>* sb;
switch (type) {
case menu: sb = menu_objekte; break;
case cursor: sb = cursor_objekte; break;
case symbol: sb = symbol_objekte; break;
case misc: sb = misc_objekte; break;
case nothing: return true;
default: return false;
}
return ::register_besch(sb, besch);
}
|