Search found 73 matches

by Shadowblitz16
Tue Apr 24, 2018 10:37 pm
Forum: Support and Development
Topic: crop a image not draw part of it?
Replies: 10
Views: 6907

crop a image not draw part of it?

is there a way to crop a part of a image and get a texture/image out of it?
I don't want to just draw it but actually get a object out of it so I can store it in a array.
by Shadowblitz16
Mon Mar 12, 2018 3:05 am
Forum: Support and Development
Topic: event style gui programming?
Replies: 0
Views: 1257

event style gui programming?

can someone explain to me how to go about making a event style gui library in love2d? I kinda like the way winforms works with its events but I'm not really looking for something that complicated something that would work something like this.. function love.load() menubar = ui:create_menubar() menug...
by Shadowblitz16
Mon Mar 12, 2018 2:02 am
Forum: Support and Development
Topic: click on topmost ui element?
Replies: 4
Views: 2076

Re: click on topmost ui element?

oh ok sorry thankyou
by Shadowblitz16
Sun Mar 11, 2018 11:51 pm
Forum: Support and Development
Topic: drawing lines are blurry when diagonal
Replies: 2
Views: 1746

drawing lines are blurry when diagonal

can someone explain how to draw a x with two love.graphics.line functions? I currently have this to draw a slash but its blurry and not pixel perfect --X love.graphics.setColor(48,48,48) love.graphics.line(v.x+2.5, v.y+2.5, v.x+v.w-4.5, v.y+v.h-4.5) love.graphics.line(v.x+2.5, v.y+2.5, v.x+v.w-4.5, ...
by Shadowblitz16
Sun Mar 11, 2018 11:48 pm
Forum: Support and Development
Topic: click on topmost ui element?
Replies: 4
Views: 2076

Re: click on topmost ui element?

Edit: this doesn't work it seems to work on the bottom most
by Shadowblitz16
Sun Mar 11, 2018 10:08 pm
Forum: Support and Development
Topic: click on topmost ui element?
Replies: 4
Views: 2076

click on topmost ui element?

does anybody know how I can click on the topmost ui element only? currently I have this button but when I click on it when another button is behind it both buttons get pressed buttons = {} function buttons:Create(text, x, y, w, h, callback) local inst = {} inst.state = 0; inst.text = text; inst.x = ...
by Shadowblitz16
Sun Mar 11, 2018 10:07 pm
Forum: Support and Development
Topic: nes like graphics system?
Replies: 5
Views: 3569

Re: nes like graphics system?

@zorg ya I messed up on the example sorry but the idea was that it used a 1d tile index instead of a 2d one and tilebanks were looked up by amount tileindex went into the tilebank count @Jasoco I would need to allow images to be more the n just grey they need to be indexed on import so that any imag...
by Shadowblitz16
Sun Mar 11, 2018 9:33 pm
Forum: Support and Development
Topic: is it possible to draw a 2d table of lookup colors?
Replies: 0
Views: 1305

is it possible to draw a 2d table of lookup colors?

is it possible to draw a 2d table of lookup colors in love2d? for example something like this? tile = { {1,0,1}, {0,0,0}, {1,0,1} } pal = {0x000000, 0xFFFFFF} function convert_to_drawable(tile, pal) local drawable = {} for y=0, tile.length() do for x=0, tile[y].length() do table.insert(drawable, pal...
by Shadowblitz16
Sat Mar 10, 2018 2:14 am
Forum: Support and Development
Topic: is there a way to draw a part of a image inside a function?
Replies: 22
Views: 13611

Re: is there a way to draw a part of a image inside a function?

something like this... public void Draw(SpriteBatch spriteBatch) { graphics.GraphicsDevice.Clear(Color.Black); spriteBatch = new SpriteBatch(graphicsDevice); //Just drawing the Sprite spriteBatch.Begin(); spriteBatch.Draw(button1, new Rectangle(30, 30, 214, 101), Color.White); //<-- this function ha...