[Top][All Lists]

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

Re: [Adonthell-devel] User interface open items

From: StyxD
Subject: Re: [Adonthell-devel] User interface open items
Date: Tue, 14 Feb 2012 12:27:58 +0100

> So maybe we also need a mapview_move event?
> It might be worth thinking about that a bit more. Maybe the mapview
> and window_manager need to be coupled more tightly. Right now, the
> mapview is kind of a background for the window_manager, but maybe it
> should be more something like a root window. And if the window_manager
> had knowledge of the mapview, we could implement "mapview-relative"
> windows/popups, whose real coordinates would be in world space. In
> window_manager::update, these could then be transformed into screen
> space for each frame. That could simplify the bubbles a bit, as they
> could use the same coordinate system as the character they belong to.
> And the mapview-relative kind of windows could be useful for other
> things too: all sorts of indicators, i.e. to mark attack targets, show
> health remaining or damage taken, etc.
> What do you think?

Yeah, it seems mapview-relative coordinates would simplify things a
lot for widgets bound to map objects. I was doing the translation
manually, but with more widgets that would soon become cumbersome.

It would also solve the problem of widgets going out of sync with the
mapview once and for all.

I suppose it could be done with a bool variable in manager_child and a
mapview variable in window_manager. I'm not sure what would set the
latter - is changing mapviews managed by schedules?

Also, we'd need to consider, whether the mapview should be optional in
window_manager, so that it would still work in cases when there's no
mapview, like main menu. It would probably mean some kind of exception
should be returned when the user tries to add a mapview-relative
window when the mapview is not set.

reply via email to

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