Search found 51 matches

by Lucyy
Tue Aug 17, 2021 1:41 pm
Forum: Libraries and Tools
Topic: LövelyToasts: Toast messages!
Replies: 17
Views: 24685

Re: LövelyToasts: Toast messages!

So, bumping this thread because I think it needs bumping. :) This library is neat and I've used it a lot. I suddenly came up with an incompatibility with another module and since I've nutted it out, I thought i would post here. When lovelytoast draws a toast message, it correctly takes love.graphic...
by Lucyy
Mon Jun 21, 2021 10:13 am
Forum: Support and Development
Topic: Issue with music not playing
Replies: 5
Views: 6950

Re: Issue with music not playing

Update..! the audio works fine when I don't have my AirPods connected to my laptop, but the moment they're connected I cannot hear the music anymore
by Lucyy
Mon Jun 21, 2021 8:40 am
Forum: Support and Development
Topic: Issue with music not playing
Replies: 5
Views: 6950

Re: Issue with music not playing

I can hear your file too. My minimal code: function love.load() source = love.audio.newSource("Ye-Olde-Pub_Looping.mp3", "stream") -- https://soundimage.org/fantasy-11/ n_loops = 0 end function love.update(dt) if not source:isPlaying( ) then n_loops = n_loops+1 love.audio.play( ...
by Lucyy
Mon Jun 21, 2021 7:45 am
Forum: Support and Development
Topic: Issue with music not playing
Replies: 5
Views: 6950

Issue with music not playing

Hi! I'm trying to play music in my game but so far nothing is playing regardless of what audio format I try to use. I've attached a minimal .love file if someone could help me out main.lua Sound = require("lib.sound") function love.load() Sound:init("bg", "assets/sounds/bg.m...
by Lucyy
Thu May 20, 2021 11:25 am
Forum: Libraries and Tools
Topic: LövelyToasts: Toast messages!
Replies: 17
Views: 24685

Re: LövelyToasts: Toast messages!

The REQUIRE is at the top of the file (of course) so the width is 800 by default. Later on, in LOVE.LOAD() I do a setmode to 1920 but it's too late. LovelyToasts has already captured 800 and continues to use 800. My hack (for now) is to move those two declarations above lovelyToasts, which is a bit...
by Lucyy
Thu May 20, 2021 11:04 am
Forum: Libraries and Tools
Topic: LövelyToasts: Toast messages!
Replies: 17
Views: 24685

Re: LövelyToasts: Toast messages!

garrGameMessageLog is my array that stores all the messages (toast) I want to display. If a message is queued then I send it to lovelyToasts (which has it's own queue) then removes it from the message queue. if #garrGameMessageLog > 0 then lovelyToasts.show(garrGameMessageLog[1].text,3) RemoveGameM...
by Lucyy
Thu May 20, 2021 9:55 am
Forum: Libraries and Tools
Topic: LövelyToasts: Toast messages!
Replies: 17
Views: 24685

Re: LövelyToasts: Toast messages!

Integrated and worked well enough. :) Unfortunately the X value (drawing from the left) is not quite right. It's always on the first third of the screen. I see you are doing a screenwidth/2 - textwidth/2, and this makes sense but it is not centred on my screen. I d/l a font (non-standard) so maybe ...
by Lucyy
Thu May 20, 2021 7:45 am
Forum: Libraries and Tools
Topic: LövelyToasts: Toast messages!
Replies: 17
Views: 24685

Re: LövelyToasts: Toast messages!

This is extremely timely as I've been delaying building something like this myself. If you don't tap to dismiss then what is the other option? Timed? Hi! The other option is either a default 3 second delay or passing your own duration to the lovelyToasts.show function: lovelyToasts.show("This ...
by Lucyy
Thu May 20, 2021 7:10 am
Forum: Libraries and Tools
Topic: LövelyToasts: Toast messages!
Replies: 17
Views: 24685

LövelyToasts: Toast messages!

Hi! I made a small library to display customisable toast messages and I'm pretty happy how it turned out so I thought I'd share it here https://camo.githubusercontent.com/12a7ffc4a82e1b2d29dde84ba8df531d32030a03367234068ae857057b0dfecc/68747470733a2f2f692e696d6775722e636f6d2f795762667a306c2e676966 I...
by Lucyy
Mon Jun 12, 2017 1:57 pm
Forum: Support and Development
Topic: Number displays incorrectly if the first digit is zero
Replies: 12
Views: 9525

Re: Number displays incorrectly if the first digit is zero

Converting a string to a number will remove any leading 0's, maybe you can filter out any non-numeric characters instead? local text = "My number is 06-12344566" print(text) -- Output: "My number is 06-12344566" text = string.gsub(text, "%D", "") print(text) -...