Page 4 of 5
Re: Möan.lua - A simple messagebox system.
Posted: Sat Jun 30, 2018 3:52 pm
by milk
Moan.speak is used to insert a single message into the message queue, and therefore should only be called once per message - by putting Moan.speak into love.draw you are inserting new message every frame (which would probably cause the game to crash eventually)
Moan.update updates the library (which you forgot to add)
Moan.draw is used to draw the messages in the message queue
Hopefully this works (in LOVE 0.10.x) - untested btw.
Code: Select all
require("lovesplash/lovesplash")
local Moan = require("Moan")
state = "lovesplash"
function love.load()
-- Insert a message into the message queue
-- Message shown when Moan.draw called (in menu state)
Moan.speak("Title", {"Hello world!", "It's me;--Möan.lua"})
end
function love.draw()
if state == "lovesplash" then
lovesplash.draw()
else if state == "menu" then
Moan.draw()
end
end
function love.update(dt)
if state == "lovesplash" then
lovesplash.update(dt)
if lovesplash.done() then
state = "menu"
Moan.update(dt)
end
end
end
function love.keypressed()
if state == "lovesplash" then
lovesplash.stop()
else if state == "exit" then
love.event.quit()
else
end
end
end
function love.mousepressed()
if state == "lovesplash" then
lovesplash.stop()
else if state == "exit" then
love.event.quit()
else
end
end
end
Also I'd recommend reading the example main.lua (
https://github.com/ttxi/Moan.lua/blob/master/main.lua) as it shows how to use the library and is pretty heavily commented.
I apologise in advance for how awkward the library is to use - I wrote it last year when my programming skills were pretty bad, I'm planning a rewrite in the near future for LOVE 11.
Re: Möan.lua - A simple messagebox system.
Posted: Thu Dec 27, 2018 8:04 pm
by Snaker1
Just bumping to say that I really like this lib.
It is a great and lightweight way of adding message boxes to a game that looks great and does not mess with the rest of the game code. Absolutely priceless!
I recently used it for a game in Love 11.2 without any problems and with only a few tweaks, so it still a viable option.
Is there a reason why it was removed on github? Is it still worked on?
Re: Möan.lua - A simple messagebox system.
Posted: Sun Jan 06, 2019 2:06 am
by drunken_thor
Hey everyone, I went looking for this library today and found that the repo and the user's github account has been deleted so I created and mirrors the code from the original .love file in this thread
https://github.com/tanema/Moan.lua. If anyone has a more recent version of it with bug fixes please either let me know or open a PR.
Re: Möan.lua - A simple messagebox system.
Posted: Sun Jan 06, 2019 12:25 pm
by pgimeno
There's a fork here:
https://github.com/stephenwithav/Moan.lua
Maybe you can reconstruct part of the history based on that.
I hate when people do that. It shows little respect for their followers. Unfortunately this is not among the
libraries that I was keeping a mirror of because I didn't think I'd ever need it.
Re: Möan.lua - A simple messagebox system.
Posted: Sat Feb 02, 2019 5:42 am
by drunken_thor
For anyone interested in this still, I have done a rewrite of this project with a bit more design and a bit more sillyness with the name:
https://github.com/tanema/talkies
Some Changes
- eliminated all global leaking variables!
- A bit more maintainable
- less magic numbers and calculations in drawing the dialog box
- easier theming
- talking and typing sound systems so that you can multiple types of sounds.
- abstracted the key functionality out of the library so that you can manage it yourself.
- updated defaults for 11+
- added onMessage function
- Took out camera functionality because you can do the same with onstart, oncomplete functions and you shouldn't be tied to other peoples libraries.
- ability to have dialogs without images.
- better project layout so that you don't need to require a whole folder, instead just require a single file.
Re: Möan.lua - A simple messagebox system.
Posted: Sun Feb 03, 2019 1:59 pm
by 4vZEROv
Nice rework
I found some things you could work :
- playSound() and parseSpeed() are global
- indentation timer is framerate dependant
Re: Möan.lua - A simple messagebox system.
Posted: Wed Oct 09, 2019 8:28 pm
by drunken_thor
@4vZEROv Thanks I just added an update with those changes
Re: Möan.lua - A simple messagebox system.
Posted: Mon Nov 25, 2019 7:17 am
by LesbianHam
drunken_thor wrote: ↑Sat Feb 02, 2019 5:42 am
For anyone interested in this still, I have done a rewrite of this project with a bit more design and a bit more sillyness with the name:
https://github.com/tanema/talkies
Some Changes
- eliminated all global leaking variables!
- A bit more maintainable
- less magic numbers and calculations in drawing the dialog box
- easier theming
- talking and typing sound systems so that you can multiple types of sounds.
- abstracted the key functionality out of the library so that you can manage it yourself.
- updated defaults for 11+
- added onMessage function
- Took out camera functionality because you can do the same with onstart, oncomplete functions and you shouldn't be tied to other peoples libraries.
- ability to have dialogs without images.
- better project layout so that you don't need to require a whole folder, instead just require a single file.
There doesn't seem to be any sort of license as far as I can see. Can this be used commercially, and even if you're okay with that, would it then depend on how the OP feels about it, considering Talkies is based on, and pretty much is an updated version of Moan? I'd really like to avoid finding myself in any sort of legal trouble in the future. Thanks!
Re: Möan.lua - A simple messagebox system.
Posted: Mon Nov 25, 2019 9:18 am
by zorg
LesbianHam wrote: ↑Mon Nov 25, 2019 7:17 am
There doesn't seem to be any sort of license as far as I can see. Can this be used commercially, and even if you're okay with that, would it then depend on how the OP feels about it, considering Talkies is based on, and pretty much is an updated version of Moan? I'd really like to avoid finding myself in any sort of legal trouble in the future. Thanks!
Both the original and the rewrite is licensed under the MIT license; the former has a LICENSE file, the latter mentions it at the top of the talkies.lua file.
Re: Möan.lua - A simple messagebox system.
Posted: Thu Feb 06, 2020 12:58 am
by nequals30
In möan/talkies, is there a way to resize my font if I am using an imageFont?