Code Monkey home page Code Monkey logo

Comments (12)

Kapiainen avatar Kapiainen commented on May 23, 2024 1

Started working on this today.

griddemo

Implemented so far:

  • Settings for slots per row/column and number of rows/columns.
  • Ability to build the skin while making use of those new settings.
  • Updated slot highlighting to be able to apply to any slot regardless of its position.

Animations don't work properly at the moment since they are operating on the assumption that there is only a single row/column of slots.

The performance gets worse as expected as the total number of slots increases (slots per row/column * rows/columns). Slot highlighting takes longer to update and animations are slowed down. At the moment I'm not sure what I could do to reduce the performance hit. At this point I'm assuming that it is taking longer for Rainmeter to draw the skin instead of the Lua script, which updates the state of the skin, requiring more time to complete. I still need to do some profiling to see if that is the case, but that is my gut feeling right now. For example updating all of the slots (e.g. when scrolling) would take longer for the Lua script to do since there are more slots. However, highlighting a slot should not take longer for the Lua script to do as the amount of slots increases. The fact that single-slot animations and even slot highlighting are getting slower seems like an indicator that Rainmeter is indeed taking longer to draw the skin due to the number of slots.

from lauhdutin.

Kapiainen avatar Kapiainen commented on May 23, 2024 1

Quick update on the current status of this feature. A busy schedule and travel has prevented me from testing changes and pushing any commits, but I think I've got the animation stuff figured out. I've been working on it on a Linux netbook so I haven't been able to test it yet, but I should be able to resume working on this normally again in a day or two. I will hopefully have a new version ready for testing soon.

from lauhdutin.

Kapiainen avatar Kapiainen commented on May 23, 2024 1

This feature is included in the new version (beta 1).

from lauhdutin.

Kapiainen avatar Kapiainen commented on May 23, 2024

My main concern would be the performance impact, but perhaps it won't be noticeable. However, I'm currently working on a major overhaul of the GUI in order to improve performance (mainly during animations) and to clean up the code. It would probably be best to not start working on a grid system until after that overhaul has been completed.

from lauhdutin.

BanCrash avatar BanCrash commented on May 23, 2024

You have a point about that, but I guess that would be dependent of the computer and the grid size too.
Sure, better to not mixed things. Besides, maybe that overhaul helps to reduce that possible perfomance impact too.
In any case thanks for take the suggestion into account.

from lauhdutin.

Kapiainen avatar Kapiainen commented on May 23, 2024

Some click and hover animations are most likely not going to work properly in a grid system. When a banner is moved or resized, then it will end up above or below some other banners. This is due to the order that meters are defined in a config also determining which meter is drawn on top of or below other meters. Not a huge problem, but something I'll have to keep in mind.

from lauhdutin.

BanCrash avatar BanCrash commented on May 23, 2024

I am not sure If I understand correctly the problem, but If I do maybe the solution is before doing the animation in lua part get the X and Y of the banner and in the end set that X and Y again? For example:

Before Animation:
SlotBannerToAnimate = SKIN:GetMeter('SlotBanner37')
SlotBannerToAnimateX= SlotBannerToAnimate:GetX()
SlotBannerToAnimateY= SlotBannerToAnimate:GetY()

Also can get the Width and the height, if that is a problem too.

SlotBannerToAnimateW= SlotBannerToAnimate:GetW()
SlotBannerToAnimateH= SlotBannerToAnimate:GetH()

--Animation--

After the animation:
SlotBannerToAnimate:SetX(SlotBannerToAnimateX)
SlotBannerToAnimate:SetY(SlotBannerToAnimateY)
SlotBannerToAnimate:SetW(SlotBannerToAnimateW)
SlotBannerToAnimate:SetH(SlotBannerToAnimateH)

Like I said before I am not sure if I understand correctly the problem, so I don't know if that could be a solution for that.

from lauhdutin.

Kapiainen avatar Kapiainen commented on May 23, 2024

Not quite what I'm talking about, but I did get an idea for how one might solve the issue.

from lauhdutin.

BanCrash avatar BanCrash commented on May 23, 2024

Glad to read that.

from lauhdutin.

BanCrash avatar BanCrash commented on May 23, 2024

I do some testings with the branch and I see the same that you, with a 6x6 grid with Slot Width:310 and Height:145 I have a perfect perfomance, but with a 12x12 grid with W:155 and H:72.5 I see a big impact in the perfomance.

Probably you're right and Rainmeter doesn't have enough capacity to handle that amount of items, but I think at least a 6x6 grid with 36 games is big enough .

from lauhdutin.

BanCrash avatar BanCrash commented on May 23, 2024

Glad to read that, thanks for the update and all the work!!

from lauhdutin.

BanCrash avatar BanCrash commented on May 23, 2024

Thank you so much!!!! I will download right now!

Thank you for all your hard work!!!

from lauhdutin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.