glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] Re: I am taking upon the task as to redesign the map e


From: Stéphane Magnenat
Subject: Re: [glob2-devel] Re: I am taking upon the task as to redesign the map editor
Date: Wed, 29 Mar 2006 10:32:34 +0200
User-agent: Thunderbird 1.5 (Windows/20051201)

Well,

Some clarification apply here!

First, if you want to redo the map editor, it is about MapEdit class and not GameGUI class.

The reason why GameGUI doesn't use libgag is that it predates libgag widgets.

As I've said, I've planned to use libgag in the MapEdit rewrite. I haven't started yet as I've been working with Nuage on the Unit allocator rewrite (remember, you all wanted it).

If anyone wants to help with the MapEdit rewrite, fine. We nevertheless need to be sure we agree with the basis :

- A top bar that has buttons such as units, buildings, ... I planned not to put text on them but rather having a help line in the lower part of the screen that always display help on the element under the mouse cursor. To that end, I was planning to add to any RectangularWidget the ability to link to a TextSettable widget (a new interface which will be inherited by any Text, TextInput, TextButton and TextArea). This will allow clean connection of widget to help text.

class RectangularWidget
{
...
public:
void setTooltipWidget(TextSettable *tooltipWidget, const std::string &tooltipMessage);
...
};

class TextSettable
{
public:
        virtual ~TextSettable() { }
        virtual void setText(const std::string &text) = 0;
};

- When a button in the top bar is clicked, a context menu, inherited from OverlayScreen, is displayed. A keyboard shortcut can also trigger the menu. In this case, it appears just under the mouse.

- The top bar must allow to choose the team and add/remove teams, as well as choose the brush size in case of areas.

- The basic data structure of the map editor can stay, as it is quite simple. I was thinking of beginning to add the bar, write new popup menus, and, when they work, remove the right panel. This would allow a smooth transition.

Just a final note for people who love to insult our code: try to code a project of this size during more than 6 years, and we'll talk about all this afterwards.

Steph




reply via email to

[Prev in Thread] Current Thread [Next in Thread]