Möan.lua - A simple messagebox system.

Showcase your libraries, tools and other projects that help your fellow love users.
jdoolin
Prole
Posts: 31
Joined: Sat Nov 18, 2017 7:40 pm

Re: Möan.lua - A simple messagebox system.

Post by jdoolin »

Here's a screenshot of a MenuLayout. Inner and outer padding are customizable.
Dialog-1523221020.png
Dialog-1523221020.png (20.54 KiB) Viewed 18041 times
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Möan.lua - A simple messagebox system.

Post by yetneverdone »

jdoolin wrote: Sun Apr 08, 2018 9:07 pm Here's a screenshot of a MenuLayout. Inner and outer padding are customizable.
Dialog-1523221020.png
Woah. Thats cool. Cant wait for that lib of yours
Fantos
Prole
Posts: 11
Joined: Sat Aug 08, 2015 9:22 am

Re: Möan.lua - A simple messagebox system.

Post by Fantos »

I noticed that for some reason the first message cannot move the camera
User avatar
milk
Prole
Posts: 39
Joined: Sun Jul 17, 2016 7:20 pm

Re: Möan.lua - A simple messagebox system.

Post by milk »

Fantos wrote: Fri Apr 27, 2018 4:02 pm I noticed that for some reason the first message cannot move the camera
Should be fixed now.
User avatar
holywyvern
Prole
Posts: 8
Joined: Wed Apr 05, 2017 7:06 pm
Contact:

Re: Möan.lua - A simple messagebox system.

Post by holywyvern »

Loving this one, it's pretty usefull for any visual novel or rpg game one may want to make.
(wich is what I plan :P) and I like the RM's windowskin compatibility, wich is always a plus.
Titanor
Prole
Posts: 8
Joined: Sat Jun 30, 2018 5:57 am

Re: Möan.lua - A simple messagebox system.

Post by Titanor »

hey guys i am trying to use moan in my project but when it gets to the message box code it crashes can someone help with this
here is the error

Code: Select all

Error

Syntax error: joycon.lua:7: unexpected symbol near '<'



Traceback

[C]: at 0x7fa82417f230
[C]: in function 'require'
main.lua:3: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
and here is the code

Code: Select all

require("lovesplash/lovesplash")
require("Moan")
joycon = require("joycon")

state = "lovesplash"

function love.draw()
  if state == "lovesplash" then
    lovesplash.draw()
  else if state == "menu" then
    Moan.speak("Title", {"Hello world!", "It's me;--Möan.lua"})
  end
end
end

function love.update(dt)
  if state == "lovesplash" then
    lovesplash.update(dt)
    if lovesplash.done() then
      state = "menu"
    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
anyways thanks if you can help
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Möan.lua - A simple messagebox system.

Post by yetneverdone »

Titanor wrote: Sat Jun 30, 2018 6:21 am hey guys i am trying to use moan in my project but when it gets to the message box code it crashes can someone help with this
here is the error

Code: Select all

Error

Syntax error: joycon.lua:7: unexpected symbol near '<'



Traceback

[C]: at 0x7fa82417f230
[C]: in function 'require'
main.lua:3: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
and here is the code

Code: Select all

require("lovesplash/lovesplash")
require("Moan")
joycon = require("joycon")

state = "lovesplash"

function love.draw()
  if state == "lovesplash" then
    lovesplash.draw()
  else if state == "menu" then
    Moan.speak("Title", {"Hello world!", "It's me;--Möan.lua"})
  end
end
end

function love.update(dt)
  if state == "lovesplash" then
    lovesplash.update(dt)
    if lovesplash.done() then
      state = "menu"
    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
anyways thanks if you can help
Learn to read error messages. It says "in joycon", the moan library is not the issue. Check for that < operator
Titanor
Prole
Posts: 8
Joined: Sat Jun 30, 2018 5:57 am

Re: Möan.lua - A simple messagebox system.

Post by Titanor »

sorry wrong error log i already deleted the joycon library

Code: Select all

Error

main.lua:10: attempt to call field 'speak' (a nil value)


Traceback

main.lua:10: in function 'draw'
[C]: in function 'xpcall'
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Möan.lua - A simple messagebox system.

Post by yetneverdone »

Titanor wrote: Sat Jun 30, 2018 8:15 am sorry wrong error log i already deleted the joycon library

Code: Select all

Error

main.lua:10: attempt to call field 'speak' (a nil value)


Traceback

main.lua:10: in function 'draw'
[C]: in function 'xpcall'
That means that the "speak" function of Moan is nil (not a function or doesn't exist). Try browsing the Moan file and search for the "speak" variable

Actually, aftwr checking the repo. It should be

```
local Moan = require("moan")
```

Not

```
require("moan")
```
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Möan.lua - A simple messagebox system.

Post by grump »

yetneverdone wrote: Sat Jun 30, 2018 8:53 am Actually, aftwr checking the repo. It should be

```
local Moan = require("moan")
```

Not

```
require("moan")
```
I checked it too and Moan.lua declares a global Moan table. OP's Moan.speak call should work as is with the current Moan.lua from the repo.

Code: Select all

require('Moan')
Moan.speak('Test', { 'test' })
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 45 guests