Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] (PR#7387) Unified overview broke win32 client
Home

[Freeciv-Dev] (PR#7387) Unified overview broke win32 client

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7387) Unified overview broke win32 client
From: "James Canete" <use_less@xxxxxxxxxxx>
Date: Sat, 7 Feb 2004 16:21:41 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7387 >

>  - fill the overview.window field (see client/mapview_common.h): this
>  field contains a canvas store which represents the window. The common
>  code will copy (using gui_copy_canvas) areas from the backing store
>  to this window to draw the overview.
> 

I filled this field in the function init_overview_win() in
client/gui-win32/mapview.c .  This is called near the end of
create_main_window() in client/gui-win32/gui_main.c .

> I don't see why you have to change code which draws indicators.
> 

I moved the indicator drawing code because previously it was part of the
overview drawing code.  Before the patch, the overview was simply drawn
in the main window at the appropriate position.  I created a separate
window for it in init_overview_win() so I could get an hdc to supply to
a canvas store.  I separated the main window painting code (which was
originally part of overview_expose() ) into mainwin_paint().

It works most of the time, but sometimes the indicators disappear.  Also
non-iso tilesets are broken, though I'm not sure if that's my fault or
not. :) Especially in the city popup, where the city doesn't show up at
all with a non-iso tileset.

Anyway, latest version, moved overview_wnd_proc() into
client/gui-win32/mapctrl.c and added another function,
init_overviewwindow(), right after it, where I now do the wndclass
declaration for the overview window.  This strikes me as a bit of a bad
naming scheme, though, because it could easily be mistaken for
init_overview_win().  But then, so could init_mapwindow() be mistaken
for init_map_win(), which were both already in the code.

-James Canete

Attachment: unifyoverview-fixwin32-4.diff
Description: Binary data


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