selfmade graphics?

Previous topic - Next topic

backslider

Hi guys,
is it possible to use own graphics for the ddgui elements like window background or sliders?

greets

Kitty Hello

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.

DmitryK

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
Our life is just a Game!

trucidare

ddgui is fully skinnable
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Kitty Hello

DDgui_user is just for user defined widgets.

You might want to overwrite the DDgui_backgnd function.

Or - what do you want in detail?

DmitryK

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]
Our life is just a Game!

Kitty Hello

oh. That's not possible at the moment. We need a way to really skin the elements, but it's not done, yet.

MrTAToad

Problem being once you allow skinning, you are going to have to use sprites for everything...

DmitryK

thank you for your answers
I will try to find a way to avoid the limitation
Our life is just a Game!

Slydog

#9
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]
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

MrTAToad


DmitryK

yea, it's really nice !
Slydog, how many lines of code you had to write ?
Our life is just a Game!

Slydog

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).
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

DmitryK

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

   
Our life is just a Game!

backslider

Amazing Slydog! :)