Search found 5 matches

by Lexeres
Mon Jun 28, 2021 12:42 pm
Forum: General
Topic: Background image. I'm stuck, need help
Replies: 8
Views: 9213

Re: Background image. I'm stuck, need help

I know what the problem is in Draw and cycle, but how to fix - i don't have any ideas(( function myButton:draw() local r, g, b, a = love.graphics.getColor() -- before you draw buttons, you should get old colors (and alpha) volumeInPercent = soundVolume * 100 if p.text=="Sound" and volumeI...
by Lexeres
Mon Jun 28, 2021 6:38 am
Forum: General
Topic: Background image. I'm stuck, need help
Replies: 8
Views: 9213

Re: Background image. I'm stuck, need help

function love.draw() love.graphics.setColor(1, 1, 1, 1) -- you forget somewhere to change colours love.graphics.draw(mainMenuPicture) --IT DOESN'T WORK______________________________!!!!!!!!!!!!!! love.audio.setVolume(soundVolume) love.audio.play(mainManuMp3) love.graphics.setFont(sizeFont) for n, m...
by Lexeres
Sun Jun 27, 2021 12:52 pm
Forum: General
Topic: Background image. I'm stuck, need help
Replies: 8
Views: 9213

Re: Background image. I'm stuck, need help

Then you're doing something else wrong; upload your project or show more code... this is just a guess since i can't know, but you might be redefining love.draw elsewhere. Added attach, my test project. I think what cycle of buttons somehow overlaps my background picture, but i dont know how to fix ...
by Lexeres
Sat Jun 26, 2021 11:59 am
Forum: General
Topic: Background image. I'm stuck, need help
Replies: 8
Views: 9213

Re: Background image. I'm stuck, need help

this should work: function love.draw() love.graphics.draw(backgroundofMenu,0,0) for n, myButton in ipairs (buttons) do myButton:draw() end end though your code is riddled with globals that i'm assuming you wanted to create as instance variables. also do use code tags next time I wrote what "Wh...
by Lexeres
Fri Jun 25, 2021 7:12 am
Forum: General
Topic: Background image. I'm stuck, need help
Replies: 8
Views: 9213

Background image. I'm stuck, need help

I have functions: function love.draw() for n, myButton in ipairs (buttons) do myButton:draw() end end Function code of myButton:draw() : function myButton:draw() if self.isHover then love.graphics.setColor(self.HoverColor) if currentStateMouse == true then love.graphics.setColor(self.chooseColor) en...