interactive map?
- From: tom mystery antar com (tom)
- To: gtk-list redhat com
- Subject: interactive map?
- Date: 01 May 98 10:06:30 +0100
i'm currently working on a game using gtk.
i have the following problem and not much ideas how to overcome it:
one of the windows will be a map window. it's the main window actually, that's
why there's a menubar on it. so the layout roughly is:
+--------------------+
| file options help |
|--------------------|
| |
| the map |
| comes here |
| |
|--------------------|
| statusbar |
+--------------------+
the problems:
- the map is loaded from an xpm (or other image file). different maps have
different sizes. maps can be loaded without leaving this window. so how do
i find out the image size and how do i automatically resize this window
so it fits the map?
- is there a somewhat simple and elegant way to automatically scale the map
if the window is resized? to allow only proportional resizes of the window?
- how do i get events on the map? the map shall be interactive, so i have to
know that the player clicked on it, where he clicked and with what button.
but pixmaps don't seem to receive events.
- the most simple one last: if the map is so small that even after resizing
it doesn't fill all of the map-window (i.e. width is smaller than the min
width of the menubar), how do i fill the background with, say, black? i
tried it with styles, but oddly it changed the style of the menubar instead.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]