Beispiel #1
0
/**
 *  Konstruktor von @p iwLobbyConnect.
 *
 *  @author FloSoft
 */
iwLobbyConnect::iwLobbyConnect(void)
    : IngameWindow(CGI_LOBBYCONNECT, 0xFFFF, 0xFFFF, 500, 260, _("Connecting to Lobby"), LOADER.GetImageN("resource", 41))
{
    // Benutzername
    AddText(0,  20, 40, _("Username:"******"Password:"******"Email Address:"), COLOR_YELLOW, 0, NormalFont);
    ctrlEdit* email = AddEdit(5, 260, 100, 220, 22, TC_GREEN2, NormalFont);
    email->SetText(SETTINGS.lobby.email);

    // Passwort speichern ja/nein
    AddText(6, 20, 130, _("Save Password?"), COLOR_YELLOW, 0, NormalFont);

    ctrlOptionGroup* savepassword = AddOptionGroup(10, ctrlOptionGroup::CHECK);
    savepassword->AddTextButton(0, 260, 130, 105,   22, TC_GREEN2, _("No"), NormalFont); // nein
    savepassword->AddTextButton(1, 375, 130, 105,   22, TC_GREEN2, _("Yes"), NormalFont); // ja
    savepassword->SetSelection( (SETTINGS.lobby.save_password ? 1 : 0) );

    // ipv6 oder ipv4 benutzen
    AddText(11, 20, 160, _("Use IPv6:"), COLOR_YELLOW, 0, NormalFont);

    ctrlOptionGroup* ipv6 = AddOptionGroup(12, ctrlOptionGroup::CHECK);
    ipv6->AddTextButton(0, 260, 160, 105,   22, TC_GREEN2, _("IPv4"), NormalFont);
    ipv6->AddTextButton(1, 375, 160, 105,   22, TC_GREEN2, _("IPv6"), NormalFont);
    ipv6->SetSelection( (SETTINGS.server.ipv6 ? 1 : 0) );

    // Verbinden
    AddTextButton(7, 20, 220, 220,  22, TC_RED1, _("Connect"), NormalFont);

    // Registrieren
    AddTextButton(8, 260, 220, 220,  22, TC_GREEN2, _("Register"), NormalFont);

    // Status
    AddText(9, 250, 195, "", COLOR_RED, glArchivItem_Font::DF_CENTER, NormalFont);

    // Lobby-Interface setzen
    LOBBYCLIENT.SetInterface(this);

}
Beispiel #2
0
/**
 *
 *
 *  @author FloSoft
 */
iwAddons::iwAddons(GlobalGameSettings* ggs, ChangePolicy policy)
    : IngameWindow(CGI_ADDONS, 0xFFFF, 0xFFFF, 700, 500, _("Addon Settings"), LOADER.GetImageN("resource", 41), true), ggs(ggs), policy(policy)
{
    AddText(0, 20, 30, _("Additional features:"), COLOR_YELLOW, 0, NormalFont);

    if(policy != READONLY)
        AddTextButton(1,  20, height - 40, 200, 22, TC_GREY, _("Apply Changes"), NormalFont);

    AddTextButton(2, 250, height - 40, 200, 22, TC_RED1, _("Close Without Saving"), NormalFont);

    if(policy != READONLY)
        AddTextButton(3, 480, height - 40, 200, 22, TC_GREY, _("Use S2 Defaults"), NormalFont);

    // Kategorien
    ctrlOptionGroup* optiongroup = AddOptionGroup(5, ctrlOptionGroup::CHECK, scale);
    // "Alle"
    optiongroup->AddTextButton(ADDONGROUP_ALL,  20, 50, 120, 22, TC_GREEN2, _("All"), NormalFont);
    // "Militär"
    optiongroup->AddTextButton(ADDONGROUP_MILITARY, 150, 50, 120, 22, TC_GREEN2, _("Military"), NormalFont);
    // "Wirtschaft"
    optiongroup->AddTextButton(ADDONGROUP_ECONOMY, 290, 50, 120, 22, TC_GREEN2, _("Economy"), NormalFont);
    // "Spielverhalten"
    optiongroup->AddTextButton(ADDONGROUP_GAMEPLAY, 430, 50, 120, 22, TC_GREEN2, _("Gameplay"), NormalFont);
    // "Sonstiges"
    optiongroup->AddTextButton(ADDONGROUP_OTHER, 560, 50, 120, 22, TC_GREEN2, _("Other"), NormalFont);

    ctrlScrollBar* scrollbar = AddScrollBar(6, width - SCROLLBAR_WIDTH - 20, 90, SCROLLBAR_WIDTH, height - 140, SCROLLBAR_WIDTH, TC_GREEN2, (height - 140) / 30 - 1);
    scrollbar->SetRange(ggs->getCount());

    optiongroup->SetSelection(ADDONGROUP_ALL, true);
}
Beispiel #3
0
/**
 *  Konstruktor von @p iwSettings.
 *
 *  @author NastX
 */
iwSettings::iwSettings(dskGameInterface* gameDesktop)
    : IngameWindow(CGI_SETTINGS, 0xFFFF, 0xFFFF, 370, 172, _("Settings"), LOADER.GetImageN("resource", 41)),
      gameDesktop(gameDesktop)
{
    AddText(  46,  15,  40, _("Fullscreen resolution:"), COLOR_YELLOW, 0, NormalFont);
    AddText(  47,  15,  85, _("Mode:"), COLOR_YELLOW, 0, NormalFont);
    AddCheckBox(4, 200, 124, 150, 26, TC_GREY, _("Statistics Scale"), NormalFont, false);
    GetCtrl<ctrlCheck>(4)->SetCheck(SETTINGS.ingame.scale_statistics);

    // "Vollbild"
    ctrlOptionGroup* optiongroup = AddOptionGroup(10, ctrlOptionGroup::CHECK, scale);
    optiongroup = AddOptionGroup(3, ctrlOptionGroup::CHECK, scale);
    optiongroup->AddTextButton(1, 200, 70, 150, 22, TC_GREY, _("Fullscreen"), NormalFont);
    optiongroup->AddTextButton(2, 200, 95, 150, 22, TC_GREY, _("Windowed"), NormalFont);

    // "Vollbild" setzen
    optiongroup = GetCtrl<ctrlOptionGroup>(3);
    optiongroup->SetSelection( (SETTINGS.video.fullscreen ? 1 : 2) );
    VIDEODRIVER.ListVideoModes(video_modes);

    // "Auflösung"
    AddComboBox(0, 200, 35, 150, 22, TC_GREY, NormalFont, 110);

    // Und zu der Combobox hinzufügen
    for(unsigned i = 0; i < video_modes.size(); ++i)
    {
        // >=800x600, alles andere macht keinen Sinn
        if(video_modes[i].width >= 800 && video_modes[i].height >= 600)
        {
            char str[64];
            sprintf(str, "%ux%u", video_modes[i].width, video_modes[i].height);

            GetCtrl<ctrlComboBox>(0)->AddString(str);

            // Ist das die aktuelle Auflösung? Dann selektieren
            if(video_modes[i].width == SETTINGS.video.fullscreen_width &&
                    video_modes[i].height == SETTINGS.video.fullscreen_height)
                GetCtrl<ctrlComboBox>(0)->SetSelection(i);
        }
        else
        {
            video_modes.erase(video_modes.begin() + i);
            --i;
        }
    }
}
/**
 *  Konstruktor von @p iwMerchandiseStatistics.
 *
 *  @author jh
 */
iwMerchandiseStatistics::iwMerchandiseStatistics()
    : IngameWindow(CGI_MERCHANDISE_STATISTICS, 0xFFFE, 0xFFFE, 252, 310, _("Merchandise"), LOADER.GetImageN("resource", 41)), currentTime(STAT_1H)
{
    // Statistikfeld
    AddImage(0, 10 + 115, 23 + 81, LOADER.GetImageN("io", 228));

    // Waren-Buttons
    // obere Reihe
    ctrlMultiSelectGroup* types = AddMultiSelectGroup(22, ctrlOptionGroup::ILLUMINATE);
    types->AddImageButton(1, 17, 192, 30, 30, TC_GREY, LOADER.GetMapImageN(2250 + GD_WOOD), _("Wood"));
    types->AddImageButton(2, 48, 192, 30, 30, TC_GREY, LOADER.GetMapImageN(2250 + GD_BOARDS), _("Boards"));
    types->AddImageButton(3, 79, 192, 30, 30, TC_GREY, LOADER.GetMapImageN(2250 + GD_STONES), _("Stones"));
    types->AddImageButton(4, 110, 192, 30, 30, TC_GREY, LOADER.GetImageN("io", 80), _("Food"));
    types->AddImageButton(5, 141, 192, 30, 30, TC_GREY, LOADER.GetMapImageN(2250 + GD_WATER), _("Water"));
    types->AddImageButton(6, 172, 192, 30, 30, TC_GREY, LOADER.GetMapImageN(2250 + GD_BEER), _("Beer"));
    types->AddImageButton(7, 203, 192, 30, 30, TC_GREY, LOADER.GetMapImageN(2250 + GD_COAL), _("Coal"));

    // untere Reihe
    types->AddImageButton(8, 17, 227, 30, 30, TC_GREY, LOADER.GetMapImageN(2250 + GD_IRONORE), _("Ironore"));
    types->AddImageButton(9, 48, 227, 30, 30, TC_GREY, LOADER.GetMapImageN(2250 + GD_GOLD), _("Gold"));
    types->AddImageButton(10, 79, 227, 30, 30, TC_GREY, LOADER.GetMapImageN(2250 + GD_IRON), _("Iron"));
    types->AddImageButton(11, 110, 227, 30, 30, TC_GREY, LOADER.GetMapImageN(2250 + GD_COINS), _("Coins"));
    types->AddImageButton(12, 141, 227, 30, 30, TC_GREY, LOADER.GetMapImageN(2250 + GD_HAMMER), _("Tools"));
    types->AddImageButton(13, 172, 227, 30, 30, TC_GREY, LOADER.GetImageN("io", 111), _("Weapons"));
    types->AddImageButton(14, 203, 227, 30, 30, TC_GREY, LOADER.GetMapImageN(2250 + GD_BOAT), _("Boats"));

    // Hilfe
    AddImageButton(16, 17, 261, 30, 32, TC_GREY, LOADER.GetImageN("io", 21), _("Help"));

    // Mülleimer
    AddImageButton(17, 49, 263, 30, 28, TC_GREY, LOADER.GetImageN("io", 106), _("Delete all"));

    // Zeiten
    ctrlOptionGroup* times = AddOptionGroup(23, ctrlOptionGroup::ILLUMINATE);
    times->AddTextButton(18, 81, 263, 36, 28, TC_GREY, _("15 m"), NormalFont);
    times->AddTextButton(19, 119, 263, 36, 28, TC_GREY, _("1 h"), NormalFont);
    times->AddTextButton(20, 155, 263, 36, 28, TC_GREY, _("4 h"), NormalFont);
    times->AddTextButton(21, 191, 263, 36, 28, TC_GREY, _("16 h"), NormalFont);
    times->SetSelection(19);


    // Zeit-Werte an der x-Achse
    timeAnnotations = std::vector<ctrlText*>(7);
    for (unsigned i = 0; i < 7; ++i)
    {
        timeAnnotations[i] = AddText(32 + i, 211 + i, 125 + i, "", MakeColor(255, 136, 96, 52),
                                     glArchivItem_Font::DF_CENTER | glArchivItem_Font::DF_TOP, LOADER.GetFontN("resource", 0));
    }

    // Aktueller Maximalwert an der y-Achse
    maxValue = AddText(31, 211, 55, "1", MakeColor(255, 136, 96, 52),
                       glArchivItem_Font::DF_RIGHT | glArchivItem_Font::DF_VCENTER, LOADER.GetFontN("resource", 0));
}
Beispiel #5
0
/**
 *  Konstruktor von @p dskSelectMap.
 *
 *  @param[in] type Typ des Servers
 *  @param[in] name Server-Name
 *  @param[in] pass Server-Passwort
 */
dskSelectMap::dskSelectMap(const CreateServerInfo& csi)
    : Desktop(LOADER.GetImageN("setup015", 0)),
      csi(csi)
{
    // Die Tabelle für die Maps
    AddTable( 1, 110,  35, 680, 400, TC_GREY, NormalFont, 6, _("Name"), 250, ctrlTable::SRT_STRING, _("Author"), 216, ctrlTable::SRT_STRING, _("Player"), 170, ctrlTable::SRT_NUMBER, _("Type"), 180, ctrlTable::SRT_STRING, _("Size"), 134, ctrlTable::SRT_MAPSIZE, "", 0, ctrlTable::SRT_STRING);

    // "Karten Auswahl"
    AddText(  2, 400,   5, _("Selection of maps"), COLOR_YELLOW, glArchivItem_Font::DF_CENTER, LargeFont);

    // "Zurück"
    AddTextButton(3, 380, 560, 200, 22, TC_RED1, _("Back"), NormalFont);
    // "Spiel laden..."
    AddTextButton(4, 590, 530, 200, 22, TC_GREEN2, _("Load game..."), NormalFont);
    // "Weiter"
    AddTextButton(5, 590, 560, 200, 22, TC_GREEN2, _("Continue"), NormalFont);

    ctrlOptionGroup* optiongroup = AddOptionGroup(10, ctrlOptionGroup::CHECK, scale_);
    // "Alte"
    optiongroup->AddTextButton(0, 10,  35, 90,  22, TC_GREY, _("Old maps"), NormalFont);
    // "Neue"
    optiongroup->AddTextButton(1, 10,  60, 90,  22, TC_GREY, _("New maps"), NormalFont);
    // "Eigene"
    optiongroup->AddTextButton(2, 10,  85, 90,  22, TC_GREY, _("Own maps"), NormalFont);
    // "Kontinente"
    optiongroup->AddTextButton(3, 10, 110, 90,  22, TC_GREY, _("Continents"), NormalFont);
    // "Kampagne"
    optiongroup->AddTextButton(4, 10, 135, 90,  22, TC_GREY, _("Campaign"), NormalFont);
    // "RTTR"
    optiongroup->AddTextButton(5, 10, 160, 90,  22, TC_GREY, _("RTTR"), NormalFont);
    // "Andere"
    optiongroup->AddTextButton(6, 10, 185, 90,  22, TC_GREY, _("Other"), NormalFont);
    // "Andere"
    optiongroup->AddTextButton(7, 10, 210, 90,  22, TC_GREY, _("Sea"), NormalFont);
    // "Heruntergeladene"
    optiongroup->AddTextButton(8, 10, 235, 90,  22, TC_GREY, _("Played"), NormalFont);

    AddPreviewMinimap(11, 110, 445, 140, 140, NULL);
    AddText(12, 260, 470, _("Map: "), COLOR_YELLOW, glArchivItem_Font::DF_LEFT, NormalFont);
    AddText(13, 260, 490, _("Mapfile: "), COLOR_YELLOW, glArchivItem_Font::DF_LEFT, NormalFont);

    // "Eigene" auswählen
    optiongroup->SetSelection(5, true);

    LOBBYCLIENT.SetInterface(this);
    GAMECLIENT.SetInterface(this);
}
Beispiel #6
0
/**
 *  Konstruktor von @p iwChat.
 *
 *  @author OLiver
 */
iwChat::iwChat()
    : IngameWindow(CGI_CHAT, 0xFFFF, 0xFFFF, 300, 150, _("Chat Window"), LOADER.GetImageN("resource", 41))
{
    // Eingabefeld für Chattext
    AddEdit(0, 20, 30, 260, 22, TC_GREY, NormalFont);

    ctrlOptionGroup* group = AddOptionGroup(1, ctrlOptionGroup::CHECK);
    // "Alle"
    group->AddTextButton(0,  20,  80, 260, 22, TC_GREY, _("All"), NormalFont);
    // "Verbündete"
    group->AddTextButton(1,  20, 112, 125, 22, TC_GREEN2, _("Allies"), NormalFont);
    // "Feinde"
    group->AddTextButton(2, 155, 112, 125, 22, TC_RED1, _("Enemies"), NormalFont);

    // Entspr. vom letzten Mal auswählen auswählen
    group->SetSelection(chat_dest);
}
Beispiel #7
0
/**
 *  Konstruktor von @p iwDirectIPCreate.
 *
 *  @author OLiver
 */
iwDirectIPCreate::iwDirectIPCreate(unsigned int server_type)
    : IngameWindow(CGI_DIRECTIPCREATE, 0xFFFF, 0xFFFF, 300, 285, _("Create Game"), LOADER.GetImageN("resource", 41), true),
      server_type(server_type)
{
    ctrlEdit* name, *port;

    // "Name des Spiels"
    AddText(0, 20, 30, _("Game's Name:"), COLOR_YELLOW, 0, NormalFont);
    name = AddEdit(1, 20, 45, 260, 22, TC_GREEN2, NormalFont, 0, false, false, true);

    // "Server-Port"
    AddText(2, 20, 80, _("Server-Port:"), COLOR_YELLOW, 0, NormalFont);
    port = AddEdit(3, 20, 95, 260, 22, TC_GREEN2, NormalFont, 0, false, false,  true);

    // "Passwort"
    AddText(4, 20, 130, _("Password:"******"Use IPv6:"), COLOR_YELLOW, 0, NormalFont);

    ctrlOptionGroup* ipv6 = AddOptionGroup(12, ctrlOptionGroup::CHECK);
    ipv6->AddTextButton(0, 120, 180, 75,    22, TC_GREEN2, _("IPv4"), NormalFont);
    ipv6->AddTextButton(1, 205, 180, 75,    22, TC_GREEN2, _("IPv6"), NormalFont);
    ipv6->SetSelection( (SETTINGS.server.ipv6 ? 1 : 0) );

    // Status
    AddText(6, 150, 215, "", COLOR_RED, glArchivItem_Font::DF_CENTER, NormalFont);

    // "Starten"
    AddTextButton(7, 20, 240, 125, 22, TC_GREEN2, _("Start"), NormalFont);

    // "Zurück"
    AddTextButton(8, 155, 240, 125, 22, TC_RED1, _("Back"), NormalFont);

    name->SetText(SETTINGS.lobby.name + _("'s Game"));
    name->SetFocus();
    port->SetText(LOADER.GetTextN("client", 3));
}
iwAddons::iwAddons(GlobalGameSettings& ggs, Window* parent, ChangePolicy policy, std::vector<AddonId> addonIds)
    : IngameWindow(CGI_ADDONS, IngameWindow::posLastOrCenter, Extent(700, 500), _("Addon Settings"), LOADER.GetImageN("resource", 41), true,
                   false, parent),
      ggs(ggs), policy(policy), addonIds(std::move(addonIds))
{
    AddText(0, DrawPoint(20, 30), _("Additional features:"), COLOR_YELLOW, FontStyle{}, NormalFont);

    Extent btSize(200, 22);
    if(policy != READONLY)
        AddTextButton(1, DrawPoint(20, GetSize().y - 40), btSize, TC_GREEN2, _("Apply"), NormalFont, _("Apply Changes"));

    AddTextButton(2, DrawPoint(250, GetSize().y - 40), btSize, TC_RED1, _("Abort"), NormalFont, _("Close Without Saving"));

    if(policy != READONLY)
        AddTextButton(3, DrawPoint(480, GetSize().y - 40), btSize, TC_GREY, _("Default"), NormalFont, _("Use S2 Defaults"));

    // Kategorien
    ctrlOptionGroup* optiongroup = AddOptionGroup(5, ctrlOptionGroup::CHECK);
    btSize = Extent(120, 22);
    // "Alle"
    optiongroup->AddTextButton(ADDONGROUP_ALL, DrawPoint(20, 50), btSize, TC_GREEN2, _("All"), NormalFont);
    // "Militär"
    optiongroup->AddTextButton(ADDONGROUP_MILITARY, DrawPoint(150, 50), btSize, TC_GREEN2, _("Military"), NormalFont);
    // "Wirtschaft"
    optiongroup->AddTextButton(ADDONGROUP_ECONOMY, DrawPoint(290, 50), btSize, TC_GREEN2, _("Economy"), NormalFont);
    // "Spielverhalten"
    optiongroup->AddTextButton(ADDONGROUP_GAMEPLAY, DrawPoint(430, 50), btSize, TC_GREEN2, _("Gameplay"), NormalFont);
    // "Sonstiges"
    optiongroup->AddTextButton(ADDONGROUP_OTHER, DrawPoint(560, 50), btSize, TC_GREEN2, _("Other"), NormalFont);

    ctrlScrollBar* scrollbar =
      AddScrollBar(6, DrawPoint(GetSize().x - SCROLLBAR_WIDTH - 20, 90), Extent(SCROLLBAR_WIDTH, GetSize().y - 140), SCROLLBAR_WIDTH,
                   TC_GREEN2, (GetSize().y - 140) / 30 - 1);
    scrollbar->SetRange(ggs.getNumAddons());

    optiongroup->SetSelection(ADDONGROUP_ALL, true);
}
Beispiel #9
0
/**
 *  Konstruktor von @p dskOptions.
 *
 *  @author OLiver
 *  @author FloSoft
 */
dskOptions::dskOptions(void) : Desktop(LOADER.GetImageN("setup013", 0))
{
    // Zurück
    AddTextButton(0, 300, 550, 200, 22,   TC_RED1, _("Back"), NormalFont);

    // "Optionen"
    AddText(1, 400, 10, _("Options"), COLOR_YELLOW, glArchivItem_Font::DF_CENTER, LargeFont);

    ctrlOptionGroup* optiongroup = AddOptionGroup(10, ctrlOptionGroup::CHECK, scale_);

    AddTextButton(14, 520, 550, 200, 22, TC_GREEN2, _("Addons"), NormalFont);

    // "Allgemein"
    optiongroup->AddTextButton(11,  80, 510, 200, 22, TC_GREEN2, _("Common"), NormalFont);
    // "Grafik"
    optiongroup->AddTextButton(12, 300, 510, 200, 22, TC_GREEN2, _("Graphics"), NormalFont);
    // "Sound"
    optiongroup->AddTextButton(13, 520, 510, 200, 22, TC_GREEN2, _("Sound/Music"), NormalFont);

    ctrlGroup* groupAllgemein = AddGroup(21, scale_);
    ctrlGroup* groupGrafik = AddGroup(22, scale_);
    ctrlGroup* groupSound = AddGroup(23, scale_);
    ctrlComboBox* combo;

    // Allgemein
    // {

    // "Name"
    groupAllgemein->AddText(30, 80, 80, _("Name in Game:"), COLOR_YELLOW, 0, NormalFont);
    ctrlEdit* name = groupAllgemein->AddEdit(31, 280, 75, 190, 22, TC_GREY, NormalFont, 15);
    name->SetText(SETTINGS.lobby.name);

    // "Sprache"
    groupAllgemein->AddText(32, 80, 130, _("Language:"), COLOR_YELLOW, 0, NormalFont);
    combo = groupAllgemein->AddComboBox(33, 280, 125, 190, 20, TC_GREY, NormalFont, 100);

    bool selected = false;
    for(unsigned i = 0 ; i < LANGUAGES.getCount(); ++i)
    {
        const Languages::Language l = LANGUAGES.getLanguage(i);

        combo->AddString(_(l.name));
        if(SETTINGS.language.language == l.code )
        {
            combo->SetSelection(static_cast<unsigned short>(i));
            selected = true;
        }
    }
    if(!selected)
        combo->SetSelection(0);

    // Tastaturlayout
    groupAllgemein->AddText(34, 80, 180, _("Keyboard layout:"), COLOR_YELLOW, 0, NormalFont);
    groupAllgemein->AddTextButton(35, 280, 175, 120, 22, TC_GREY, _("Readme"), NormalFont);

    // IPv4/6
    groupAllgemein->AddText(300, 80, 230, _("Use IPv6:"), COLOR_YELLOW, 0, NormalFont);

    ctrlOptionGroup* ipv6 = groupAllgemein->AddOptionGroup(301, ctrlOptionGroup::CHECK, scale_);
    ipv6->AddTextButton(302, 480, 225, 190, 22, TC_GREY, _("IPv6"), NormalFont);
    ipv6->AddTextButton(303, 280, 225, 190, 22, TC_GREY, _("IPv4"), NormalFont);
    ipv6->SetSelection( (SETTINGS.server.ipv6 ? 302 : 303) );

    // ipv6-feld ggf (de-)aktivieren
    ipv6->GetCtrl<ctrlTextButton>(302)->Enable( (SETTINGS.proxy.typ != 4 && SETTINGS.proxy.typ != 40) ); //-V807

    // Proxyserver
    groupAllgemein->AddText(36, 80, 280, _("Proxyserver:"), COLOR_YELLOW, 0, NormalFont);
    ctrlEdit* proxy = groupAllgemein->AddEdit(37, 280, 275, 190, 22, TC_GREY, NormalFont);
    proxy->SetText(SETTINGS.proxy.proxy);
    proxy = groupAllgemein->AddEdit(371, 480, 275, 50, 22, TC_GREY, NormalFont, 5);
    proxy->SetText(SETTINGS.proxy.port);

    // Proxytyp
    groupAllgemein->AddText(38, 80, 310, _("Proxytyp:"), COLOR_YELLOW, 0, NormalFont);
    combo = groupAllgemein->AddComboBox(39, 280, 305, 390, 20, TC_GREY, NormalFont, 100);
    combo->AddString(_("No Proxy"));
    combo->AddString(_("Socks v4"));

    // TODO: not implemented
    //combo->AddString(_("Socks v5"));

    // und auswählen
    switch(SETTINGS.proxy.typ)
    {
        default:    {   combo->SetSelection(0); } break;
        case 4:     {   combo->SetSelection(1); } break;
        case 5:     {   combo->SetSelection(2); } break;
    }

    // }

    groupAllgemein->AddText(  70,  80, 360, _("Submit debug data:"), COLOR_YELLOW, 0, NormalFont);
    optiongroup = groupAllgemein->AddOptionGroup(71, ctrlOptionGroup::CHECK, scale_);
    optiongroup->AddTextButton(72, 480, 355, 190, 22, TC_GREY, _("On"), NormalFont);
    optiongroup->AddTextButton(73, 280, 355, 190, 22, TC_GREY, _("Off"), NormalFont);

    optiongroup->SetSelection( ((SETTINGS.global.submit_debug_data == 1) ? 72 : 73) );

    // qx:upnp switch
    groupAllgemein->AddText(9999, 80, 390, _("Use UPnP"), COLOR_YELLOW, 0, NormalFont);
    ctrlOptionGroup* upnp = groupAllgemein->AddOptionGroup(9998, ctrlOptionGroup::CHECK, scale_);
    upnp->AddTextButton(10002, 280, 385, 190, 22, TC_GREY, _("Off"), NormalFont);
    upnp->AddTextButton(10001, 480, 385, 190, 22, TC_GREY, _("On"), NormalFont);
    upnp->SetSelection( (SETTINGS.global.use_upnp == 1) ? 10001 : 10002 );


    if(!GLOBALVARS.ext_vbo) // VBO unterstützt?
        optiongroup->AddText(  56, 280, 230, _("not supported"), COLOR_YELLOW, 0, NormalFont);
    else
        optiongroup->AddTextButton(56, 280, 225, 190, 22, TC_GREY, _("On"), NormalFont);
    optiongroup->AddTextButton(57, 480, 225, 190, 22, TC_GREY, _("Off"), NormalFont);

    // "Auflösung"
    groupGrafik->AddText(  40,  80, 80, _("Fullscreen resolution:"), COLOR_YELLOW, 0, NormalFont);
    groupGrafik->AddComboBox(41, 280, 75, 120, 22, TC_GREY, NormalFont, 150);

    // "Vollbild"
    groupGrafik->AddText(  46,  80, 130, _("Mode:"), COLOR_YELLOW, 0, NormalFont);
    optiongroup = groupGrafik->AddOptionGroup(47, ctrlOptionGroup::CHECK, scale_);
    optiongroup->AddTextButton(48, 480, 125, 190, 22, TC_GREY, _("Fullscreen"), NormalFont);
    optiongroup->AddTextButton(49, 280, 125, 190, 22, TC_GREY, _("Windowed"), NormalFont);

    // "VSync"
    groupGrafik->AddText(  50,  80, 180, _("Limit Framerate:"), COLOR_YELLOW, 0, NormalFont);
    groupGrafik->AddComboBox(51, 280, 175, 390, 22, TC_GREY, NormalFont, 150);

    // "VBO"
    groupGrafik->AddText(  54,  80, 230, _("Vertex Buffer Objects:"), COLOR_YELLOW, 0, NormalFont);
    optiongroup = groupGrafik->AddOptionGroup(55, ctrlOptionGroup::CHECK, scale_);

    if(!GLOBALVARS.ext_vbo) // VBO unterstützt?
        optiongroup->AddText(  56, 280, 230, _("not supported"), COLOR_YELLOW, 0, NormalFont);
    else
        optiongroup->AddTextButton(56, 280, 225, 190, 22, TC_GREY, _("On"), NormalFont);
    optiongroup->AddTextButton(57, 480, 225, 190, 22, TC_GREY, _("Off"), NormalFont);

    // "Grafiktreiber"
    groupGrafik->AddText(58, 80, 275, _("Graphics Driver"), COLOR_YELLOW, 0, NormalFont);
    combo = groupGrafik->AddComboBox(59, 280, 275, 390, 20, TC_GREY, NormalFont, 100);

    std::vector<DriverWrapper::DriverItem> video_drivers = DriverWrapper::LoadDriverList(DriverWrapper::DT_VIDEO);

    for(std::vector<DriverWrapper::DriverItem>::iterator it = video_drivers.begin(); it != video_drivers.end(); ++it)
    {
        combo->AddString(it->GetName());
        if(it->GetName() == SETTINGS.driver.video)
            combo->SetSelection(combo->GetCount() - 1);
    }

    groupGrafik->AddText(  74,  80, 320, _("Optimized Textures:"), COLOR_YELLOW, 0, NormalFont);
    optiongroup = groupGrafik->AddOptionGroup(75, ctrlOptionGroup::CHECK, scale_);

    optiongroup->AddTextButton(76, 280, 315, 190, 22, TC_GREY, _("On"), NormalFont);
    optiongroup->AddTextButton(77, 480, 315, 190, 22, TC_GREY, _("Off"), NormalFont);


    // "Audiotreiber"
    groupSound->AddText(60,  80, 230, _("Sounddriver"), COLOR_YELLOW, 0, NormalFont);
    combo = groupSound->AddComboBox(61, 280, 225, 390, 20, TC_GREY, NormalFont, 100);

    std::vector<DriverWrapper::DriverItem> audio_drivers = DriverWrapper::LoadDriverList(DriverWrapper::DT_AUDIO);

    for(std::vector<DriverWrapper::DriverItem>::iterator it = audio_drivers.begin(); it != audio_drivers.end(); ++it)
    {
        combo->AddString(it->GetName());
        if(it->GetName() == SETTINGS.driver.audio)
            combo->SetSelection(combo->GetCount() - 1);
    }

    // Musik
    groupSound->AddText(  62,  80, 80, _("Music"), COLOR_YELLOW, 0, NormalFont);
    optiongroup = groupSound->AddOptionGroup(63, ctrlOptionGroup::CHECK, scale_);
    optiongroup->AddTextButton(64, 280, 75, 90, 22, TC_GREY, _("On"), NormalFont);
    optiongroup->AddTextButton(65, 380, 75, 90, 22, TC_GREY, _("Off"), NormalFont);

    ctrlProgress* Mvolume = groupSound->AddProgress(72, 480, 75, 190, 22, TC_GREY, 139, 138, 10);
    Mvolume->SetPosition(SETTINGS.sound.musik_volume * 10 / 255); //-V807

    // Effekte
    groupSound->AddText(  66,  80, 130, _("Effects"), COLOR_YELLOW, 0, NormalFont);
    optiongroup = groupSound->AddOptionGroup(67, ctrlOptionGroup::CHECK, scale_);
    optiongroup->AddTextButton(68, 280, 125, 90, 22, TC_GREY, _("On"), NormalFont);
    optiongroup->AddTextButton(69, 380, 125, 90, 22, TC_GREY, _("Off"), NormalFont);

    ctrlProgress* FXvolume = groupSound->AddProgress(70, 480, 125, 190, 22, TC_GREY, 139, 138, 10);
    FXvolume->SetPosition(SETTINGS.sound.effekte_volume * 10 / 255);

    // Musicplayer-Button
    groupSound->AddTextButton(71, 280, 175, 190, 22, TC_GREY, _("Music player"), NormalFont);

    // "Allgemein" auswählen
    optiongroup = GetCtrl<ctrlOptionGroup>(10);
    optiongroup->SetSelection(11, true);


    // Grafik
    // {

    // Videomodi auflisten
    VIDEODRIVER.ListVideoModes(video_modes);

    // Und zu der Combobox hinzufügen
    for(unsigned i = 0; i < video_modes.size(); ++i)
    {
        // >=800x600, alles andere macht keinen Sinn
        if(video_modes[i].width >= 800 && video_modes[i].height >= 600)
        {
            char str[64];
            sprintf(str, "%ux%u", video_modes[i].width, video_modes[i].height);

            groupGrafik->GetCtrl<ctrlComboBox>(41)->AddString(str);

            // Ist das die aktuelle Auflösung? Dann selektieren
            if(video_modes[i].width == SETTINGS.video.fullscreen_width &&
                    video_modes[i].height == SETTINGS.video.fullscreen_height)
                groupGrafik->GetCtrl<ctrlComboBox>(41)->SetSelection(i);
        }
        else
        {
            video_modes.erase(video_modes.begin() + i);
            --i;
        }
    }

    // "Vollbild" setzen
    optiongroup = groupGrafik->GetCtrl<ctrlOptionGroup>(47);
    optiongroup->SetSelection( (SETTINGS.video.fullscreen ? 48 : 49) ); //-V807

    // "Limit Framerate" füllen
    optiongroup = groupGrafik->GetCtrl<ctrlOptionGroup>(51);
    for(unsigned char i = 0; i < Settings::SCREEN_REFRESH_RATES_COUNT; ++i)
    {
        switch(Settings::SCREEN_REFRESH_RATES[i])
        {
            case 0:
            {
                groupGrafik->GetCtrl<ctrlComboBox>(51)->AddString(_("Disabled"));
                groupGrafik->GetCtrl<ctrlComboBox>(51)->SetSelection(0);
            } break;
            case 1:
            {
                if(GLOBALVARS.ext_swapcontrol)
                    groupGrafik->GetCtrl<ctrlComboBox>(51)->AddString(_("Dynamic (Limits to display refresh rate, works with most drivers)"));
                if(SETTINGS.video.vsync == 1)
                    groupGrafik->GetCtrl<ctrlComboBox>(51)->SetSelection(1);
            } break;
            default:
            {
                // frameratebegrenzungen mit Bildabstand kleiner 13ms
                // wird unter windows nicht mehr aufgelöst
#ifdef _WIN32
                if(960 / Settings::SCREEN_REFRESH_RATES[i] > 13)
#endif // _WIN32
                {
                    std::stringstream rrate;
                    rrate << Settings::SCREEN_REFRESH_RATES[i] << " fps";
                    groupGrafik->GetCtrl<ctrlComboBox>(51)->AddString(rrate.str());
                }

                if(SETTINGS.video.vsync == Settings::SCREEN_REFRESH_RATES[i])
                    groupGrafik->GetCtrl<ctrlComboBox>(51)->SetSelection(i - (GLOBALVARS.ext_swapcontrol ? 0 : 1));
            } break;
        }
    }

    // "VBO" setzen
    optiongroup = groupGrafik->GetCtrl<ctrlOptionGroup>(55);
    if(GLOBALVARS.ext_vbo)
        optiongroup->SetSelection( (SETTINGS.video.vbo ? 56 : 57) );
    else
        optiongroup->SetSelection(57);

    optiongroup = groupGrafik->GetCtrl<ctrlOptionGroup>(75);
    optiongroup->SetSelection( (SETTINGS.video.shared_textures ? 76 : 77) );
    // }

    // Sound
    // {

    // "Musik" setzen
    optiongroup = groupSound->GetCtrl<ctrlOptionGroup>(63);
    optiongroup->SetSelection( (SETTINGS.sound.musik ? 64 : 65) );

    // "Effekte" setzen
    optiongroup = groupSound->GetCtrl<ctrlOptionGroup>(67);
    optiongroup->SetSelection( (SETTINGS.sound.effekte ? 68 : 69) );

    // }
}
Beispiel #10
0
/**
 *  Konstruktor von @p iwTools.
 *
 *  @author OLiver
 */
iwTransport::iwTransport()
    : IngameWindow(CGI_TRANSPORT, 0xFFFF, 0xFFFF, 166, 333, _("Transport"), LOADER.GetImageN("io", 5)),
      settings_changed(false)
{
    AddImageButton(0, 18, 285, 30, 30, TC_GREY, LOADER.GetImageN("io",  21), _("Help"));

    // Standard
    AddImageButton(1, 60, 285, 48, 30, TC_GREY, LOADER.GetImageN("io", 191), _("Default"));
    // ganz hoch
    AddImageButton(2, 118, 235, 30, 20, TC_GREY, LOADER.GetImageN("io", 215), _("Top"));
    // hoch
    AddImageButton(3, 118, 255, 30, 20, TC_GREY, LOADER.GetImageN("io",  33), _("Up"));
    // runter
    AddImageButton(4, 118, 275, 30, 20, TC_GREY, LOADER.GetImageN("io",  34), _("Down"));
    // ganz runter
    AddImageButton(5, 118, 295, 30, 20, TC_GREY, LOADER.GetImageN("io", 216), _("Bottom"));

    // Buttons der einzelnen Waren anlegen
    ctrlOptionGroup* group = AddOptionGroup(6, ctrlOptionGroup::ILLUMINATE);

    // Zeiger auf die Bilder für die einzelnen Waren in der Transportschlange
    TRANSPORT_SPRITES[0] = LOADER.GetMapImageN(2250 + GD_COINS);
    TRANSPORT_SPRITES[1] = LOADER.GetImageN("io", 111);
    TRANSPORT_SPRITES[2] = LOADER.GetMapImageN(2250 + GD_BEER);
    TRANSPORT_SPRITES[3] = LOADER.GetMapImageN(2250 + GD_IRON);
    TRANSPORT_SPRITES[4] = LOADER.GetMapImageN(2250 + GD_GOLD);
    TRANSPORT_SPRITES[5] = LOADER.GetMapImageN(2250 + GD_IRONORE);
    TRANSPORT_SPRITES[6] = LOADER.GetMapImageN(2250 + GD_COAL);
    TRANSPORT_SPRITES[7] = LOADER.GetMapImageN(2250 + GD_BOARDS);
    TRANSPORT_SPRITES[8] = LOADER.GetMapImageN(2250 + GD_STONES);
    TRANSPORT_SPRITES[9] = LOADER.GetMapImageN(2250 + GD_WOOD);
    TRANSPORT_SPRITES[10] = LOADER.GetMapImageN(2250 + GD_WATER);
    TRANSPORT_SPRITES[11] = LOADER.GetImageN("io", 80);
    TRANSPORT_SPRITES[12] = LOADER.GetMapImageN(2250 + GD_HAMMER);
    TRANSPORT_SPRITES[13] = LOADER.GetMapImageN(2250 + GD_BOAT);

    //// Tooltips festlegen
    //for(unsigned i = 0;i<14;++i)
    //  tooltip_indices[i] = STD_TOOLTIP_INDICES[GAMECLIENT.visual_settings.transport_order[i]];


    // Positionen der einzelnen Buttons
    const unsigned short BUTTON_POS[14][2] =
    {
        {20, 25},
        {52, 42},
        {84, 59},
        {116, 76},
        {84, 93},
        {52, 110},
        {20, 127},
        {52, 144},
        {84, 161},
        {116, 178},
        {84, 195},
        {52, 212},
        {20, 229},
        {52, 246}
    };

    // Einstellungen festlegen
    for(unsigned char i = 0; i < 14; ++i)
        group->AddImageButton(i, BUTTON_POS[i][0], BUTTON_POS[i][1], 30, 30, TC_GREY,
                              TRANSPORT_SPRITES[GAMECLIENT.visual_settings.transport_order[i]],
                              _(TOOLTIPS[GAMECLIENT.visual_settings.transport_order[i]]));

    // Netzwerk-Übertragungs-Timer
    AddTimer(7, 2000);
}
Beispiel #11
0
/**
 *  Konstruktor von @p iwHQ.
 *
 *  @author OLiver
 */
iwBaseWarehouse::iwBaseWarehouse(GameWorldViewer* const gwv, dskGameInterface* const gi, const char* const title,
                                 unsigned char page_count,
                                 nobBaseWarehouse* wh)
    : iwWares(wh->CreateGUIID(), 0xFFFE, 0xFFFE, 167, 416, title, page_count, true, NormalFont, wh->GetInventory()), gwv(gwv), gi(gi), wh(wh)
{
    // Basisinitialisierungsänderungen
    background = LOADER.GetImageN("resource", 41);

    // Auswahl für Auslagern/Einlagern Verbieten-Knöpfe
    ctrlOptionGroup* group = AddOptionGroup(10, ctrlOptionGroup::CHECK);
    // Einlagern
    group->AddImageButton(0, 16, 335, 32, 32, TC_GREY, LOADER.GetImageN("io_new", 4), _("Collect"));
    // Auslagern
    group->AddImageButton(1, 52, 335, 32, 32, TC_GREY, LOADER.GetImageN("io", 211), _("Take out of store"));
    // Einlagern verbieten
    group->AddImageButton(2, 86, 335, 32, 32, TC_GREY, LOADER.GetImageN("io", 212), _("Stop storage"));
    // nix tun auswählen
    group->SetSelection(0);

    // Alle auswählen bzw setzen!
    AddImageButton(11, 122, 335, 32, 32, TC_GREY, LOADER.GetImageN("io", 223), _("Select all"));
    // "Gehe Zu Ort"
    AddImageButton(13, 122, 369, 15, 32, TC_GREY, LOADER.GetImageN("io", 107), _("Go to place"));
	// Go to next warehouse
	AddImageButton(14, 139, 369, 15, 32, TC_GREY, LOADER.GetImageN("io", 107), _("Go to next warehouse"));

    // Ein/Auslager Overlays entsprechend setzen
    // bei Replays die reellen Einstellungen nehmen, weils die visuellen da logischweise nich gibt!
    ctrlImage* image;
    for(unsigned char category = 0; category < 2; ++category)
    {
        unsigned count = (category == 0) ? 35 : 32;
        for(unsigned i = 0; i < count; ++i)
        {
            // Einlagern verbieten-Bild (de)aktivieren
            image = GetCtrl<ctrlGroup>(100 + category)->GetCtrl<ctrlImage>(400 + i);
            if(image)
                image->SetVisible(GAMECLIENT.IsReplayModeOn() ? wh->CheckRealInventorySettings(category, 2, i) :
                                  wh->CheckVisualInventorySettings(category, 2, i));

            // Auslagern-Bild (de)aktivieren
            image = GetCtrl<ctrlGroup>(100 + category)->GetCtrl<ctrlImage>(500 + i);
            if(image)
                image->SetVisible(GAMECLIENT.IsReplayModeOn() ? wh->CheckRealInventorySettings(category, 4, i) :
                                  wh->CheckVisualInventorySettings(category, 4, i));

            // Einlagern-Bild (de)aktivieren
            image = GetCtrl<ctrlGroup>(100 + category)->GetCtrl<ctrlImage>(700 + i);
            if(image)
                image->SetVisible(GAMECLIENT.IsReplayModeOn() ? wh->CheckRealInventorySettings(category, 8, i) :
                                  wh->CheckVisualInventorySettings(category, 8, i));
        }
    }

    // Lagerhaus oder Hafengebäude?
    if(wh->GetGOT() == GOT_NOB_STOREHOUSE || wh->GetGOT() == GOT_NOB_HARBORBUILDING)
    {

        // Abbrennbutton hinzufügen
        // "Blättern" in Bretter stauchen und verschieben
        GetCtrl<ctrlButton>(0)->SetWidth(32);
        GetCtrl<ctrlButton>(0)->Move(86, 369, true);

        AddImageButton(1, 52, 369, 32, 32, TC_GREY, LOADER.GetImageN("io",  23), _("Demolish house"));
    }
}
Beispiel #12
0
/**
 *  Konstruktor von @p iwStatistics.
 *
 *  @author jh
 */
iwStatistics::iwStatistics()
    : IngameWindow(CGI_STATISTICS, 0xFFFE, 0xFFFE, 252, 336, _("Statistics"), LOADER.GetImageN("resource", 41))
{
    activePlayers = std::vector<bool>(MAX_PLAYERS);

    // Spieler zählen
    numPlayingPlayers = 0;
    for (unsigned i = 0; i < GAMECLIENT.GetPlayerCount(); ++i)
    {
        if (GAMECLIENT.GetPlayer(i)->ps == PS_KI || GAMECLIENT.GetPlayer(i)->ps == PS_OCCUPIED)
            numPlayingPlayers++;
    }

    // Bilder für die spielenden Spieler malen (nur vier in Gebrauch, da kein einzelner Anführer auswählbar)
    unsigned short startX = 126 - (numPlayingPlayers - 1) * 17;
    unsigned pos = 0;

    for (unsigned i = 0; i < GAMECLIENT.GetPlayerCount(); ++i)
    {
        // nicht belegte Spielplätze rauswerfen
        if (!(GAMECLIENT.GetPlayer(i)->ps == PS_KI || GAMECLIENT.GetPlayer(i)->ps == PS_OCCUPIED))
        {
            activePlayers[i] = false;
            continue;
        }
        switch(GAMECLIENT.GetPlayer(i)->nation)
        {
            case NAT_AFRICANS: AddImageButton(1+i, startX + pos * 34 - 17, 45-23, 34, 47, TC_GREEN1, LOADER.GetImageN("io", 257), GAMECLIENT.GetPlayer(i)->name)->SetBorder(false);
                break;
            case NAT_JAPANESES: AddImageButton(1+i, startX + pos * 34 - 17, 45-23, 34, 47, TC_GREEN1, LOADER.GetImageN("io", 253), GAMECLIENT.GetPlayer(i)->name)->SetBorder(false);
                break;
            case NAT_ROMANS: AddImageButton(1+i, startX + pos * 34 - 17, 45-23, 34, 47, TC_GREEN1, LOADER.GetImageN("io", 252), GAMECLIENT.GetPlayer(i)->name)->SetBorder(false);
                break;
            case NAT_VIKINGS: AddImageButton(1+i, startX + pos * 34 - 17, 45-23, 34, 47, TC_GREEN1, LOADER.GetImageN("io", 256), GAMECLIENT.GetPlayer(i)->name)->SetBorder(false);
                break;
            case NAT_BABYLONIANS: AddImageButton(1+i, startX + pos * 34 - 17, 45-23, 34, 47, TC_GREEN1, LOADER.GetImageN("io_new", 7), GAMECLIENT.GetPlayer(i)->name)->SetBorder(false);
                break;
            case NAT_COUNT:
            case NAT_INVALID:
                break;
        }

        // Statistik-Sichtbarkeit abhängig von Auswahl
        switch (GAMECLIENT.GetGGS().getSelection(ADDON_STATISTICS_VISIBILITY))
        {
            default: // Passiert eh nicht, nur zur Sicherheit
                activePlayers[i] = false;

            case 0: // Alle sehen alles
            {
                activePlayers[i] = true;
            } break;
            case 1: // Nur Verbündete teilen Sicht
            {
                const bool visible = GAMECLIENT.GetLocalPlayer()->IsAlly(i);
                activePlayers[i] = visible;
                GetCtrl<ctrlImageButton>(1 + i)->Enable(visible);
            } break;
            case 2: // Nur man selber
            {
                const bool visible = (GAMECLIENT.GetPlayerID() == i);
                activePlayers[i] = visible;
                GetCtrl<ctrlImageButton>(1 + i)->Enable(visible);
            } break;
        }

        pos++;
    }

    // Statistikfeld
    AddImage(10, 11 + 115, 84 + 81, LOADER.GetImageN("io", 228));

    // Die Buttons zum Wechseln der Statistiken
    ctrlOptionGroup* statChanger = AddOptionGroup(19, ctrlOptionGroup::ILLUMINATE);
    statChanger->AddImageButton(11, 18, 250, 26, 30, TC_GREY, LOADER.GetImageN("io", 167), _("Size of country"));
    statChanger->AddImageButton(12, 45, 250, 26, 30, TC_GREY, LOADER.GetImageN("io", 168), _("Buildings"));
    statChanger->AddImageButton(13, 72, 250, 26, 30, TC_GREY, LOADER.GetImageN("io", 169), _("Inhabitants"));
    statChanger->AddImageButton(14, 99, 250, 26, 30, TC_GREY, LOADER.GetImageN("io", 170), _("Merchandise"));
    statChanger->AddImageButton(15, 126, 250, 26, 30, TC_GREY, LOADER.GetImageN("io", 171), _("Military strength"));
    statChanger->AddImageButton(16, 153, 250, 26, 30, TC_GREY, LOADER.GetImageN("io", 172), _("Gold"));
    statChanger->AddImageButton(17, 180, 250, 26, 30, TC_GREY, LOADER.GetImageN("io", 173), _("Productivity"));
    statChanger->AddImageButton(18, 207, 250, 26, 30, TC_GREY, LOADER.GetImageN("io", 217), _("Vanquished enemies"));

    // Zeit-Buttons
    ctrlOptionGroup* timeChanger = AddOptionGroup(20, ctrlOptionGroup::ILLUMINATE);
    timeChanger->AddTextButton(21, 51, 288, 43, 28, TC_GREY, _("15 m"), NormalFont);
    timeChanger->AddTextButton(22, 96, 288, 43, 28, TC_GREY, _("1 h"), NormalFont);
    timeChanger->AddTextButton(23, 141, 288, 43, 28, TC_GREY, _("4 h"), NormalFont);
    timeChanger->AddTextButton(24, 186, 288, 43, 28, TC_GREY, _("16 h"), NormalFont);

    // Hilfe-Button
    AddImageButton(25, 18, 288, 30, 32, TC_GREY, LOADER.GetImageN("io", 21), _("Help"));

    // Aktuelle Überschrift über der Statistik
    headline = AddText(30, 130, 120, _("Size of country"), MakeColor(255, 136, 96, 52),
                       glArchivItem_Font::DF_CENTER | glArchivItem_Font::DF_BOTTOM | glArchivItem_Font::DF_NO_OUTLINE, NormalFont); // qx: fix for bug #1106952

    // Aktueller Maximalwert an der y-Achse
    maxValue = AddText(31, 211, 125, "1", MakeColor(255, 136, 96, 52),
                       glArchivItem_Font::DF_RIGHT | glArchivItem_Font::DF_VCENTER, LOADER.GetFontN("resource", 0));

    // Aktueller Minimalwert an der y-Achse
    minValue = AddText(40, 211, 200, "0", MakeColor(255, 136, 96, 52),
                       glArchivItem_Font::DF_RIGHT | glArchivItem_Font::DF_VCENTER, LOADER.GetFontN("resource", 0));

    // Zeit-Werte an der x-Achse
    timeAnnotations = std::vector<ctrlText*>(7); // TODO nach oben
    for (unsigned i = 0; i < 7; ++i)
    {
        timeAnnotations[i] = AddText(32 + i, 211 + i, 125 + i, "", MakeColor(255, 136, 96, 52),
                                     glArchivItem_Font::DF_CENTER | glArchivItem_Font::DF_TOP, LOADER.GetFontN("resource", 0));
    }

    // Standardansicht: 15min / Landesgröße
    statChanger->SetSelection(11);
    currentView = STAT_COUNTRY;
    timeChanger->SetSelection(21);
    currentTime = STAT_15M;

    if (!SETTINGS.ingame.scale_statistics)
        minValue->SetVisible(false);
}