Log In  

Cart #dialog_box-0 | 2020-09-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Dialog Box Library

For Full Moon Sweet, we created a dialog box inspired by Oli414's Dialog Text Box Lib that could be used for both the intro story and the battles. All of the code for our dialog widget was pretty self-contained, so I thought I could package it up for others to use in their own games.

How to play the demo

Z = Continue Text
X = Skip to the end of the line

How to use in your game

  • Copy the dialog object from this cart and paste into your own game.
  • In your game's _update function, call dialog:update() and in the _draw function, call dialog:draw().
  • Whenever you want to show new text within your game, call dialog:queue("your text here").
  • If you want to autoplay text, you can pass "true" as the second argument to dialog:queue and it will simply add a delay between messages instead of waiting for input.
  • It is set up to queue dialog, so if you have different triggers within your game which should show text, you can queue each of those of up and it will display the text in the order you queued them.

The code for this could probably be made more efficient, so feel free to take a stab at it. Hit me up if you have any questions.

P#82185 2020-09-23 20:39 ( Edited 2020-09-23 21:58)


Wow, this could not come at a more opportune time for me. I'm starting to map out a game with a decent amount of story and this is going to save me a ton of time, so thank you!

P#82187 2020-09-23 20:59

Great timing! Hope this is helpful.

P#82188 2020-09-23 21:00

Ooh, nice!

P#82307 2020-09-26 19:49

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-13 00:03:56 | 0.010s | Q:21