Search found 16 matches

by cristoferfb
Tue Jun 02, 2020 3:27 am
Forum: Support and Development
Topic: Simple way for get dirs and files from user android filesystem
Replies: 4
Views: 8007

Re: Simple way for get dirs and files from user android filesystem

Löve can't access anything other than the save directory and where main.lua is, whether the latter is a folder or inside a .love file (zip archive), and potentially the folder where the .love file is, if you can mount it (works on windows at least, idk about other OS-es) There have been attempts at...
by cristoferfb
Mon Jun 01, 2020 10:11 pm
Forum: Support and Development
Topic: How to correctly save an image.
Replies: 7
Views: 9508

Re: How to correctly save an image.

Ok Love2d only can output png files (the tga format is not useful for me) ¿How to get a more reasonable size for the final archive? I check the original photo I used for this test and apparently modern phones take 4k photos as the default behaviour (2k20 lol), so I create a 720p canvas and apply a d...
by cristoferfb
Sun May 31, 2020 11:43 pm
Forum: Support and Development
Topic: How to correctly save an image.
Replies: 7
Views: 9508

How to correctly save an image.

Hi, I want to experiment with an image editor, so I currently do a simple thing:

1.- Open a image
2.- Draw it to canvas (with the same size than the original image)
3.- Save the canvas as image
4.- (waiting an eternity)
5.- A png of 50 mb was created (LOL)

¿What is the correct way of create images?
by cristoferfb
Sun May 31, 2020 1:03 am
Forum: Support and Development
Topic: Simple way for get dirs and files from user android filesystem
Replies: 4
Views: 8007

Simple way for get dirs and files from user android filesystem

Hi, I want to access to all the user android filesystem (commonly /storage/emulated/0) I notice a function getDirectoryItems() but this not work:

Code: Select all

love.filesystem.getDirectoryItems("/storage/emulated/0/") 
(I have enable storage permissions)
by cristoferfb
Thu May 21, 2020 10:07 pm
Forum: Support and Development
Topic: How is related the output of love.window.getDPIScale() with DPI categories?
Replies: 1
Views: 1712

How is related the output of love.window.getDPIScale() with DPI categories?

Hi I want to know if the love.window.getDPIScale( ) function allow me to get the DPI category of the device according to the next table:
Image

The documentation says a 2.0 means a highdpi screen but I dont sure if its accordingly to the table I show.
by cristoferfb
Wed May 20, 2020 5:09 am
Forum: Support and Development
Topic: Help with spawning multiple objects
Replies: 5
Views: 3768

Re: Help with spawning multiple objects

For a more "familliar" way of use objects in Lua I recommend u to use a library like https://github.com/rxi/classic/
by cristoferfb
Wed May 20, 2020 5:06 am
Forum: Support and Development
Topic: Text Collision
Replies: 2
Views: 2234

Re: Text Collision

Creating a Text object (as says siberian) u can control him more accurate, as any other drawable it is like a box and u can apply a 2d collision check like say in this article https://sheepolution.com/learn/book/13
by cristoferfb
Mon May 18, 2020 11:18 pm
Forum: Support and Development
Topic: ¿How to correctly work with dp's?
Replies: 2
Views: 2547

Re: ¿How to correctly work with dp's?

slime wrote: Mon May 18, 2020 11:03 pm love already uses DP units by default, so you should just be able to remove the toPixels call.
DAMN thanks
by cristoferfb
Mon May 18, 2020 11:00 pm
Forum: Support and Development
Topic: ¿How to correctly work with dp's?
Replies: 2
Views: 2547

¿How to correctly work with dp's?

Hi ! I currently doing some tests with UI in LOVE2D, actually I am trying to implement a floating action button (1) acordly to the documentation the "mini" version of this component have 20 dp of radius so I do this in my LOVE2D code: love.graphics.circle("fill", self:getX(), sel...
by cristoferfb
Sun May 10, 2020 10:20 pm
Forum: General
Topic: How to correctly read text from keyboard
Replies: 7
Views: 8798

Re: How to correctly read text from keyboard

Well the important part of the classes I mentioned is understand that FunctionView instantiate a child class called Path and that it own child class called Node (basic object oriented concepts, no more deep here) as u can see in my code example the callback 'love.textinput ()' is in a different leve...