ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   New Chroma APIs (https://www.esoui.com/forums/showthread.php?t=6909)

loubacca 03/18/17 05:47 AM

New Chroma APIs
 
Has anyone had any success working with the new Chroma API?

I've tried IsChromaSystemAvailable() and it seems to be working, but none of the other calls seem to do anything (i.e. ChromaCreateKeyboardStaticEffect(number red, number green, number blue) )

Thanks

ZOS_DanBatson 03/21/17 12:19 PM

You should be able to use that function so long as there is not a constantly updating dynamic effect on the keyboard (e.g.: death, or an on screen notification causing F and X to blink. Does your keyboard light up the color of your alliance?

It's worth noting that basic effects, like the one you mentioned, don't work in conjunction with the dynamic effects you can make in Lua. This is because Chroma can only have one "effect" active on a device at a time. So the dynamic system uses the grid and a color layering system to boil a bunch of effects down to one composite effect. Alliance color, death, ultimate, quickslot, and notifications all go through this system, and if any of them fire they'll overwrite your basic effect. It's always the last thing that got called.

If you want to just make the keyboard a particular color, consider adding it in the dynamic system. Something like:

local myColor = ZO_ColorDef:New(0.773, 0.761, 0.62, 1)
local chromaEffect = ZO_ChromaCStyleCustomSingleColorEffect:New(CHROMA_DEVICE_TYPE_KEYBOARD, ZO_CHROMA_EFFECT_DRAW_LEVEL.COVER, CHROMA_CUSTOM_EFFECT_GRID_STYLE_FULL, NO_ANIMATION_TIMER, myColor, CHROMA_BLEND_MODE_NORMAL)
ZO_RZCHROMA_MANAGER:AddEffect(chromaEffect)

You can obviously get a lot more complicated than a flat color (animations, blend modes, etc) but that should give you an idea. If you do just want to use the other API calls to use the Razer provided functionality (like Wave and Spectrum, etc) then you might want to make sure all the ZO_RZCHROMA_MANAGER effects stop getting added, lest they overwrite your effect.

loubacca 03/23/17 06:47 PM

Thanks Dan, I'll fiddle with that and let you know how it goes!


All times are GMT -6. The time now is 05:36 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI