These are chat archives for CoraleStudios/Colore

30th
Nov 2015
Roxas Keyheart
@roxaskeyheart
Nov 30 2015 03:24

Hey guys, I was just wondering how I would go about using Colore to make a wipe-style transition between 2 static colors? My application currently sets different color states using .SetAll() to change the colour. What I was wanting to do is add a transition so that when my app changes the color state the new color transitions from the left of the keyboard to the right overwriting the old color as it goes and then staying static when it reaches the end.

I've been looking throught the Colore documentation and I think the .SetCustom() function within a for loop would do this, but I'm really stuck on how to implement .SetCustom() and key rows using Colore. Could anyone give me some pointers?

Adam Hellberg
@Sharparam
Nov 30 2015 06:09
@technicaldaniel I would iterate from column zero to max columns with some delay between each and for every column set all the rows on that column to the new colour. I'm on phone atm otherwise I'd write an example.
Roxas Keyheart
@roxaskeyheart
Nov 30 2015 07:15
@Sharparam - There's no rush at all, if you could write me an example when you get some free time that would be most appreciated :)
Adrian
@WolfspiritM
Nov 30 2015 07:50
@technicaldaniel http://pastebin.com/kcX8G4Eb
That only works when you store the old state in the custom grid. So whatever animation/transition you do it needs to be done with that custom cause (as far as I know) you can only set the whole Keyboard so you have to save the color of the other Keys that are not the new color yet
Adam Hellberg
@Sharparam
Nov 30 2015 08:36
@WolfspiritM, @technicaldaniel: using the indexers on keyboard will utilise the internal grid which saves state between calls as well
Adrian
@WolfspiritM
Nov 30 2015 09:47
This message was deleted
Thanks. Didn't know about that. Would be like that then: http://pastebin.com/V7Fp2g7j
Roxas Keyheart
@roxaskeyheart
Nov 30 2015 10:48

I was finally able to get the chance to try out this code you guys sent, I really appreciate it guys.

It doesn't seem to be working though :/

I've integrated the following:

for (uint c = 0; c < Constants.MaxColumns; c++)
{
for (uint r = 0; r < Constants.MaxRows; r++)
{
Keyboard.Instance[r, c] = Corale.Colore.Core.Color.FromSystemColor(col);
Debug.WriteLine(r);
}
Thread.Sleep(50);
}

but nothing happens when I call it (the col value is valid as well).
I'm wondering if it might have something to do with the Constants class? When I hover over it it says its referencing Razer.Mouse.Constants
Actually nevermind, I was able to fix it by using the Corale.Colore.Razer.Keyboard namespace
Roxas Keyheart
@roxaskeyheart
Nov 30 2015 11:17
:)
Roxas Keyheart
@roxaskeyheart
Nov 30 2015 11:34
Now I just need to work out how to make it go in the other direction (right to left) >.<
Adrian
@WolfspiritM
Nov 30 2015 12:28
@technicaldaniel http://pastebin.com/kvXEhtQu
Adrian
@WolfspiritM
Nov 30 2015 13:03
I'd personally actually still go with the own Custom implementation I posted at first cause Instance[..] uses .SetPosition and sends the updated grid every time you set a Key. In general this shouldn't be a problem but managing the custom yourself gives you more options in when to actually set the grid on the Keyboard (via .SetCustom) making it more performant and might help making the animation more fluit if you change many keys at once.
Brandon Scott
@brandonscott
Nov 30 2015 13:05
So happy to see so many people using Colore
Like a proud father seeing a family grow 😂
Adrian
@WolfspiritM
Nov 30 2015 13:06
C# is just way easier then C++ :P
I hope I can get my NodeJS plugin to support the same or at least similar functions soon. Want to make the using similar to Colore so people can use one or the other easily depending on what they need.
Roxas Keyheart
@roxaskeyheart
Nov 30 2015 14:26
@WolfspiritM What is (forward) may i ask? Syntax checker is having a fit with it
nvm, just saw the bool forward=true
Ryan Hill
@Aurous
Nov 30 2015 20:16
Transferring the chroma SDK to Python would be really cool, Python and C# are such fun languages