Yan banner

Yan

11 devlogs
12h 2m 33s

A Love2D UI library inspired by the Fusion library for Roblox’s UI system.

Loading README...

Nibbles

Shipped this project!

Hours: 12.04
Cookies: 🍪 109
Multiplier: 9.08 cookies/hr

this is an update to an existing project, but it is a MAJOR UPDATE, which adds a bunch of important features that were missing in the original version, and also makes it not a pain in the ### to use!!

anyways, i think i have made the ui library for love2d of my dreams!! surprisingly it wasn’t so painful to make and i ran into very few issues! i’ll definitely be using this in my future love2d projects, and now it hopefully won’t be so painful to make ui! (still remembering the like 15 or so hours i spent solely on UI in arcade on one of my old projects with a much much older version of this project 😭)

Nibbles

Ok oops. i missed some things. most notably:

  • Fonts in textlabels and textinputs
  • Automatically updating font size in textlabels and textinputs
    Oops!
    Also fixed repeating reversing tweens breaking sometimes.
    Also finalized all documentation and the readme! so now im ACTUALLY done!! :D
0
Nibbles

finished a demo program for yan!!! also fixed a slew of major bugs including:

  • Everything would freeze if you had child elements 2 parents deep (oops)
  • Every element would be created multiple times (oops)
    and some other smaller issues like with tween repeats being weird and textcolor not working properly
    but with this, i’m done!! :D
0
Nibbles

hooray hooray, i added reverse, repeatcount, and delay to tweeninfo!! pretty cool

0
Nibbles

added the tweening system from the original yan again!!
the code is much much cleaner than last time, also :pause() and :cancel() should actually work this time
im also planning to add the other features from roblox’s TweenInfo, like delay, reverse, and repeat next

0
Nibbles

added the list property to elements! it arranges children elements in the order you specify, aligned horizontally and vertically however you specify, and you can add padding in between the elements! it also updates dynamically, and is very cool :D

0
Nibbles

added corner radius and border color and border size properties!!
and textborder.. which
kinda sucks honestly. i dont think theres a straightforward way to do them without shaders, and shaders are very difficult to use 😭 but i made one that Kindaaa works ?? i guess? but yea lots of bashing my head against the wall for that

Attachment
0
Nibbles

if you set a property’s value to a function, it will be automatically updated in love.update, kinda like fusion’s scope:Computed!
also events still work (like mouseenter and stuff) with this, had to fix that because it was breaking everything before trying to treat events like a value :P

0
Nibbles

the key value in the dictionary when adding instances to screens/setting the children property now sets the element’s name! this is useful so you can reference elements outside of their instantiation for later use with the :get() function!

Attachment
0
Nibbles

this project is probably gonna have a lottt of small devlogs early on :P

i added the ability to create children in the :new function by just adding elements to the children field!
also had to make some changes to the screen class, so that elements that have larger ancestry (being a child of a child of a child… etc) render in front more. i think thats just a new feature in general i think zindex used to be global (which should probably be a setting on screens… :P)

also because the devlog was 13 minutes before uhh so i made the Color type a bit better. added a fromRgb function that creates a color with values from 0-255 instead of 0-1, and made the alpha property optional, being fully visible by default

Attachment
0
Nibbles

shortest devlog ever or something uh
added the feature where all screens are stored in a manager module, which draws and updates every screen that is instantiated :D

Attachment
0
Nibbles

changed the syntax so making yan ui wont be a literal nightmare!!!
this is basically identical to how fusion instantiates ui, doing it like a tree of instances sorta
which is MUCH better than
thing = something:new()
[changing a billion properties which is lots of boilerplate]
screen:add(thing)
or whatever it was before :P

ALSO i improved imagelabels a bit, you can change the image property and it will update the love.Image automatically and clear the old one out of memory, before it was a :setimage function you had to call

Attachment
0