Search found 4 matches
- Tue Aug 29, 2017 3:11 pm
- Forum: Support and Development
- Topic: Custom rectangle class not rendering/moving correctly
- Replies: 10
- Views: 7276
Re: Custom rectangle class not rendering/moving correctly
Sure, here you go, untested code. local Rectangle = {} function Rectangle.create(x, y, w, h, color, thickness) local self = {} self.x, self.y, self.w, self.h, self.color, self.thickness = x, y, w, h, color or {255, 255, 255}, thickness or 1 setmetatable(self, { __index = Rectangle }) return self en...
- Tue Aug 29, 2017 12:45 pm
- Forum: Support and Development
- Topic: Custom rectangle class not rendering/moving correctly
- Replies: 10
- Views: 7276
Re: Custom rectangle class not rendering/moving correctly
It draws a rectangle. What do you want it to return? I need an manipulatable object. Sure, if you insist on reinventing the wheel and doing things the most complicated and convoluted way possible. Might it be that we are talking about different things? You always reference love.graphics.rectangle ,...
- Tue Aug 29, 2017 11:51 am
- Forum: Support and Development
- Topic: Custom rectangle class not rendering/moving correctly
- Replies: 10
- Views: 7276
Re: Custom rectangle class not rendering/moving correctly
Thank you Grump for your help. Your function fixed the issue. I've checked into the debugging prints to find out that although I've only used 64 as size for the rectangle, it is actually 32 pixels in size. I don't know if this is intended behaviour or I missed out on playing with .toPixels() . Nonet...
- Mon Aug 28, 2017 4:17 pm
- Forum: Support and Development
- Topic: Custom rectangle class not rendering/moving correctly
- Replies: 10
- Views: 7276
Custom rectangle class not rendering/moving correctly
I'm trying to develop a small "Application" to visualize the shadowrun sessions of my group. Löve may lack a simple manipulatable rectangle , which I'd like to use to highlight the selected tiles, so I created it myself. I've previously coded this functionality in C++/SFML (working), so it...