Search found 22 matches
- Wed Jul 24, 2019 6:00 pm
- Forum: Libraries and Tools
- Topic: iTable: Extra table functions for LÖVE so you don't reinvent the wheel
- Replies: 19
- Views: 13726
Re: iTable: Extra table functions for LÖVE so you don't reinvent the wheel
Pyuu, in "lastIndexOf" you are doing a weird reverse iteration "for i=1, tbl_size do local true_i = tbl_size - i + 1". You could just write "for i=tbl_size,1,-1" which is both clearer and faster. Also, you don't need to write "return nil" at the end of any fu...
- Fri Jul 19, 2019 7:53 pm
- Forum: Support and Development
- Topic: ImageData:getPixel(1, 1) - argument #2 is not a number
- Replies: 3
- Views: 3156
Re: ImageData:getPixel(1, 1) - argument #2 is not a number
I think you need to use: local r,g,b,a = pixelData:getPixel(1,1) The reason for this is because pixelData needs to be the very first argument of the function call (since it's an object). Using : makes the function call reference pixelData as "self" in the underlying function. Example of th...
- Fri Jul 19, 2019 7:42 pm
- Forum: Libraries and Tools
- Topic: autoCursor: automatic mouse-input handling Library
- Replies: 6
- Views: 5735
Re: autoCursor: automatic mouse-input handling Library
Just a general bit of feedback for code readability, just because a function Can be defined in 1 line of code, doesn't mean it should. Especially line 3 of autocursor.lua. I need a horizontal scrollbar just to read the full line... Also, just because you can fcursor.x,fcursor.y,fcursor.stage,fcursor...
- Fri Jul 19, 2019 7:30 pm
- Forum: Libraries and Tools
- Topic: UIBox (UI Layout)
- Replies: 1
- Views: 3500
Re: UIBox (UI Layout)
Just as a small note for others, this project won't work correctly if you Download as Zip vs. git cloning it. The project requires the log30 library (which is included in a git clone, but not with download as zip). If you download as zip, you will get "module '30log.30log-global' not found"...
- Fri Jul 19, 2019 7:06 pm
- Forum: Libraries and Tools
- Topic: iTable: Extra table functions for LÖVE so you don't reinvent the wheel
- Replies: 19
- Views: 13726
Re: iTable: Extra table functions for LÖVE so you don't reinvent the wheel
I went through Github and combed through the library and made a few changes. You can see the pull request here: https://github.com/YoungNeer/lovelib/pull/4 If you're interested in how to do these fixes yourself please take a minute to look through the commits :D I'm not very good at explaining thing...
- Tue Dec 06, 2016 2:03 pm
- Forum: Libraries and Tools
- Topic: FontAwesome UTF-8 Dictionary for Love2D usage
- Replies: 3
- Views: 3208
Re: FontAwesome UTF-8 Dictionary for Love2D usage
Thanks. But personally I don't like using regex
I'm not sure if there is a way in lua to convert the \ff00 variables into UTF-8 format.
I'm not sure if there is a way in lua to convert the \ff00 variables into UTF-8 format.
- Tue Dec 06, 2016 1:46 am
- Forum: Support and Development
- Topic: "Questions that don't deserve their own thread" thread
- Replies: 905
- Views: 440509
Re: "Questions that don't deserve their own thread" thread
-snip- Telling them to get font 'xyz' themselves isn't something you should bank on either. :monocle: The reason I'm curious about this is for common fonts that you can almost bet on existing on most end-user's PCs, such as Arial or Tahoma. Also, detection of those fonts existence and using reasona...
- Tue Dec 06, 2016 1:42 am
- Forum: Libraries and Tools
- Topic: FontAwesome UTF-8 Dictionary for Love2D usage
- Replies: 3
- Views: 3208
FontAwesome UTF-8 Dictionary for Love2D usage
As the title says, I just went and typed out, for 8 hours, a dictionary for Font Awesome v4.7 containing all of the terms and the corresponding UTF-8 encoding string in hexadecimal. Here is a link to the dictionary: https://raw.githubusercontent.com/PyuuCH/FontAwesome-UTF8/master/FontAwesome%204.7%2...
- Tue Dec 06, 2016 1:17 am
- Forum: Support and Development
- Topic: "Questions that don't deserve their own thread" thread
- Replies: 905
- Views: 440509
Re: "Questions that don't deserve their own thread" thread
Is there a way to load fonts that are Installed on the system? Distribution of some font files may require terms that prohibit usage in some ways which bothers me.
- Thu Dec 01, 2016 6:29 pm
- Forum: Support and Development
- Topic: Stop alpha overlap for a spritebatch?
- Replies: 7
- Views: 4650
Re: Stop alpha overlap for a spritebatch?
My idea would be to create a new image data with specified width/height parameters and then manually write the images to it through iteration of pixels. But that's with my limited knowledge of the love2d api. There may be a way to set the blending mode in an image to where you get your desired resul...