kirillrakhman
06/05/2020, 1:20 PMColorFilter
but what to use as matrix?Deactivated User
06/08/2020, 12:19 AMTommie Nygren
06/08/2020, 11:43 AMTommie Nygren
06/08/2020, 11:44 AMRishav Sharan
06/08/2020, 3:07 PMNico
06/08/2020, 5:20 PMRishav Sharan
06/09/2020, 1:20 PMRishav Sharan
06/10/2020, 3:16 PMval uiAssets = resourcesVfs["buttons.png"].readNativeImage()
val newSkin = DefaultUISkin.copy(
normal = uiAssets.sliceWithSize(0, 0, 1024, 64),
over = uiAssets.sliceWithSize(0, 128, 1024, 64),
down = uiAssets.sliceWithSize(0, 192, 1024, 64),
backColor = DefaultUISkin.backColor.transform(ColorTransform(0.7, 0.9, 1.0))
)
var playButton = textButton(256.0, 32.0) {
text = "Play"
skin = newSkin
position(views.actualVirtualWidth/2 - 128, views.actualVirtualHeight/2 - 64)
onClick {
sceneContainer.changeToAsync<PlayScene>()
}
}
Unfortunately the button skin is not scaling correctly. the button atlas has slices of 1024x64 size which I suppose is pretty large. the skinned buttons are getting rendered weirdly.
This is how the button looks in game;Rishav Sharan
06/10/2020, 5:47 PMDeactivated User
06/10/2020, 11:41 PMNico
06/11/2020, 6:30 AMNico
06/11/2020, 3:38 PMDeactivated User
06/11/2020, 10:00 PM1.13.2.2
- Please use this version for the JAMRishav Sharan
06/12/2020, 9:34 AMDeactivated User
06/12/2020, 8:00 PMPal Matolay
06/12/2020, 10:05 PMDeactivated User
06/13/2020, 12:35 AM1.13.2.3
Deactivated User
06/13/2020, 10:56 AM1.13.2.4
Nico
06/13/2020, 2:17 PMarocnies
06/13/2020, 10:43 PMfkrauthan
06/14/2020, 2:24 AMresourcesVfs
is that cached or do I need to build my own asset cache (like a lot of the C++ Game engines for example)?fkrauthan
06/14/2020, 3:14 AMRishav Sharan
06/14/2020, 4:49 PMtobsef
06/14/2020, 7:16 PMPal Matolay
06/14/2020, 8:08 PMNico
06/14/2020, 8:56 PMDima Avdeev
06/14/2020, 11:02 PM