Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skinning example is bad at skinning #286

Open
ghost opened this issue Apr 16, 2021 · 8 comments
Open

skinning example is bad at skinning #286

ghost opened this issue Apr 16, 2021 · 8 comments

Comments

@ghost
Copy link

ghost commented Apr 16, 2021

input: running make in the example directory

cc -std=c99 -pedantic -O2 -o bin/skinning skinning.c -lglfw -lGL -lm -lGLU -lGLEW

output:

@FrostKiwi
Copy link
Contributor

Everything is correct here.
The skinning example uses a low resolution skinning file, that was posted for demonstration purposes in 2016.

AFAIK most Nuklear users use the default way of drawing the UI, which does not involve pixel mapped files. As such, no one bothered to include a better skinning demonstration. The current one is sufficient I think for the purposes of explaining skinning functions.

Personally, with icons from Font Awesome or Project clarity and a style editor for all the nk_style_XXX options, I never needed to go to pixel mapped skinning to make the UI look good.

@ghost
Copy link
Author

ghost commented May 24, 2021

gwen.png is a consistent resolution, its use within the skinning example is not! compare the resolution difference in the screenshot between:

  • the window's bottom scrollbar button and the bottom-right window corner.
  • any scrollbars' edges vs the scrollbars' buttons
  • the top and bottom vs left and right progress bar edges

none of these differences are observed in the gwen.png skinning file, and are only correct behavior for a skinned UI by means of parody. furthermore, arguments toward not using a feature are not an argument in defense of a feature.

so, example 3 looks pretty good, what's up with 4?

@FrostKiwi
Copy link
Contributor

@floopfloopfloopfloopfloop Now I'm starting to understand what you mean.
The only information from your original post was "skinning example is bad at skinning", but this makes it more clear now with what your concerns are.

I will look into the current state of skinning.
Possibly this relates to skinning being resolution dependent and this excellent PR already clears this up.

@FrostKiwi
Copy link
Contributor

@floopfloopfloopfloopfloop
I checked out the example. The issue is indeed, that skinning is resolution dependent. Eg. Window style in that skin is sized to be 127x104 and gets stretched if a different size is applied. If the window size is closer to the skin size, it looks fine:
Screenshot from 2021-05-24 14-05-33
Once the 9-slice PR get's merged, I'll create a good looking Skinning demo, that is resolution / size independent.

@aganm
Copy link
Contributor

aganm commented Oct 25, 2021

@floopfloopfloopfloopfloop I checked out the example. The issue is indeed, that skinning is resolution dependent. Eg. Window style in that skin is sized to be 127x104 and gets stretched if a different size is applied. If the window size is closer to the skin size, it looks fine: Screenshot from 2021-05-24 14-05-33 Once the 9-slice PR get's merged, I'll create a good looking Skinning demo, that is resolution / size independent.

The 9-slice PR has been merged in #304. Just in case this was missed.

@jordansavant
Copy link

Thanks for the work on 9-slice. Any chance there could be a simple example of how to utilize it in comparison to the original skinning method?

@FrostKiwi
Copy link
Contributor

Thanks for the work on 9-slice. Any chance there could be a simple example of how to utilize it in comparison to the original skinning method?

An important point for Nuklear 5.x. I'll push a PR this week addressing styling in it's entirety, including a proposal for a new default style and a file where users may edit the default style elements or change effects like baked soft shadows. All thanks to the awesome 9-slice PR by @Michael-Kelley and @dav64.

I'll create a good looking Skinning demo, that is resolution / size independent.

I failed to share this, because the style-guide I was porting to Nuklear turned out to be company internal and under NDA. With 5.x it's good timing, because it's something the community can edit collaboratively anyways.

@FrostKiwi
Copy link
Contributor

@floopfloopfloopfloopfloop
Hope to address this in this community sourced Pull Request: #548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@jordansavant @aganm @FrostKiwi and others