adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] User interface open items


From: Kai Sterker
Subject: Re: [Adonthell-devel] User interface open items
Date: Tue, 13 Sep 2011 10:16:44 +0200

On Mon, Sep 12, 2011 at 12:49 PM, StyxD <address@hidden> wrote:

> I implemented the bubble as a widged, right now it simply draws a
> label and a line on screen from a given point to the label. I'll use
> an image eventually, but first I'll have to come to terms with the
> decoration class.
>
> I also made another class that implements the comment logic: given a
> text and a point on the map / a placeable, it will draw the bubble
> widget, ensure it fits on screen (I had to add getters for x and y
> position of the mapview) and will update the widget's position should
> the speaker / the player character move, so that it still comes out
> from the right point.
>
> But now I'm not sure how to actually draw this on screen. It seems the
> window_manager is the way to go, but it only accepts layout objects -
> should the bubble be a layout then, containing a label and an image?

Yeah, that's how I would have envisioned it. A label and a canvas
inside a simple layout. The layout wouldn't be skinned, so it would
remain invisible. The canvas would display the image and the rest of
the speech bubble look could be achieved with fitting border and
background of the label.


> Also, since the bubble potentially may have to be moved every cycle,
> what is the good way of updating its position? Surely not removing it
> and readding it to the window_manager every time.

It seems the window manager needs a set_position method that would
allow this. You'd need a pointer to the window to move, but that
shouldn't be a problem.

Kai



reply via email to

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