Hi guys,
is it possible to use own graphics for the ddgui elements like window background or sliders?
greets
You can (so far) search the DDgui.gbas for CALLBACK functions and overwrite these.
Hiro did that once to get the brushed metal look of OSX into DDgui.
I plan to add skinning to DDgui later, so each widget get's a function prototype that is used for drawing and/or handling the widget. That way you can easily make user defined widgets, too.
Hello Kitty!
1. I'm trying to make another look for a slider component (I just want to use bitmap for it) but with no success
function DDgui_draw_user% gets id$, width%, height%, ytop%
but within it I have to send ddgui_vals, wdg, ytop% to new function DDgui_drawslider2
what is the right way I can do it ?
2. could you disclose your plans about DDGui's skining functionality, please ?
best regards,
Dmitry
ddgui is fully skinnable
DDgui_user is just for user defined widgets.
You might want to overwrite the DDgui_backgnd function.
Or - what do you want in detail?
to be more clear I attached 2 pictures
1. as is - old_slider.jpg
2. as I want to be - new_slider.jpg (as example)
[attachment deleted by admin]
oh. That's not possible at the moment. We need a way to really skin the elements, but it's not done, yet.
Problem being once you allow skinning, you are going to have to use sprites for everything...
thank you for your answers
I will try to find a way to avoid the limitation
I've written my own GUI system because I wanted skinning.
It was a pain, but it's starting to take shape.
I'm working on kinetic scrolling now, not too difficult, but having it stop at snap-to points is tricky.
I use a skin.png file and have routines to tell the GUI where each element is located.
Plus you can specify the left, right and middle portions to allow all control sizes without stretching.
[Edit: It also allows different graphics / colours for different states, like below the 'PLAY' button is being pressed]
It uses PROTOTYPEs for events too.
DD-GUI has way more features tho.
Here's a screenshot of my progress:
[attachment deleted by admin]
Looks nice!
yea, it's really nice !
Slydog, how many lines of code you had to write ?
Thanks.
The GUI code alone is 1600+ lines.
The 'slider' itself is 300 lines of code.
But, it uses my custom font/text routines, which is another 350 lines.
Plus, it uses many of my other TYPEs and common routines (at least 1000+ more lines).
oh, you ~ on the half way to DDGui with its 3600 lines :)
I plan to make a simple inplace GUI just for my coming match-3 game
and then will see
Amazing Slydog! :)