"Questions that don't deserve their own thread" thread
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: "Questions that don't deserve their own thread" thread
Oh, that's what I've been doing, but I figured there might be some easier way to do it like a .terminate function I was unaware of or something. Thanks though!
Re: "Questions that don't deserve their own thread" thread
I need help on how to load a file without having the file inside *.love. Let me clear this up for you.
I have a *.love only with main.lua and conf.lua. I want to load an image inside the folder where the *.love created.
I have a *.love only with main.lua and conf.lua. I want to load an image inside the folder where the *.love created.
Re: "Questions that don't deserve their own thread" thread
Hello everyone, I just wanted to know why setFilterData() has been removed since 0.8.0 ? Is there any other function to set filters ?
Thank you !
Thank you !
Re: "Questions that don't deserve their own thread" thread
How do I set the background colour of text?
just sets the background colour of the whole window itself, not the text's background colour, this is what it looks like.
Code: Select all
love.graphics.setBackgroundColor(77, 77, 77) -- hex #4d4d4d
Re: "Questions that don't deserve their own thread" thread
Use love.graphics.setColor( r, g, b ), you will have to call this function before you change the color of something.
- zorg
- Party member
- Posts: 3468
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: "Questions that don't deserve their own thread" thread
He asked about the background color of a text, which you can't set by default, but you can write a quick and dirty wrapper: (untested, but should work)undef wrote:Use love.graphics.setColor( r, g, b ), you will have to call this function before you change the color of something.
Code: Select all
function drawBgText(text,x,y,fgc,bgc) -- bgc and fgc are tables, containing the color triplets, or quadruplets if you include alpha as well
local f = love.graphics.getFont()
local w,h = f:getWidth(text), f:getHeight()
love.graphics.setColor(unpack(bgc))
love.graphics.rectangle('fill',x,y,w,h)
love.graphics.setColor(unpack(fgc))
love.graphics.print(text,x,y)
end
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: "Questions that don't deserve their own thread" thread
Thank you very much for your solution!zorg wrote:He asked about the background color of a text, which you can't set by default, but you can write a quick and dirty wrapper: (untested, but should work)undef wrote:Use love.graphics.setColor( r, g, b ), you will have to call this function before you change the color of something.You can of course extend something like this with wrapping, orientation, scale, offset, etc... but this is the basic way that i know of.Code: Select all
function drawBgText(text,x,y,fgc,bgc) -- bgc and fgc are tables, containing the color triplets, or quadruplets if you include alpha as well local f = love.graphics.getFont() local w,h = f:getWidth(text), f:getHeight() love.graphics.setColor(unpack(bgc)) love.graphics.rectangle('fill',x,y,w,h) love.graphics.setColor(unpack(fgc)) love.graphics.print(text,x,y) end
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: "Questions that don't deserve their own thread" thread
It wasn't removed, it was moved to Fixture.Ulydev wrote:Hello everyone, I just wanted to know why setFilterData() has been removed since 0.8.0 ? Is there any other function to set filters ?
Re: "Questions that don't deserve their own thread" thread
Awesome ! Thank you for pointing this out.
- zorg
- Party member
- Posts: 3468
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: "Questions that don't deserve their own thread" thread
You can't, not with love.filesystem at leastOrtimh wrote:I need help on how to load a file without having the file inside *.love. Let me clear this up for you.
I have a *.love only with main.lua and conf.lua. I want to load an image inside the folder where the *.love created.
You'd need to use lua's own io stuff, which you shouldn't
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests