It is currently March 28th, 2024, 8:06 pm

Help with lua code

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with lua code

Post by balala »

theimmersion wrote:Oh do post. Maybe its better than mine or maybe one day ill need that solution instead of the one im currently using. Ya never know. Maybe ill encounter a similar skin with a really complicated lua. Also, some other people might find that useful as well. In any case, thanks for the help as usual Balala. :rosegift: (take this rose, consider it as a bro love... because theres no other gift emoji here) :rofl:
Here is my solution. I have to say there is one small difference from the original version. I couldn't avoid this. The difference is that between the consecutive notes there are no distances, they are now adyacentes. Without this small detail, the distance of the Add note string and the first note depends on how many notes are added.
Keep in mind that, as I said, I didn't touch the Notes.lua, it is in its original form, as I've downloaded it.
Note here that first I've reversed the order of the 16 pairs of meters (since [Item1] / [Item1BG] up to [Item16] / [Item16BG]), as I've described this in my first reply, above. I edited that post, because there was a small bug, which now is fixed.
The only thing you have to do besides reordering the meters, is to modify the Y option of the [sItem] section, to Y=0R. This step removes the 4 pixels distance between the consecutive notes. If you want to keep that distance, forget my solution and use your own one.
That's all.
User avatar
theimmersion
Posts: 55
Joined: November 27th, 2016, 1:51 pm

Re: Help with lua code

Post by theimmersion »

Just out of curiosity, why are you so much against touching the lua? Thanks, will try your solution as well. The cool thing about the edit that I did is that you get two addnote function in the lua and I could add a button in the skin to add notes from the top or bottom. That was the end goal.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with lua code

Post by balala »

theimmersion wrote:Just out of curiosity, why are you so much against touching the lua?
I'm not. At all. You can do as you want. Just wanted to tell you that as usual, there are more posibile solutions, even if the results are not always and exactly the same.
But as I said, do it as you like more...