adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] Back to coding in earnest


From: Kai Sterker
Subject: Re: [Adonthell-devel] Back to coding in earnest
Date: Mon, 7 Jun 2010 17:13:47 +0200

On Mon, Jun 7, 2010 at 1:48 AM, Josh Glover <address@hidden> wrote:

> I'm still around as well, though my cycles post-vacation have been
> consumed with looking for a job. :-/
>
> I think the XBox port will take quite awhile, so it is probably better
> for me to work on some of the things that will actually help us get
> 0.4 done and the next demo out. I should have some free coding time
> coming up, so if you want to point me at anything I can dive into,
> I'll see what I can do.

There'd be the two gui code requirements mentioned earlier:

1. Graphical border around container widgets, to make them look like
actual windows.

If you run worldtest with the test data (provided that still works),
you can walk up to the NPC and initiate dialog (space key). What you
see then is actually a fixed-size background image that gives the
impression that there is a dialog window. What we really want is to
give arbitrary sized containers a tiled background and an (optional)
border, so that we do not have to fake stuff for every UI element we
want to pop up eventually.

2. Scrolling for content of container widgets.

Currently, if the content of a container (for example a long dialogue
text with many player choices) does not fit in its container, it is
simply cut off at the bottom. What we really need is scrolling the
content (and showing an indicator, i.e. a scrollbar).


I guess the required graphics can be scavenged from v0.3 (until
somebody creates better ones). There might also be useful code in
v0.3, like tiling an image onto a larger surface:

void image::tile (const surface& src, u_int16 l, u_int16 h, u_int16 x,
u_int16 y)
{
    u_int16 posx;
    u_int16 posy;

    drawing_area da (x, y, l, h);

    for (posy = 0; posy < h; posy += src.height ())
        for (posx = 0; posx < l; posx += src.length ())
            src.draw (x + posx, y + posy, &da, this);
}

Guess that would fit nicely into the gfx::surface class of v0.4.


If you'd rather not get into messing with gfx/ui coding, there's also
the "world interaction" bit. I.e. when you hit enter in certain places
of v0.3, you'll get some remark about the object in front of your
character. We'd still need to come up with a design for such a
feature, as in v0.3 those remarks were simply tied to a location on
the map, whereas for v0.4 I think they should be tied to an actual
object.

Anyway, choice is yours :-). Let me know once you're ready, as there's
probably more information to share.

Kai



reply via email to

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