----- Kurosu <kur...@free.fr> a écrit :
> What's your resolution? The team selection menu is the only place in
> 480x320 I have noticed so far to be that unpractical. For such
> resolution, it'll probably have to become a list rather than the 2D box.
I've seen your picture, and get what you mean now. I'll really have to use new
widgets to display things to fit in 480x320.
As I can't commit it right now, see menu_fix.diff attached.
> Indeed. Meanwhile, you can click on the weapon icon in the interface at
> the bottom (even if the 'scroll on border' icon appears).
Anyway, fixed 2 bugs in there:
- kinetic drag would eat "button A click down/button B click up"; it only eat
that if A==B==LEFT
- Interface could only be clicked with LEFT click, while there we're not
supposed to care
See mouse_fix.diff for the correction.
Christophe
Index: src/interface/mouse.cpp
===================================================================
--- src/interface/mouse.cpp (revision 7812)
+++ src/interface/mouse.cpp (working copy)
@@ -206,11 +206,10 @@
}
if (event.type == SDL_MOUSEBUTTONUP) {
- if (mouse_button_down_pos.Distance(GetPosition()) > MOUSE_CLICK_DISTANCE) {
+ if (Interface::GetInstance()->ActionClick(GetPosition()))
return true;
- }
if (event.button.button == Mouse::BUTTON_LEFT()) {
- if (Interface::GetInstance()->ActionClick(GetPosition()))
+ if (mouse_button_down_pos.Distance(GetPosition()) > MOUSE_CLICK_DISTANCE)
return true;
}
}
Index: src/menu/help_menu.cpp
===================================================================
--- src/menu/help_menu.cpp (revision 7812)
+++ src/menu/help_menu.cpp (working copy)
@@ -68,7 +68,6 @@
int offset_x = (GetMainWindow().GetWidth()-img_keyboard->GetWidth()) / 2;
int offset_y = (GetMainWindow().GetHeight() - 25 - img_keyboard->GetHeight())/2;
- printf("Offset: %i,%i\n", offset_x, offset_y);
img_keyboard->Blit(GetMainWindow(), offset_x, offset_y);
const uint MIDDLE_X = 64;
Index: src/menu/teams_selection_box.cpp
===================================================================
--- src/menu/teams_selection_box.cpp (revision 7812)
+++ src/menu/teams_selection_box.cpp (working copy)
@@ -36,7 +36,7 @@
#include <iostream>
TeamsSelectionBox::TeamsSelectionBox(const Point2i &_size, bool network, bool w_border) :
- HBox(_size.y, w_border)
+ HBox(_size.y+10, w_border)
{
if (!w_border)
SetNoBorder();
@@ -58,7 +58,7 @@
AddWidget(tmp);
uint teams_box_w = _size.x - local_teams_nb->GetSizeX() - 10;
- Point2i team_box_size(teams_box_w / (MAX_NB_TEAMS /2) - 10, _size.y/2-15);
+ Point2i team_box_size(teams_box_w / (MAX_NB_TEAMS /2) - 10, _size.y/2-10);
Box * teams_grid_box = new GridBox(2, 2, 10, false);
teams_grid_box->SetNoBorder();
Index: src/menu/game_menu.cpp
===================================================================
--- src/menu/game_menu.cpp (revision 7812)
+++ src/menu/game_menu.cpp (working copy)
@@ -37,7 +37,7 @@
static const uint MARGIN_SIDE = 5;
static const uint MARGIN_BOTTOM = 50;
-static const uint TEAMS_BOX_H = 230;
+static const uint TEAMS_BOX_H = 240;
// ################################################
// ## GAME MENU CLASS
_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev