Colour select

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
yarickyarick
Prole
Posts: 15
Joined: Fri Dec 30, 2011 9:48 pm
Contact:

Colour select

Post by yarickyarick »

In general ... I'm doing a character editor ...
Set as has all of the sex change, to edit the number of mucus in the nose at the future of children ...
But goes terribly problem with hair color ...
It seems to be writing:

Code: Select all

     love.graphics.setColor (rcvet, gcvet, bcvet, 255)
     love.graphics.draw (hea1, 160, y11)
     love.graphics.setColor (rcvet, gcvet, bcvet, 255)
     love.graphics.draw (chu1, 480, y12)
But for some reason the image does not change color, and screen ...
I do not even tell me please: what to do ...
User avatar
MarekkPie
Inner party member
Posts: 587
Joined: Wed Dec 28, 2011 4:48 pm
Contact:

Re: Colour select

Post by MarekkPie »

Don't quite know what you are asking, but I'll take a few stabs at it.

Whatever the last setColor() set the color to is held until a new setColor() is called. So if I did something like:

Code: Select all

-- First time
function love.draw()
  love.graphics.circle("fill", 50, 50 10)  -- <= Default color
  love.graphics.setColor(255,0,0,255)
  love.graphics.circle("fill", 100, 100, 10) -- <= Red
end
Then the second time love.draw() is called, you get:

Code: Select all

-- Second time
function love.draw()
  love.graphics.circle("fill", 50, 50 10)  -- <= Red
  love.graphics.setColor(255,0,0,255)
  love.graphics.circle("fill", 100, 100, 10) -- <= Red
end
What I would do is after (or before) you have finished (or started) coloring stuff, reset the color by calling love.graphics.setColor(255,255,255,255). Alternatively, you could just make sure you don't have any dangling images that don't have a color associated with them.

That may not be your problem, because it looks like you made everything nice and tidy. But if you have any dangling draws somewhere, those might be affected.

Is 'hea1' = head? I don't know what 'chu1' would be.
yarickyarick
Prole
Posts: 15
Joined: Fri Dec 30, 2011 9:48 pm
Contact:

Re: Colour select

Post by yarickyarick »

Hea1 = long hair
Chu1 = bang
Or problems and no solution ...
I'll ask again added to my Skype or ICQ, which I have in the last topic =)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests