0

I am currently working on a Java 2D MMORPG using LibGDX. I made a chat box completely from scratch using SpriteBatch drawing,it includes a text field to enter a new message to chat and a scroll to scroll through the chat. The only problem is that it doesn't look and feel very professional.

What I want to do is use Scene2D for the text field and the scroll. Can I use SpriteBatch and put Scene2D elements on top of it?

Also for the scroll view, I have a custom way of drawing text. I made it so that I can put color codes such as "&y" for example to change the color to yellow. Can I use SpriteBatch to draw text into a scroll view using BitmapFont and be able to scroll through the it?

Thanks in advance! If you need more info, just ask me!

vedi0boy
  • 1,030
  • 4
  • 11
  • 32
  • Actually, SpriteBatch is used also to draw scene2d stuff, but I think what you're asking is if you can draw with and without scene2d in the same screen, right? You can draw your "regular" stuff, along with `spriteBatch.end`, and then call `stage.draw` to have your scene2d drawn right over everything else. Your second question can surely be done, although I haven't made custom scene2d.ui widgets before, which is what you'll need to do to wrap your special type of text class. – Tenfour04 Nov 10 '14 at 13:36
  • Ok thanks for your help! I'll look into custom UI. I'll ask if I need help. – vedi0boy Nov 10 '14 at 22:38

0 Answers0