Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] tile_visible_and_not_on_border_mapcanvas
Home

[Freeciv-Dev] tile_visible_and_not_on_border_mapcanvas

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx, bursig@xxxxxxxxx
Subject: [Freeciv-Dev] tile_visible_and_not_on_border_mapcanvas
From: Jason Dorje Short <vze49r5w@xxxxxxxxxxx>
Date: Sun, 24 Nov 2002 18:33:17 -0500
Reply-to: jdorje@xxxxxxxxxxxxxxxxxxxxx

The SDL client has a problem with tile_visible_and_not_on_border_mapcanvas. The problem is that the canvas has "holes" in it. These happen because the mapcanvas covers the whole screen (or window), and dialogs/menus/buttons pop up within this area that cover it. tile_visible_and_not_on_border_mapcanvas needs to return FALSE if the area is behind (or perhaps close to) one of these widgets.


Raimar and I agreed on a solution:

tile_visible_mapcanvas and tile_visible_and_not_on_border_mapcanvas will move into mapview_common.

A new function will be provided for GUIs to use. The name has not yet been decided, but something like

  bool area_visible_and_not_on_border_mapcanvas(int canvas_x,
                                                int canvas_y,
                                                int canvas_width,
                                                int canvas_height);

which you should easily be able to use to determine if the region is near or behind a dialog or menu. This function will be called by tile_visible_and_not_on_border_mapcanvas _after_ all other checks have been done, so you don't need to worry about them.

If necessary a similar function will be used by tile_visible_mapcanvas.

How does this sound?  And, does anyone have a better naming suggestion?

jason



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