示例#1
0
void EventSelectInit () {
	Winsys.ShowCursor (!param.ice_cursor);    
	EventList = Events.EventList;
	curr_event = 0;
	last_event = Events.numEvents - 1;
	CupList = Events.CupList;
	curr_cup = 0;
	last_cup = EventList[curr_event].num_cups - 1;
	curr_focus = 1;

	framewidth = 500 * param.scale;
	frameheight = 50 * param.scale;
	area = AutoAreaN (30, 80, framewidth);
	frametop1 = AutoYPosN (35);
	frametop2 = AutoYPosN (50);

	ResetWidgets ();
	AddArrow (area.right+8, frametop1, 0, 0);
	AddArrow (area.right+8, frametop1+18, 1, 0);
	AddArrow (area.right+8, frametop2, 0, 1);
	AddArrow (area.right+8, frametop2+18, 1, 1);

	int siz = FT.AutoSizeN (5);

	double len = FT.GetTextWidth (Trans.Text(9));
	AddTextButton (Trans.Text(9), area.right-len-50, AutoYPosN (70), 2, siz);
	AddTextButton (Trans.Text(8), area.left+50, AutoYPosN (70), 3, siz);

	Events.MakeUnlockList (Players.GetCurrUnlocked());
	Music.Play (param.menu_music, -1);
	g_game.loopdelay = 20;
}
void CGameConfig::Enter() {
	Winsys.ShowCursor (!param.ice_cursor);
	Winsys.KeyRepeat (true);

	for (int i=0; i<NUM_RESOLUTIONS; i++) res_names[i] = Winsys.GetResName (i);

	int framewidth = 550 * Winsys.scale;
	area = AutoAreaN (30, 80, framewidth);
	FT.AutoSizeN (4);
	dd = FT.AutoDistanceN (3);
	if (dd < 36) dd = 36;
	int rightpos = area.right -48;

	ResetGUI ();
#ifndef PANDORA
	fullscreen = AddCheckbox (area.left, area.top, framewidth-16, Trans.Text(31));
	fullscreen->checked = param.fullscreen;

	resolution = AddUpDown(rightpos, area.top+dd*1, 0, NUM_RESOLUTIONS-1, (int)param.res_type);
#endif
	mus_vol = AddUpDown(rightpos, area.top+dd*2, 0, 120, param.music_volume);
	sound_vol = AddUpDown(rightpos, area.top+dd*3, 0, 120, param.sound_volume);
	detail_level = AddUpDown(rightpos, area.top+dd*4, 1, 4, param.perf_level);
	language = AddUpDown(rightpos, area.top+dd*5, 0, (int)Trans.languages.size() - 1, (int)param.language);

	int siz = FT.AutoSizeN (5);
	textbuttons[0] = AddTextButton (Trans.Text(28), area.left+50, AutoYPosN (80), siz);
	ETR_DOUBLE len = FT.GetTextWidth (Trans.Text(8));
	textbuttons[1] = AddTextButton (Trans.Text(15), area.right-len-50, AutoYPosN (80), siz);

	Music.Play (param.config_music, -1);
}
示例#3
0
void EventInit () {
    Winsys.ShowCursor (!param.ice_cursor);

    if (g_game.prev_mode == GAME_OVER) UpdateCupRacing ();
    else InitCupRacing ();

    framewidth = 500;
    frametop = AutoYPosN (45);
    area = AutoAreaN (30, 80, framewidth);
    messtop = AutoYPosN (50);
    messtop2 = AutoYPosN (60);
    bonustop = AutoYPosN (35);
    texsize = 32 * param.scale;
    if (texsize < 32) texsize = 32;
    dist = texsize + 2 * 4;
    framebottom = frametop + ecup->num_races * dist + 10;

    ResetWidgets ();
    int siz = FT.AutoSizeN (5);
    AddTextButton (Trans.Text(8), area.left + 100, AutoYPosN (80), 1, siz);
    double len = FT.GetTextWidth (Trans.Text(13));
    AddTextButton (Trans.Text(13), area.right -len - 100, AutoYPosN (80), 0, siz);
    AddTextButton (Trans.Text(15), CENTER, AutoYPosN (80), 2, siz);

    Music.Play (param.menu_music, -1);
    if (ready < 1) curr_focus = 0;
    else curr_focus = 2;
    g_game.loopdelay = 20;
}
void CEventSelect::Enter () {
    Winsys.ShowCursor (!param.ice_cursor);
    EventList = &Events.EventList[0];
    CupList = &Events.CupList[0];

    framewidth = 500 * Winsys.scale;
    frameheight = 50 * Winsys.scale;
    area = AutoAreaN (30, 80, framewidth);
    frametop1 = AutoYPosN (35);
    frametop2 = AutoYPosN (50);

    ResetGUI();
    event = AddUpDown(area.right+8, frametop1, 0, (int)Events.EventList.size() - 1, 0);
    cup = AddUpDown(area.right+8, frametop2, 0, (int)EventList[0].cups.size() - 1, 0);

    int siz = FT.AutoSizeN (5);

    double len = FT.GetTextWidth (Trans.Text(9));
    textbuttons[0] = AddTextButton (Trans.Text(9), area.right-len-50, AutoYPosN (70), siz);
    textbuttons[1] = AddTextButton (Trans.Text(8), area.left+50, AutoYPosN (70), siz);
    SetFocus(textbuttons[1]);

    Events.MakeUnlockList (Players.GetCurrUnlocked());
    Music.Play (param.menu_music, -1);
    g_game.loopdelay = 20;
}
示例#5
0
void CEventSelect::Enter() {
	Winsys.ShowCursor(!param.ice_cursor);

	int framewidth = 500 * Winsys.scale;
	int frameheight = 50 * Winsys.scale;
	TArea area = AutoAreaN(30, 80, framewidth);
	int frametop1 = AutoYPosN(35);
	int frametop2 = AutoYPosN(50);

	ResetGUI();
	event = AddUpDown(area.right+8, frametop1, 0, (int)Events.EventList.size() - 1, 0);
	cup = AddUpDown(area.right + 8, frametop2, 0, (int)Events.EventList[0].cups.size() - 1, 0);

	unsigned int siz = FT.AutoSizeN(5);

	float len = FT.GetTextWidth(Trans.Text(9));
	textbuttons[0] = AddTextButton(Trans.Text(9), area.right-len-50, AutoYPosN(70), siz);
	textbuttons[1] = AddTextButton(Trans.Text(8), area.left+50, AutoYPosN(70), siz);
	SetFocus(textbuttons[0]);

	FT.AutoSizeN(3);
	selectEvent = AddLabel(Trans.Text(6), area.left, AutoYPosN(30), colWhite);
	selectCup = AddLabel(Trans.Text(7), area.left, AutoYPosN(45), colWhite);
	cupLocked = AddLabel(Trans.Text(10), CENTER, AutoYPosN(58), colLGrey);

	FT.AutoSizeN(4);
	selectedEvent = AddFramedText(area.left, frametop1, framewidth, frameheight, 3, colMBackgr, "", FT.GetSize(), true);
	selectedCup = AddFramedText(area.left, frametop2, framewidth, frameheight, 3, colMBackgr, "", FT.GetSize(), true);

	Events.MakeUnlockList(g_game.player->funlocked);
	Music.Play(param.menu_music, true);
}
示例#6
0
void RegistInit (void) {  
	Winsys.ShowCursor (!param.ice_cursor);    
	init_ui_snow (); 
	Music.Play (param.menu_music, -1);

	scale = param.scale;
	framewidth = (int)(scale * 280);
	frameheight = (int)(scale * 50);
	arrowwidth = 50;
	sumwidth = framewidth * 2 + arrowwidth * 2;
	area = AutoAreaN (30, 80, sumwidth);
	texsize = 128 * scale;

	ResetWidgets ();
	AddArrow (area.left + framewidth + 8, area.top, 0, 0);
	AddArrow (area.left + framewidth + 8, area.top + 18, 1, 0);
	AddArrow (area.left + framewidth * 2 + arrowwidth + 8, area.top, 0, 1);
	AddArrow (area.left + framewidth * 2 + arrowwidth + 8, area.top + 18, 1, 1);
	int siz = FT.AutoSizeN (5);
	AddTextButton ("Enter", CENTER, AutoYPosN (62), 2, siz);
	AddTextButton ("Register a new player", CENTER, AutoYPosN (70), 3, siz);

	curr_focus = 0;
	g_game.loopdelay = 10;
	CharList = Char.CharList;
	last_character = Char.numCharacters - 1;
	last_player = Players.numPlayers - 1;
	if (g_game.prev_mode == NEWPLAYER && old_last != last_player) {
		curr_player = last_player; 
	} else curr_player = g_game.start_player;
}
示例#7
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);
}
示例#8
0
void CEvent::Enter () {
	Winsys.ShowCursor (!param.ice_cursor);

	if (State::manager.PreviousState() == &GameOver) UpdateCupRacing ();
		else InitCupRacing ();

	framewidth = 500;
	frametop = AutoYPosN (45);
	area = AutoAreaN (30, 80, framewidth);
	messtop = AutoYPosN (50);
	messtop2 = AutoYPosN (60);
	bonustop = AutoYPosN (35);
	texsize = 32 * Winsys.scale;
	if (texsize < 32) texsize = 32;
	dist = texsize + 2 * 4;
	framebottom = frametop + (int)ecup->races.size() * dist + 10;

	ResetGUI ();
	int siz = FT.AutoSizeN (5);
	textbuttons[1] = AddTextButton (Trans.Text(8), area.left + 100, AutoYPosN (80), siz);
	double len = FT.GetTextWidth (Trans.Text(13));
	textbuttons[0] = AddTextButton (Trans.Text(13), area.right -len - 100, AutoYPosN (80), siz);
	textbuttons[2] = AddTextButton (Trans.Text(15), CENTER, AutoYPosN (80), siz);

	Music.Play (param.menu_music, -1);
	if (ready < 1) curr_focus = textbuttons[0]; else curr_focus = textbuttons[2];
	g_game.loopdelay = 20;
}
示例#9
0
iwMusicPlayer::iwMusicPlayer()
    : IngameWindow(CGI_MUSICPLAYER, (unsigned short) - 1, (unsigned short) - 1, 430, 330, _("Music player"),
                   LOADER.GetImageN("resource", 41)), changed(false)
{

    AddList(0, 20, 30, 330, 200, TC_GREEN1, NormalFont);
    AddText(1, 20, 240, _("Playlist:"), COLOR_YELLOW, 0, NormalFont);
    AddComboBox(2, 20, 260, 330, 22, TC_GREEN1, NormalFont, 200);

    // Playlistbuttons
    const unsigned short button_distance = 10;
    const unsigned short button_width = (330 - button_distance) / 2;
    ctrlButton* b1 = AddTextButton(3, 20, 290, button_width, 22, TC_GREEN2, _("Add"), NormalFont);
    AddTextButton(4, b1->GetX(false) + button_width + button_distance, 290, button_width, 22, TC_GREEN2, _("Remove"), NormalFont);
    //AddTextButton(5,b1->GetX(false),320,button_width,22,TC_GREEN2,_("Save"),NormalFont);
    //AddTextButton(6,b2->GetX(false),320,button_width,22,TC_GREEN2,_("Load"),NormalFont);

    // Buttons für die Musikstücke
    AddImageButton(7, 370, 30, 40, 40, TC_GREY, LOADER.GetImageN("io", 138), _("Add track"));
    AddImageButton(8, 370, 80, 40, 40, TC_GREY, LOADER.GetImageN("io_new", 2), _("Add directory of tracks"));
    AddImageButton(9, 370, 130, 40, 40, TC_RED1, LOADER.GetImageN("io", 220), _("Remove track"));
    AddImageButton(10, 370, 180, 40, 15, TC_GREY, LOADER.GetImageN("io", 33), _("Upwards"));
    AddImageButton(11, 370, 195, 40, 15, TC_GREY, LOADER.GetImageN("io", 34), _("Downwards"));
    AddDeepening(12, 370, 220, 40, 20, TC_GREY, "1", NormalFont, COLOR_YELLOW);
    AddImageButton(13, 370, 240, 20, 20, TC_RED1, LOADER.GetImageN("io", 139), _("Less repeats"));
    AddImageButton(14, 390, 240, 20, 20, TC_GREY, LOADER.GetImageN("io", 138), _("More repeats"));
    AddImageButton(15, 370, 270, 40, 40, TC_GREY, LOADER.GetImageN("io", 107), _("Playback in this order")); //225

    // Mit Werten füllen
    MUSICPLAYER.GetPlaylist().FillMusicPlayer(this);
    UpdatePlaylistCombo(SETTINGS.sound.playlist);
}
void CGameConfig::Enter() {
	Winsys.ShowCursor (!param.ice_cursor);
	Winsys.KeyRepeat (true);

	for (int i=0; i<NUM_RESOLUTIONS; i++) res_names[i] = Winsys.GetResName (i);

	int framewidth = 500 * Winsys.scale;
	area = AutoAreaN (Winsys.resolution.width < Winsys.resolution.height ? 30 : 12, 80, framewidth);
	FT.AutoSizeN (4);
	dd = FT.AutoDistanceN (4);
	if (dd < 36) dd = 36;
	int rightpos = area.right -96;

	ResetGUI ();

	vid_orient = AddUpDown(rightpos, area.top, 0, 3, param.orient);
	sensit = AddUpDown(rightpos, area.top + dd, 1, 20, param.sensit);
	mus_vol = AddUpDown(rightpos, area.top + dd * 2, 0, 120, param.music_volume);
	sound_vol = AddUpDown(rightpos, area.top + dd * 3, 0, 120, param.sound_volume);
	detail_level = AddUpDown(rightpos, area.top + dd * 4, 1, 4, param.perf_level);
	language = AddUpDown(rightpos, area.top + dd * 5, 0, (int)Trans.languages.size() - 1, (int)param.language);

	int siz = FT.AutoSizeN (5);
	textbuttons[0] = AddTextButton (Trans.Text(28), area.left+50, AutoYPosN (80), siz);
	ETR_DOUBLE len = FT.GetTextWidth (Trans.Text(15));
	textbuttons[1] = AddTextButton (Trans.Text(15), area.right-len-50, AutoYPosN (80), siz);

	Music.Play (param.config_music, -1);
}
示例#11
0
iwMusicPlayer::InputWindow::InputWindow(iwMusicPlayer* parent, const unsigned win_id, const std::string& title)
    : IngameWindow(CGI_INPUTWINDOW, (unsigned short) - 2, (unsigned short) - 2,
                   300, 100, title, LOADER.GetImageN("resource", 41), true), parent(parent), win_id(win_id)
{
    AddEdit(0, 20, 30, GetWidth() - 40, 22, TC_GREEN2, NormalFont);
    AddTextButton(1, 20, 60, 100, 22, TC_GREEN1, _("OK"), NormalFont);
    AddTextButton(2, 130, 60, 100, 22, TC_RED1, _("Abort"), NormalFont);
}
void FsGuiColorDialog::Make(FsGuiColorPalette *linkedColorPalette)
{
	this->linkedColorPalette=linkedColorPalette;

	FsGuiDialog::Initialize();

	closeBtn=AddTextButton(0,FSKEY_ESC,FSGUI_PUSHBUTTON,L"Close",YSTRUE);

	AddCustomControl(0,FSKEY_NULL,brightness,32,240,YSTRUE);

	AddCustomControl(0,FSKEY_NULL,colorBand,320,240,YSFALSE);

	AddCustomControl(0,FSKEY_NULL,curColorStatic,64,64,YSFALSE);

	hueText=AddTextBox(0,FSKEY_NULL,FsGuiTextBox::HORIZONTAL,L"H:",4,YSTRUE);
	saturationText=AddTextBox(0,FSKEY_NULL,FsGuiTextBox::HORIZONTAL,L"S:",4,YSFALSE);
	valueText=AddTextBox(0,FSKEY_NULL,FsGuiTextBox::HORIZONTAL,L"V:",4,YSFALSE);

	redText=AddTextBox(0,FSKEY_NULL,FsGuiTextBox::HORIZONTAL,L"R:",4,YSFALSE);
	greenText=AddTextBox(0,FSKEY_NULL,FsGuiTextBox::HORIZONTAL,L"G:",4,YSFALSE);
	blueText=AddTextBox(0,FSKEY_NULL,FsGuiTextBox::HORIZONTAL,L"B:",4,YSFALSE);

	AddStaticText(0,FSKEY_NULL,L"H:",YSTRUE);
	hueSlider=AddHorizontalSlider(0,FSKEY_NULL,40,0.0,1.0,YSFALSE);
	AddStaticText(0,FSKEY_NULL,L"S:",YSTRUE);
	saturationSlider=AddHorizontalSlider(0,FSKEY_NULL,40,0.0,1.0,YSFALSE);
	AddStaticText(0,FSKEY_NULL,L"V:",YSTRUE);
	valueSlider=AddHorizontalSlider(0,FSKEY_NULL,40,0.0,1.0,YSFALSE);

	AddStaticText(0,FSKEY_NULL,L"R:",YSTRUE);
	redSlider=AddHorizontalSlider(0,FSKEY_NULL,40,0.0,1.0,YSFALSE);
	AddStaticText(0,FSKEY_NULL,L"G:",YSTRUE);
	greenSlider=AddHorizontalSlider(0,FSKEY_NULL,40,0.0,1.0,YSFALSE);
	AddStaticText(0,FSKEY_NULL,L"B:",YSTRUE);
	blueSlider=AddHorizontalSlider(0,FSKEY_NULL,40,0.0,1.0,YSFALSE);

	if(NULL!=linkedColorPalette && YSTRUE==linkedColorPalette->HasColorButton())
	{
		for(int i=0; i<16; ++i)
		{
			const YSBOOL newLine=((0==i || 8==i) ? YSTRUE : YSFALSE);

			YsString str;
			str.Printf("Set C%d",i);
			setToPaletteBtn[i]=AddTextButton(0,FSKEY_NULL,FSGUI_PUSHBUTTON,str,newLine);
		}
	}
	else
	{
		for(int i=0; i<10; ++i)
		{
			setToPaletteBtn[i]=NULL;
		}
	}

	Fit();
}
示例#13
0
/**
 *  Konstruktor von @p iwOptionsWindow.
 *
 *  @author OLiver
 */
iwOptionsWindow::iwOptionsWindow(dskGameInterface* gameDesktop)
    : IngameWindow(CGI_OPTIONSWINDOW, 0xFFFF, 0xFFFF, 300, 515, _("Game menu"), LOADER.GetImageN("resource", 41))
{
    this->gameDesktop = gameDesktop;

    // Der Soldat oben
    AddImage(1, 150, 36, LOADER.GetImageN("io", 30));

    // Versionszeile
    AddVarText(2, 150, 76, _("Return To The Roots v%s-%s"), COLOR_YELLOW, glArchivItem_Font::DF_CENTER | glArchivItem_Font::DF_BOTTOM, NormalFont, 2, GetWindowVersion(), GetWindowRevisionShort());
    // Copyright
    AddVarText(3, 150, 96, _("© 2005 - %s Settlers Freaks"), COLOR_YELLOW, glArchivItem_Font::DF_CENTER | glArchivItem_Font::DF_BOTTOM, NormalFont, 1, GetCurrentYear());

    // "Tastaturbelegung"
    AddImageButton(4, 35, 120, 35, 35, TC_GREEN2, LOADER.GetImageN("io", 79));
    AddText(5, 85, 140, _("Keyboard layout"), COLOR_YELLOW, 0 | glArchivItem_Font::DF_BOTTOM, NormalFont);

    // "'Lies mich'-Datei laden"
    AddImageButton(6, 35, 160, 35, 35, TC_GREEN2, LOADER.GetImageN("io", 79));
    AddText(7, 85, 180, _("Load 'ReadMe' file"), COLOR_YELLOW, 0 | glArchivItem_Font::DF_BOTTOM, NormalFont);

    // "Spiel laden!"
    // TODO: Implement
    //AddImageButton( 8, 35, 210, 35, 35, TC_GREEN2, LOADER.GetImageN("io", 48));
    //AddText(9, 85, 230, _("Load game!"), COLOR_YELLOW, 0 | glArchivItem_Font::DF_BOTTOM, NormalFont);

    // "Spiel speichern!"
    // TODO: Move back down to y=250 (Button) 270 (Text) after Load button is implemented
    AddImageButton(10, 35, 230, 35, 35, TC_GREEN2, LOADER.GetImageN("io", 47));
    AddText(11, 85, 255, _("Save game!"), COLOR_YELLOW, 0 | glArchivItem_Font::DF_BOTTOM, NormalFont);

    // Geräusche an/aus
    AddImageButton(12, 35, 300, 35, 35, TC_GREEN2, LOADER.GetImageN("io", 114 + !SETTINGS.sound.effekte)); //-V807

    // Musik an/aus
    AddImageButton(13, 35, 340, 35, 35, TC_GREEN2, LOADER.GetImageN("io", 116 + !SETTINGS.sound.musik));

    // Geräuschlautstärke
    AddProgress(14, 100, 306, 160, 22, TC_GREEN2, 139, 138, 10)
    ->SetPosition(SETTINGS.sound.effekte_volume * 10 / 255);

    // Musiklautstärke
    AddProgress(15, 100, 346, 160, 22, TC_GREEN2, 139, 138, 10)
    ->SetPosition(SETTINGS.sound.musik_volume * 10 / 255);

    //// Music Player
    AddTextButton(16, 100, 380, 160, 22, TC_GREEN2, _("Music player"), NormalFont);

    // Advanced Options
    AddTextButton(18, 67, 412, 168, 24, TC_GREEN2, _("Advanced"), NormalFont);

    // "Spiel aufgeben"
    AddTextButton(17, 67, 443, 168, 24, TC_RED1, _("Surrender"), NormalFont);
    // "Spiel beenden"
    AddTextButton(0, 67, 474, 168, 24, TC_RED1, _("End game"), NormalFont);

}
示例#14
0
void GameConfigInit (void) {
	Winsys.ShowCursor (!param.ice_cursor);    
	Winsys.KeyRepeat (true);
	init_ui_snow (); 

	LangList = Trans.languages;
	lastLang = Trans.numLanguages - 1;

	SDL_Surface *surf = 0;
	surf = SDL_GetVideoSurface ();

	for (int i=0; i<NUM_RESOLUTIONS; i++) res_names[i] = Winsys.GetResName (i);
 
	paramchanged = false;

	// read the start params:
	curr_res = param.res_type;
	prev_res = param.res_type;
	curr_fullscreen = param.fullscreen;
	prev_fullscreen = param.fullscreen;
	curr_mus_vol = param.music_volume;
	curr_sound_vol = param.sound_volume;
	curr_detail_level = param.perf_level;
	curr_language = param.language;
	if (curr_language > lastLang) curr_language = lastLang;

	framewidth = 550 * param.scale;
	frameheight = 50 * param.scale;
	area = AutoAreaN (30, 80, framewidth);
	FT.AutoSizeN (4);
	dd = FT.AutoDistanceN (3);
	if (dd < 36) dd = 36;
	rightpos = area.right -48;

	ResetWidgets ();
	AddCheckbox (area.left, area.top, 0, framewidth-16, Trans.Text(31));
	AddArrow (rightpos, area.top+dd*1, 0, 1);
	AddArrow (rightpos, area.top+dd*1+18, 1, 1);
	AddArrow (rightpos, area.top+dd*2, 0, 2);
	AddArrow (rightpos, area.top+dd*2+18, 1, 2);
	AddArrow (rightpos, area.top+dd*3, 0, 3);
	AddArrow (rightpos, area.top+dd*3+18, 1, 3);
	AddArrow (rightpos, area.top+dd*4, 0, 4);
	AddArrow (rightpos, area.top+dd*4+18, 1, 4);
	AddArrow (rightpos, area.top+dd*5, 0, 5);
	AddArrow (rightpos, area.top+dd*5+18, 1, 5);	

	int siz = FT.AutoSizeN (5);
	AddTextButton (Trans.Text(28), area.left+50, AutoYPosN (80), 6, siz);
	double len = FT.GetTextWidth (Trans.Text(8));
	AddTextButton (Trans.Text(15), area.right-len-50, AutoYPosN (80), 7, siz);

	curr_focus = 0;
	Music.Play (param.config_music, -1);
}
void YsColorPaletteDialog::MakeDialog(class GeblGuiEditorBase *ownerIn)
{
	plt=AddColorPalette(0,FSKEY_NULL,"COLOR",255,255,255,4,YSTRUE,YSTRUE);
	savePlt=AddTextButton(0,FSKEY_NULL,FSGUI_PUSHBUTTON,"SAVE",YSTRUE);
	loadPlt=AddTextButton(0,FSKEY_NULL,FSGUI_PUSHBUTTON,"LOAD",YSFALSE);

	SetArrangeType(FSDIALOG_ARRANGE_BOTTOM_RIGHT);

	this->canvas=ownerIn;

	SetTransparency(YSTRUE);
	Fit();
}
示例#16
0
iwPlayReplay::iwPlayReplay()
    : IngameWindow(CGI_PLAYREPLAY, 0xFFFF, 0xFFFF, 600, 330, _("Play Replay"), LOADER.GetImageN("resource", 41))
{
    AddTable(0, 20, 30, 560, 220, TC_GREEN2, NormalFont, 5, _("Filename"), 300, ctrlTable::SRT_STRING, _("Stocktaking date"), 220, ctrlTable::SRT_DATE, _("Player"), 360, ctrlTable::SRT_STRING, _("Length"), 120, ctrlTable::SRT_NUMBER, "", 0, ctrlTable::SRT_DEFAULT);

    AddTextButton(2, 20, 260, 100, 22, TC_RED1, _("Clear"), NormalFont);
    AddTextButton(5, 130, 260, 160, 22, TC_RED1, "Delete Invalid", NormalFont, _("Removes all replays that cannot be loaded with the current game version"));
    AddTextButton(3, 20, 290, 160, 22, TC_RED1, _("Delete selected"), NormalFont);
    AddTextButton(4, 190, 290, 190, 22, TC_RED1, _("Back"), NormalFont);
    AddTextButton(1, 390, 290, 190, 22, TC_GREEN2, _("Start"), NormalFont);

    PopulateTable();

    GAMECLIENT.SetInterface(NULL);
}
示例#17
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);

}
示例#18
0
void CScore::Enter() {
	Winsys.ShowCursor (!param.ice_cursor);
	Winsys.KeyRepeat (true);
	Music.Play (param.menu_music, -1);

	framewidth = 550 * Winsys.scale;
	frameheight = 50 * Winsys.scale;
	frametop = AutoYPosN (32);
	area = AutoAreaN (30, 80, framewidth);
	FT.AutoSizeN (3);
	linedist = FT.AutoDistanceN (1);
	listtop = AutoYPosN (44);
	dd1 = 50 * Winsys.scale;
	dd2 = 115 * Winsys.scale;
	dd3 = 250 * Winsys.scale;
	dd4 = 375 * Winsys.scale;

	CourseList = &Course.CourseList[0];

	ResetGUI ();
	course = AddUpDown(area.right + 8, frametop, 0, (int)Course.CourseList.size()-1, 0);
	int siz = FT.AutoSizeN (5);
	textbutton = AddTextButton (Trans.Text(64), CENTER, AutoYPosN (80), siz);

	g_game.loopdelay = 1;
}
示例#19
0
/**
 *  Konstruktor von @p dskIntro.
 *
 *  @author FloSoft
 */
dskIntro::dskIntro() : Desktop(LOADER.GetImageN("menu", 0))
{
    // "Zurück"
    AddTextButton(0, 300, 550, 200, 22, TC_RED1, _("Back"), NormalFont);

    AddImage(11, 20, 20, LOADER.GetImageN("logo", 0));
}
示例#20
0
/**
 *  Konstruktor von @p iwTextfile.
 *
 *  @todo Das Fenster ist zu klein, um 80 Zeichen pro Zeile darstellen zu
 *        koennen. Ein horizontaler Scrollbalken fuer 640x480 waere nicht
 *        schlecht.
 *
 *  @author Devil
 *  @author FloSoft
 *  @author OLiver
 */
iwMissionStatement::iwMissionStatement(const std::string& title, const std::string& content)
    : IngameWindow(CGI_MISSION_STATEMENT, 0xFFFF, 0xFFFF, 640, 480, title, LOADER.GetImageN("io", 5))
{
    ctrlMultiline* text = AddMultiline(0, 10, 20, width - 20, 450, TC_GREEN2, NormalFont, glArchivItem_Font::DF_LEFT | glArchivItem_Font::DF_TOP);

    unsigned short max_line_width = 0;
    
    std::stringstream ss(content);
    std::string line;
    
    while (std::getline(ss, line, '\n'))
    {
        text->AddString(line.c_str(), COLOR_YELLOW, false); // add this line to the window contents
        unsigned short current_line_width = NormalFont->getWidth(line); // get the width of line in normal font
        if (current_line_width > max_line_width) // if wider than max, re-set max
        {
            max_line_width = current_line_width;
        }
    }

    SetWidth(max_line_width + 20 + 30); // set window width to our determined max width
    text->SetWidth(max_line_width + 30);
    
    AddTextButton(1, width / 2 - 100, 435, 200, 22, TC_GREEN2, _("Continue"), NormalFont);
}
示例#21
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);
}
YSRESULT PolyCreAboutDialog::Make(void)
{
	if(NULL==okBtn)
	{
		FsGuiDialog::Initialize();

		AddStaticText(0,FSKEY_NULL,L"Polygon Crest",YSTRUE);
		AddStaticText(0,FSKEY_NULL,L"Copyright (C) Soji Yamakawa",YSTRUE);

		YsString str;
		str.Printf("Version %d",PolygonCrestVersion);

		AddStaticText(0,FSKEY_NULL,str,YSTRUE);

		ysflightBtn=AddTextButton(0,FSKEY_NULL,FSGUI_PUSHBUTTON,L"http://www.ysflight.com",YSTRUE);

		AddStaticText(0,FSKEY_NULL,FSGUI_DLG_ABOUT_DONATELINE1,YSTRUE);
		AddStaticText(0,FSKEY_NULL,FSGUI_DLG_ABOUT_DONATELINE2,YSTRUE);

		YsLocale locale;
		const char *langStr=locale.GetLanguagePart();
		if(NULL!=langStr && 0==strncmp("ja",langStr,2))
		{
			// Japanese
			donateVectorBtn=AddTextButton(0,FSKEY_NULL,FSGUI_PUSHBUTTON,FSGUI_DLG_ABOUT_DONATEVECTOR,YSTRUE);
			AddStaticText(0,FSKEY_NULL,FSGUI_DLG_ABOUT_DONATELINE3,YSTRUE);
			donatePayPalBtn=AddTextButton(0,FSKEY_NULL,FSGUI_PUSHBUTTON,FSGUI_DLG_ABOUT_DONATEPAYPAL,YSTRUE);
		}
		else
		{
			// Non-Japanese
			donateVectorBtn=NULL;
			donatePayPalBtn=AddTextButton(0,FSKEY_NULL,FSGUI_PUSHBUTTON,FSGUI_DLG_ABOUT_DONATEPAYPAL,YSTRUE);
		}


		okBtn=AddTextButton(0,FSKEY_ENTER,FSGUI_PUSHBUTTON,FSGUI_COMMON_CLOSE,YSTRUE);

		SetArrangeType(FSDIALOG_ARRANGE_TOP_LEFT);
		SetBackgroundAlpha(1.0);
		Fit();
	}

	return YSOK;
}
示例#23
0
dskLAN::dskLAN() : dskMenuBase(LOADER.GetImageN("setup013", 0)), discovery(LAN_DISCOVERY_CFG)
{
    // "Server hinzufügen"
    AddTextButton(ID_btAddServer, DrawPoint(530, 250), Extent(250, 22), TC_GREEN2, _("Add Server"), NormalFont);
    // "Verbinden"
    AddTextButton(ID_btConnect, DrawPoint(530, 280), Extent(250, 22), TC_GREEN2, _("Connect"), NormalFont);
    // "Zurück"
    AddTextButton(ID_btBack, DrawPoint(530, 530), Extent(250, 22), TC_RED1, _("Back"), NormalFont);

    // Gameserver-Tabelle - "ID", "Server", "Karte", "Spieler", "Version"
    AddTable(ID_tblServer, DrawPoint(20, 20), Extent(500, 530), TC_GREY, NormalFont, 5, _("ID"), 0, ctrlTable::SRT_NUMBER, _("Server"), 300,
             ctrlTable::SRT_STRING, _("Map"), 300, ctrlTable::SRT_STRING, _("Player"), 200, ctrlTable::SRT_STRING, _("Version"), 100,
             ctrlTable::SRT_STRING);

    discovery.Start();

    AddTimer(ID_tmrRefreshServers, 60000); // Servers broadcast changes, so force a full update only once a minute
    AddTimer(ID_tmrRefreshList, 2000);
}
示例#24
0
/**
 *  Konstruktor von @p iwLobbyRanking.
 *
 *  @author Devil
 */
iwLobbyRanking::iwLobbyRanking(void)
	: IngameWindow(CGI_LOBBYRANKING, 0xFFFF, 0xFFFF, 440, 410, _("Internet Ranking"), LOADER.GetImageN("resource", 41), true)
{
	AddTable(0, 20, 25, 400, 340, TC_GREY, NormalFont, 4, _("Name"), 360, ctrlTable::SRT_STRING, _("Points"), 185, ctrlTable::SRT_NUMBER, _("Lost"), 215, ctrlTable::SRT_NUMBER, _("Won"), 240, ctrlTable::SRT_NUMBER);
	AddTimer(1, 60000);
	AddTimer(2, 1000);

	// "Zurück"
	AddTextButton(3, 20, 370, 400, 20, TC_RED1, _("Back"),NormalFont);
}
示例#25
0
iwPlayReplay::iwPlayReplay(void)
    : IngameWindow(CGI_PLAYREPLAY, 0xFFFF, 0xFFFF, 600, 300, _("Play Replay"), LOADER.GetImageN("resource", 41))
{
    ctrlTable* table = AddTable(0, 20, 30, 560, 220, TC_GREEN2, NormalFont, 5, _("Filename"), 300, ctrlTable::SRT_STRING, _("Stocktaking date"), 220, ctrlTable::SRT_DATE, _("Player"), 360, ctrlTable::SRT_STRING, _("Length"), 120, ctrlTable::SRT_NUMBER, "", 0, ctrlTable::SRT_DEFAULT);

    // Starten
    AddTextButton(1, 195, 260, 100, 22, TC_GREEN2, _("Start"), NormalFont);
    // Aufräumen
    AddTextButton(2, 305, 260, 100, 22, TC_RED1, _("Clear"), NormalFont);

    // Verzeichnis auflisten
    std::string tmp = GetFilePath(FILE_PATHS[51]);
    tmp += "*.rpl";
    ListDir(tmp, false, FillReplayTable, table);

    // Erst einmal nach Dateiname sortieren
    table->SortRows(0);

    GAMECLIENT.SetInterface(NULL);
}
示例#26
0
/**
 *  Konstruktor von @p iwPlayReplay.
 *
 *  @author OLiver
 */
iwSkipGFs::iwSkipGFs(void)
    : IngameWindow(CGI_SKIPGFS, 0xFFFF, 0xFFFF, 300, 110, _("Skip GameFrames"), LOADER.GetImageN("resource", 41))
{
    // Text vor Editfeld
    AddText(0, 50, 36, _("to GameFrame:"), COLOR_YELLOW, 0, NormalFont);

    // Editfeld zum Eingeben des Ziel-GF
    ctrlEdit* edit = AddEdit(1, 126, 32, 120, 20, TC_GREY, NormalFont);
    edit->SetFocus();

    // OK-Button
    AddTextButton(2, 110, 65, 80, 22, TC_GREEN2, _("OK"), NormalFont);
}
示例#27
0
/**
 *  Konstruktor von @p dskLobby.
 *
 *  @author FloSoft
 *  @author Devil
 */
dskLobby::dskLobby() : Desktop(LOADER.GetImageN("setup013", 0)), serverinfo(NULL), servercreate(NULL)
{
    // Version
    AddVarText(0, 0, 600, _("Return To The Roots - v%s-%s"), COLOR_YELLOW, 0 | glArchivItem_Font::DF_BOTTOM, NormalFont, 2, GetWindowVersion(), GetWindowRevisionShort());
    // URL
    AddText(1, 400, 600, _("http://www.siedler25.org"), COLOR_GREEN, glArchivItem_Font::DF_CENTER | glArchivItem_Font::DF_BOTTOM, NormalFont);
    // Copyright
    AddVarText(2, 800, 600, _("© 2005 - %s Settlers Freaks"), COLOR_YELLOW, glArchivItem_Font::DF_RIGHT | glArchivItem_Font::DF_BOTTOM, NormalFont, 1, GetCurrentYear());

    // "Zurück"
    AddTextButton(3, 530, 530, 250, 22, TC_RED1, _("Back"), NormalFont);
    // "Verbinden"
    AddTextButton(4, 530, 470, 250, 22, TC_GREEN2, _("Connect"), NormalFont);
    // "Internet Ranking"
    AddTextButton(5, 530, 500, 250, 22, TC_GREEN2, _("Internet Ranking"), NormalFont);
    // "Server hinzufügen"
    AddTextButton(6, 530, 440, 250, 22, TC_GREEN2, _("Add Server"), NormalFont);

    // Gameserver-Tabelle - "ID", "Server", "Karte", "Spieler", "Version", "Ping"
    AddTable(10, 20, 20, 500, 262, TC_GREY, NormalFont, 6, _("ID"), 0, ctrlTable::SRT_NUMBER, _("Server"), 300, ctrlTable::SRT_STRING, _("Map"), 300, ctrlTable::SRT_STRING, _("Player"), 200, ctrlTable::SRT_NUMBER, _("Version"), 100, ctrlTable::SRT_STRING, _("Ping"), 100, ctrlTable::SRT_NUMBER);
    // Spieler-Tabelle - "Name", "Punkte", "Version"
    AddTable(11, 530, 20, 250, 410, TC_GREY, NormalFont, 3, _("Name"), 500, ctrlTable::SRT_STRING, _("Points"), 250, ctrlTable::SRT_STRING, _("Version"), 250, ctrlTable::SRT_STRING);

    // Chatfenster
    AddChatCtrl(20, 20, 290, 500, 238, TC_GREY, NormalFont);
    // Chatfenster-Edit
    AddEdit(21, 20, 530, 500, 22, TC_GREY, NormalFont);

    AddTimer(30, 5000);

    UpdateServerList(true);
    UpdatePlayerList(true);

    LOBBYCLIENT.SetInterface(this);
    LOBBYCLIENT.SendServerListRequest();
    LOBBYCLIENT.SendPlayerListRequest();

    GAMECLIENT.SetInterface(this);
}
示例#28
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));
}
示例#29
0
void CNewPlayer::Enter() {
	Winsys.ShowCursor(!param.ice_cursor);
	Music.Play(param.menu_music, true);

	int framewidth = 400 * Winsys.scale;
	int frameheight = 50 * Winsys.scale;
	int frametop = AutoYPosN(38);
	TArea area = AutoAreaN(30, 80, framewidth);
	int prevoffs = 80;
	prevleft = area.left + prevoffs;
	prevtop = AutoYPosN(52);
	prevwidth = 75 * Winsys.scale;

	ResetGUI();

	avatar = AddUpDown(area.left + prevwidth + prevoffs + 8, prevtop, 0, (int)Players.numAvatars() - 1, 0, prevwidth - 34);
	int siz = FT.AutoSizeN(5);
	textbuttons[0] = AddTextButton(Trans.Text(8), area.left+50, AutoYPosN(70), siz);
	float len = FT.GetTextWidth(Trans.Text(15));
	textbuttons[1] = AddTextButton(Trans.Text(15), area.right-len-50, AutoYPosN(70), siz);

	textfield = AddTextField(emptyString, area.left, frametop, framewidth, frameheight);
}
示例#30
0
void CRegist::Enter (void) {
	Winsys.ShowCursor (!param.ice_cursor);
	Music.Play (param.menu_music, -1);

	scale = Winsys.scale;
	framewidth = (int)(scale * 280);
	frameheight = (int)(scale * 50);
	arrowwidth = 50;
	sumwidth = framewidth * 2 + arrowwidth * 2;
	area = AutoAreaN (30, 80, sumwidth);
	texsize = 128 * scale;

	ResetGUI ();
	player = AddUpDown(area.left + framewidth + 8, area.top, 0, (int)Players.numPlayers() - 1, (int)g_game.start_player);
	character = AddUpDown(area.left + framewidth * 2 + arrowwidth + 8, area.top, 0, (int)Char.CharList.size() - 1, 0);
	int siz = FT.AutoSizeN (5);
	textbuttons[0] = AddTextButton (Trans.Text(60), CENTER, AutoYPosN (62), siz);
	textbuttons[1] = AddTextButton (Trans.Text(61), CENTER, AutoYPosN (70), siz);

	g_game.loopdelay = 10;
	if(Char.CharList.empty())
		Winsys.Terminate(); // Characters are necessary - ETR is unusable otherwise
}