Search found 14 matches

by DGM
Wed Jan 23, 2019 5:28 am
Forum: Support and Development
Topic: [SOLVED] Drawing on canvas works wrong
Replies: 7
Views: 1966

Re: [SOLVED] Drawing on canvas works wrong

Thanks, I've changed the text to mention that. Anything else I should know?
by DGM
Tue Jan 22, 2019 11:03 pm
Forum: Support and Development
Topic: [SOLVED] Drawing on canvas works wrong
Replies: 7
Views: 1966

Re: [SOLVED] Drawing on canvas works wrong

You get one free clear at the start of the draw loop as love clears the screen for you ready to draw the new frame. But the free clear applies only to the screen and not to the canvases, correct? That makes sense. As for the tint, yes it applies to everything drawn. You can use this to your advanta...
by DGM
Tue Jan 22, 2019 2:23 am
Forum: Support and Development
Topic: [SOLVED] Drawing on canvas works wrong
Replies: 7
Views: 1966

Re: [SOLVED] Drawing on canvas works wrong

That fixed it, thanks. But why is the last clear unnecessary? I get that I don't need it here since the image doesn't change, but aren't I normally supposed to clear the screen between frames? EDIT: One more question. Does the tint apply to everything drawn with the graphics.draw() function? I just ...
by DGM
Tue Jan 22, 2019 2:04 am
Forum: Support and Development
Topic: [SOLVED] Drawing on canvas works wrong
Replies: 7
Views: 1966

[SOLVED] Drawing on canvas works wrong

Hello again, More trouble with canvases. Again, this is with v11.2 on 64-bit Windows 10. I'm attempting to draw a white square with a smaller blue square inside of it to a canvas, then draw the result to the screen. Instead what I get is a solid blue square with no hint of white. Here's the full cod...
by DGM
Sun Jan 20, 2019 11:02 pm
Forum: Support and Development
Topic: [SOLVED] Canvas is crashing 11.2
Replies: 3
Views: 1176

Re: Canvas is crashing 11.2

When love.draw finishes, you need to have no canvas active, so you need to disable it at some point before the end of love.draw(). This works, for example: That was the problem. Thanks. Suggestion to the Love2D devs: a warning about needing to deactivate your canvases in the documentation for the c...
by DGM
Sun Jan 20, 2019 10:27 pm
Forum: Support and Development
Topic: [SOLVED] Canvas is crashing 11.2
Replies: 3
Views: 1176

[SOLVED] Canvas is crashing 11.2

Hello, I'm using v11.2 in 64-bit Windows 10. Trying to use a canvas causes an immediate crash, even with the following minimal code: function love.load() canvas_1 = love.graphics.newCanvas() end function love.update() end function love.draw() love.graphics.setCanvas(canvas_1) end Here's the error me...
by DGM
Fri Nov 02, 2018 12:05 am
Forum: Support and Development
Topic: [SOLVED] Detecting special characters with love.textinput()
Replies: 3
Views: 1135

[SOLVED] Detecting special characters with love.textinput()

Hello, I'm trying to make a simple command-line interface by using the love.textinput(text) function (this is with Love2d version 11.1). I've got text appearing but I can't get the program to recognize when the return key is pressed. I know I can do this with love.keypressed(key) by comparing key to...
by DGM
Thu Sep 27, 2018 2:37 pm
Forum: Support and Development
Topic: [SOLVED] os.rename function causing crash
Replies: 2
Views: 451

[SOLVED] os.rename function causing crash

[smacks forehead]

Right. Moving the string declarations out of the load function fixed it. Thanks.
by DGM
Thu Sep 27, 2018 1:06 pm
Forum: Support and Development
Topic: [SOLVED] os.rename function causing crash
Replies: 2
Views: 451

[SOLVED] os.rename function causing crash

I want to write a utility that creates some files and directories but places them into the same folder as the program rather than into the save directory. After some research I figured the easy way to do this was to create what I wanted in the save folder and then call os.rename to move it where I n...