Commit c18d3dc6 authored by Romain Bignon's avatar Romain Bignon

enhancement of interface display

parent 45f68a18
Pipeline #8 failed with stages
This diff is collapsed.
......@@ -410,7 +410,7 @@ void TConfigForm::SetRelativePositions()
CancelButton->SetXY(Window()->GetWidth() - OkButton->Width() - 20,
OkButton->Y() + OkButton->Height());
int x = Window()->GetWidth()/2 - 100;
int x = Window()->GetWidth()/2 - 50;
NickInfo->SetX(x);
Nick->SetX(x);
Color->SetX(x);
......
......@@ -1622,13 +1622,16 @@ TGameInfosForm::TGameInfosForm(ECImage* w, EC_Client* cl, bool _mission)
PretButton->SetEnabled(false);
PretButton->SetImage(new ECSprite(Resources::ReadyButton(), Video::GetInstance()->Window()));
PretButton->SetHint(_("Are you ready ?"));
PretButton->SetAlwaysRedraw();
RetourButton = AddComponent(new TButton(right_x+PretButton->Width(),110,150,50));
RetourButton->SetImage(new ECSprite(Resources::BackButton(), Video::GetInstance()->Window()));
RetourButton->SetHint(_("Leave game"));
CreateIAButton = AddComponent(new TButton(right_x,210,150,50));
RetourButton->SetAlwaysRedraw();
CreateIAButton = AddComponent(new TButton(right_x + PretButton->Width()/2,110+4*PretButton->Height()/5,150,50));
CreateIAButton->Hide();
CreateIAButton->SetImage(new ECSprite(Resources::AIButton(), Video::GetInstance()->Window()));
CreateIAButton->SetHint(_("Add an artificial player (an AI) in game"));
CreateIAButton->SetAlwaysRedraw();
MapList = AddComponent(new TListBox(Rectanglei(right_x, CreateIAButton->Y()+CreateIAButton->Height(), 200, 160)));
MapList->SetOnChange(TGameInfosForm::MapListChange);
......
......@@ -606,7 +606,7 @@ TListServerForm::TListServerForm(ECImage* w)
RetourButton = AddComponent(new TButton(RefreshButton->X()+RefreshButton->Width(),RegisterButton->Y()+RegisterButton->Height(),150,50));
RetourButton->SetImage(new ECSprite(Resources::BackButton(), Video::GetInstance()->Window()));
OnlyOfficials = AddComponent(new TCheckBox(Font::GetInstance(Font::Normal), button_x, ServerList->Y()+ServerList->Height()-20, _("Show only official servers"), white_color));
OnlyOfficials = AddComponent(new TCheckBox(Font::GetInstance(Font::Normal), button_x, ServerList->Y()+ServerList->Height()-20, _("Official servers only"), white_color));
OnlyOfficials->SetOnClick(TListServerForm::SetOnlyOfficials, this);
OnlyOfficials->Check();
......
......@@ -332,22 +332,27 @@ TMainForm::TMainForm(ECImage* w)
CreditsButton = AddComponent(new TButton(300,390, 150,50));
CreditsButton->SetImage(new ECSprite(Resources::CreditsButton(), Video::GetInstance()->Window()));
CreditsButton->SetHint(_("Credits"));
CreditsButton->SetAlwaysRedraw();
QuitterButton = AddComponent(new TButton(300,470, 150,50));
QuitterButton->SetImage(new ECSprite(Resources::QuitButton(), Video::GetInstance()->Window()));
QuitterButton->SetHint(_("Exit"));
QuitterButton->SetAlwaysRedraw();
PlayButton = AddComponent(new TButton(300,150, 150,50));
PlayButton->SetImage(new ECSprite(Resources::PlayButton(), Video::GetInstance()->Window()));
PlayButton->SetHint(_("Play a game"));
PlayButton->SetAlwaysRedraw();
OptionsButton = AddComponent(new TButton(300,230, 150,50));
OptionsButton->SetImage(new ECSprite(Resources::OptionsButton(), Video::GetInstance()->Window()));
OptionsButton->SetHint(_("Options"));
OptionsButton->SetAlwaysRedraw();
MapEditorButton = AddComponent(new TButton(300,310, 150,50));
MapEditorButton->SetImage(new ECSprite(Resources::MapEditorButton(), Video::GetInstance()->Window()));
MapEditorButton->SetHint(_("Map Editor"));
MapEditorButton->SetAlwaysRedraw();
Title = AddComponent(new TImage(300, 100, Resources::Title(), false));
......@@ -421,13 +426,13 @@ TCredits::TCredits(ECImage* w)
Title->SetXY(Width()/2 - Title->Width()/2, 50);
Label1 = AddComponent(new TLabel(Title->Y()+Title->Height()+10,"Romain Bignon", red_color, Font::GetInstance(Font::Big)));
Label2 = AddComponent(new TLabel(Label1->Y()+Label1->Height(),_("* Programmer"), red_color, Font::GetInstance(Font::Big)));
Label2 = AddComponent(new TLabel(Label1->Y()+Label1->Height(),_("* Main developer"), red_color, Font::GetInstance(Font::Big)));
Label3 = AddComponent(new TLabel(50,Label2->Y()+Label2->Height()+30,"Thomas Tourrette", fgreen_color, Font::GetInstance(Font::Big)));
Label4 = AddComponent(new TLabel(50,Label3->Y()+Label3->Height(),_("* \"Graphic artist\""), fgreen_color, Font::GetInstance(Font::Big)));
Label5 = AddComponent(new TLabel(SCREEN_WIDTH-300,Label2->Y()+Label2->Height()+30,"Mathieu Nicolas", fwhite_color, Font::GetInstance(Font::Big)));
Label6 = AddComponent(new TLabel(SCREEN_WIDTH-300,Label3->Y()+Label3->Height(),_("* Idea"), fwhite_color, Font::GetInstance(Font::Big)));
Label6 = AddComponent(new TLabel(SCREEN_WIDTH-300,Label3->Y()+Label3->Height(),_("* Concept"), fwhite_color, Font::GetInstance(Font::Big)));
OkButton = AddComponent(new TButton(SCREEN_WIDTH/2-31,SCREEN_HEIGHT-100, 150,50));
OkButton->SetImage(new ECSprite(Resources::BackButton(), Video::GetInstance()->Window()));
......@@ -435,14 +440,10 @@ TCredits::TCredits(ECImage* w)
Memo = AddComponent(new TMemo(Font::GetInstance(Font::Normal), 50, Label6->Y()+Label6->Height()+30, SCREEN_WIDTH-50-50,
SCREEN_HEIGHT-(Label6->Y()+Label6->Height()+30)-OkButton->Height()-20, 0, false));
Memo->SetShadowed();
Memo->AddItem(_("Contributors:\n"
Memo->AddItem(_("Thanks to:\n"
"\n"
"=Programming=\n"
"- lodesi: patches for defense tower and other effects.\n"
"- phh: patch for the plane.\n"
"\n"
"=Others=\n"
"- Anicée: for her voice.\n"
"- pankkake, Zic, Nico, Mathieu and Thomas who have tested the game."), white_color);
Memo->ScrollUp();
......
src/data/anims/creditsbutton/down.png

19.5 KB | W: | H:

src/data/anims/creditsbutton/down.png

18.4 KB | W: | H:

src/data/anims/creditsbutton/down.png
src/data/anims/creditsbutton/down.png
src/data/anims/creditsbutton/down.png
src/data/anims/creditsbutton/down.png
  • 2-up
  • Swipe
  • Onion skin
src/data/anims/creditsbutton/up.png

19.4 KB | W: | H:

src/data/anims/creditsbutton/up.png

18.4 KB | W: | H:

src/data/anims/creditsbutton/up.png
src/data/anims/creditsbutton/up.png
src/data/anims/creditsbutton/up.png
src/data/anims/creditsbutton/up.png
  • 2-up
  • Swipe
  • Onion skin
src/data/anims/mapeditorbutton/down.png

22.1 KB | W: | H:

src/data/anims/mapeditorbutton/down.png

21.4 KB | W: | H:

src/data/anims/mapeditorbutton/down.png
src/data/anims/mapeditorbutton/down.png
src/data/anims/mapeditorbutton/down.png
src/data/anims/mapeditorbutton/down.png
  • 2-up
  • Swipe
  • Onion skin
src/data/anims/optionsbutton/down.png

22.7 KB | W: | H:

src/data/anims/optionsbutton/down.png

21.9 KB | W: | H:

src/data/anims/optionsbutton/down.png
src/data/anims/optionsbutton/down.png
src/data/anims/optionsbutton/down.png
src/data/anims/optionsbutton/down.png
  • 2-up
  • Swipe
  • Onion skin
src/data/anims/optionsbutton/up.png

22.8 KB | W: | H:

src/data/anims/optionsbutton/up.png

22.1 KB | W: | H:

src/data/anims/optionsbutton/up.png
src/data/anims/optionsbutton/up.png
src/data/anims/optionsbutton/up.png
src/data/anims/optionsbutton/up.png
  • 2-up
  • Swipe
  • Onion skin
src/data/anims/playbutton/down.png

15.6 KB | W: | H:

src/data/anims/playbutton/down.png

15 KB | W: | H:

src/data/anims/playbutton/down.png
src/data/anims/playbutton/down.png
src/data/anims/playbutton/down.png
src/data/anims/playbutton/down.png
  • 2-up
  • Swipe
  • Onion skin
src/data/anims/playbutton/up.png

15.3 KB | W: | H:

src/data/anims/playbutton/up.png

14.7 KB | W: | H:

src/data/anims/playbutton/up.png
src/data/anims/playbutton/up.png
src/data/anims/playbutton/up.png
src/data/anims/playbutton/up.png
  • 2-up
  • Swipe
  • Onion skin
src/data/anims/quitbutton/down.png

22.7 KB | W: | H:

src/data/anims/quitbutton/down.png

21.5 KB | W: | H:

src/data/anims/quitbutton/down.png
src/data/anims/quitbutton/down.png
src/data/anims/quitbutton/down.png
src/data/anims/quitbutton/down.png
  • 2-up
  • Swipe
  • Onion skin
src/data/anims/quitbutton/up.png

22.7 KB | W: | H:

src/data/anims/quitbutton/up.png

21.4 KB | W: | H:

src/data/anims/quitbutton/up.png
src/data/anims/quitbutton/up.png
src/data/anims/quitbutton/up.png
src/data/anims/quitbutton/up.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -47,13 +47,13 @@ void TComboBox::Init()
// FIXME: What does 13 mean ?
Rectanglei r(0, 0, Width()-13, COMBOBOX_HEIGHT);
box_color = BoxColor.WithAlpha(0xff);
edit_bg.SetImage(SDL_CreateRGBSurface( SDL_HWSURFACE|SDL_SRCALPHA, Width()-13, COMBOBOX_HEIGHT,
32, 0x000000ff, 0x0000ff00, 0x00ff0000,0xff000000));
edit_bg.FillRect(r, edit_bg.MapColor(BoxColor));
edit_bg.RectangleColor(r, white_color);
box_color = BoxColor;
TListBox::Init();
}
......@@ -146,7 +146,7 @@ bool TComboBox::Clic (const Point2i& mouse, int button)
r = true;
}
if(opened && (want_close || (!r && !Mouse(mouse))))
if(opened && (want_close || !r))
SetOpened(false), r = true;
return r;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment