flixel-ui
flixel-ui copied to clipboard
Uppercase in asset id broken
I have an input tf with id="loadTf". When I call _ui.getFlxText("loadTf"), I get an error, but "loadtf" (lowercased) is fine. The ui's internal Map shows that all the keys got lowercased.
Maybe related, this line doesn't do anything since toLowerCase doesn't change the string you call it on.
Yeah probably what I should do here is just call toLowerCase on any id's you pass in to the get commands.
Why lowercase at all though? First thought would be "load" and "Load" are two different ids.
Side note, I'm gonna mess with flixel-docs and try to go about adding flixel-ui as I use the lib more.
Hm, maybe I'm missing something, but there are case-sensitive OSes. Lower-casing everything might work for Windows, but not on OSX (depends on you FS config, but still) and Linux.
Specially when I'm using a RAW path:
<sprite src="RAW:assets/images/mainmenu/mainMenu_bg" x="0" y="0"/>
Assets ends up looking for mainmenu_bg and breaks. I'm sorry, but this is a terrible idea and it really grinds my gears when libraries think they know better than me about my project.
Now to rename a whole lot of files...
hmm, let me look into this. I don't want to cause OS specific errors.
Maybe keep it case-sensitive for RAW paths? I mean, changing it now would produce breakage on already existing projects :/
I'm assuming OpenFL doesn't lowercase anything when it sticks keys in it's asset cache?
Ah, good point. I haven't had case issues with OpenFL so far.