TeamSweepy / Greywater

Repo for Greywater Isometric RPG
2 stars 0 forks source link

Dialogs #12

Closed Jeremy-Barnes closed 10 years ago

Jeremy-Barnes commented 10 years ago

We need a way to support generic dialog boxes that allow you to feed in a string or series of strings and it will word wrap them to the size of the dialog.

This will be for quest text, character interaction, etc.

Example - World of Warcraft uses the same scrollable box for all quest-introductions, and they just dump text in it. Ideally, this will read from some kind of HTML file or other markup file so that we can type quests in .HTML or similar format and just load that file in in realtime.

http://www.stormthecastle.com/warcraft/images/tutorial/a-threat-within-first-quest.jpg

Biodiscus commented 10 years ago

I don't know if libgdx has a textfield which parses html. But if there is no way of doing that, this article might be handy http://nitrod.hubpages.com/hub/html-in-java

Jeremy-Barnes commented 10 years ago

I don't know either. I won't have time to play with it for awhile, I am spending the next two days getting the camera to work properly and then I am going to implement sound and attacking.

Can you look into it some if you get time?

Biodiscus commented 10 years ago

Sure

Jeremy-Barnes commented 10 years ago

Looks like Ziga will take this one, here's a helpful link for him.

http://stackoverflow.com/questions/12466385/how-can-i-draw-text-using-libgdx-java

Jeremy-Barnes commented 10 years ago

This might do everything we need, if someone can take the time to investigate

http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/Label.html

Biodiscus commented 10 years ago

We don't use scene2d so I don't think this will work

Jeremy-Barnes commented 10 years ago

It doesn't look like it really depends on the rest of scene2d, you draw it with a SpriteBatch same as everything else. I haven't tried it though, so I don't know with any certainty.

Jeremy-Barnes commented 10 years ago

Ah, nope, it doesn't have a way to set X and Y. You're right.

Biodiscus commented 10 years ago

So I tried FreeTypeFontGenerator, and it just wouldn't work. It gives me errors when running, so that won't work :(

Biodiscus commented 10 years ago

Currently there is a sprite class which can accept animations. Can we have a Sprite base class with just sprite rendering, and an animation sprite class. This way there can be a ninepatch sprite class so I don't have to override the main render method to let display it.

Jeremy-Barnes commented 10 years ago

Done and done.