Skin editor?

29 views
Skip to first unread message

Dave Dyer

unread,
Mar 11, 2021, 4:25:19 PM3/11/21
to CodenameOne Discussions
Is there a binary of the skin editor available somewhere?

Shai Almog

unread,
Mar 11, 2021, 11:25:54 PM3/11/21
to CodenameOne Discussions
Sorry I think there was but I don't recall. We ended up just using the bash script in the skins project which is much simpler to use overall.

Dave Dyer

unread,
Mar 12, 2021, 1:08:47 PM3/12/21
to CodenameOne Discussions
The description I saw suggests it is only supported for desktop and javascript, which I can't build.

Shai Almog

unread,
Mar 12, 2021, 11:41:11 PM3/12/21
to CodenameOne Discussions
I think the old JS build is still here: https://www.codenameone.com/demos/SkinDesigner/
Didn't test if it still works though.

Dave Dyer

unread,
Mar 13, 2021, 1:17:38 AM3/13/21
to CodenameOne Discussions
it runs, but the files it produces don't seem to be compatible; parameters are all wonky.

Shai Almog

unread,
Mar 13, 2021, 10:00:40 PM3/13/21
to CodenameOne Discussions
As far as I recall it worked and the format hasn't changed significantly. You can unzip the file and fix it or look at what happened.

Dave Dyer

unread,
Mar 14, 2021, 7:23:57 PM3/14/21
to CodenameOne Discussions
The text properties file seems simple enough, but it doesn't include the numbers I put
into the screen editor.  On a hunch, I prepared an image with the appropriate dimensions,
but that didn't change the outcome.

I'm trying to create a skin for a galaxy s10, which is 1080x2134 @ 450 DPI

Shai Almog

unread,
Mar 14, 2021, 10:09:54 PM3/14/21
to CodenameOne Discussions
The numbers translate to the second image. Notice you have a "weird" image. It is colored in a way that represents the locations of the screen, buttons etc.

Dave Dyer

unread,
Mar 15, 2021, 2:44:32 AM3/15/21
to CodenameOne Discussions
The interface only lets you upload one image, but the .skin bundle contains 4 or 5.
Are the specs for the conversion in some reasonably decidable form somewhere?
( btw, I’ve used this trick of encoding information into magic values of images myself)

Shai Almog

unread,
Mar 15, 2021, 10:37:28 PM3/15/21
to CodenameOne Discussions
No. They're in source code in JavaSEPort.java. See this: https://github.com/codenameone/codenameone-skins
We do these manually as it's pretty darn simple:
- Portrait image
- landscape image (just rotated)
- Image marking the areas of the screen, buttons etc. in portrait
- Image marking the areas of the screen, buttons etc. in landscape
Then the properties files indicate the colors used for the markings so we can detect those while loading. Then a lot of small tuneups for font type/size, pixel ratio etc.
Reply all
Reply to author
Forward
0 new messages