Topic: Custom Gui skin

Hello.

Is it possible to create a custom GUI skin with the latest GMan Irrlicht mod (1.71+)?

If so, how?

Thanks.

ps  (I already have the custom guiskin.cfg and the associated graphics files).

Re: Custom Gui skin

greetings smile  unfortunately im not sure as i have never attempted to skin.  best bet is to search the Irrlicht forums for an example.  if you find one i should be able to help you convert/decipher if needed.

Re: Custom Gui skin

Thanks GMan but I may be sending you on a wild goose chase. I've seen lots of examples of custom GUI's, thing is, they seem to require additional modules that aren't part of the Irrlicht core. I'd just presumed sad.

The examples of custom GUI's seem to run off someones additional code contributions from a couple of years ago. It may be doable with the current core, but it's so hard trying to find good information. I've even read of the admin's on the Irrlicht forums talking about adding this stuff and including animated sprites to the mix. It's doubly confusing that there are indeed animated sprite controls for the GUI within the current core, along with LoadGUI / SaveGui etc. But when you try to find good info you end up back at the custom code sections from a couple of years ago. It may be that the code was integrated into the core, but if it was, I can't seem to find helpfull information on how to implement it.

I've even been through code from other languages that have Irrlicht implementations, they use a different set of naming conventions for core routines which is adding even more confusion to the mix.

I only wanted to save some time by using the Irrlicht GUI (it's pretty fast and simple to use). I think I'll write my own GUI instead, I really only need buttons and sliders, it'll probably be faster for me in the end smile

If it's any help to anyone changing the 'basic' built in GUI here's some simple code...

Changing the default GUI to another 'in built' GUI look.
------------------------------------------------------------------
Local newskin:IGUISkin = env.createSkin(EGST_BURNING_SKIN) ' Can also be EGST_WINDOWS_METALLIC  |or| EGST_WINDOWS_CLASSIC
env.setSkin(newskin)
newskin.drop

You can also save a GUI with...
------------------------------------------------------------------

env.saveGUI("MyGuiTest.txt", Null)

and load it back with...
------------------------------------------------------------------
env.loadGUI("MyGuiTest.txt", Null)

Although it should be said, the GUI loading and saving doesn't seem to include any reference to graphics / sprites etc. It's just a simple xml file. It may be that as I haven't added graphics to the mix, they're just not part of the output.

Here's an example output file from 'SaveGUI'... (it's the GUI created by the 'EGST_BURNING_SKIN' example above)
------------------------------------------------------------------

<?xml version="1.0"?>
<irr_gui>

    <attributes>
        <enum name="Skin" value="burning" />
        <color name="3DDarkShadow" value="60767982" />
        <color name="3DShadow" value="50e4e8f1" />
        <color name="3DFace" value="c0cbd2d9" />
        <color name="3DHighlight" value="40c7ccdc" />
        <color name="3DLight" value="802e313a" />
        <color name="ActiveBorder" value="80404040" />
        <color name="ActiveCaption" value="ffd0d0d0" />
        <color name="AppWorkspace" value="c0646464" />
        <color name="ButtonText" value="d0161616" />
        <color name="GrayText" value="3c141414" />
        <color name="Highlight" value="6c606060" />
        <color name="HighlightText" value="d0e0e0e0" />
        <color name="InactiveBorder" value="f0a5a5a5" />
        <color name="InactiveCaption" value="ffd2d2d2" />
        <color name="ToolTip" value="f00f2033" />
        <color name="ToolTipBackground" value="c0cbd2d9" />
        <color name="ScrollBar" value="f0e0e0e0" />
        <color name="Window" value="f0f0f0f0" />
        <color name="WindowSymbol" value="d0161616" />
        <color name="Icon" value="d0161616" />
        <color name="IconHighlight" value="d0606060" />
        <int name="ScrollBarSize" value="14" />
        <int name="MenuHeight" value="48" />
        <int name="WindowButtonWidth" value="15" />
        <int name="CheckBoxWidth" value="18" />
        <int name="MessageBoxWidth" value="500" />
        <int name="MessageBoxHeight" value="200" />
        <int name="ButtonWidth" value="80" />
        <int name="ButtonHeight" value="30" />
        <int name="TextDistanceX" value="3" />
        <int name="TextDistanceY" value="2" />
        <int name="TitleBarTextX" value="3" />
        <int name="TitleBarTextY" value="2" />
        <int name="MessageBoxGapSpace" value="15" />
        <int name="MessageBoxMinTextWidth" value="0" />
        <int name="MessageBoxMaxTextWidth" value="500" />
        <int name="MessageBoxMinTextHeight" value="0" />
        <int name="MessageBoxMaxTextHeight" value="99999" />
        <string name="MessageBoxOkay" value="OK" />
        <string name="MessageBoxCancel" value="Cancel" />
        <string name="MessageBoxYes" value="Yes" />
        <string name="MessageBoxNo" value="No" />
        <string name="WindowButtonClose" value="Close" />
        <string name="WindowButtonMaximize" value="Maximize" />
        <string name="WindowButtonMinimize" value="Minimize" />
        <string name="WindowButtonRestore" value="Restore" />
        <int name="windowMaximize" value="225" />
        <int name="windowRestore" value="226" />
        <int name="windowClose" value="227" />
        <int name="windowMinimize" value="228" />
        <int name="windowResize" value="242" />
        <int name="cursorUp" value="229" />
        <int name="cursorDown" value="230" />
        <int name="cursorLeft" value="231" />
        <int name="cursorRight" value="232" />
        <int name="menuMore" value="232" />
        <int name="checkBoxChecked" value="233" />
        <int name="dropDown" value="234" />
        <int name="smallCursorUp" value="235" />
        <int name="smallCursorDown" value="236" />
        <int name="radioButtonChecked" value="237" />
        <int name="moreLeft" value="238" />
        <int name="moreRight" value="239" />
        <int name="moreUp" value="240" />
        <int name="moreDown" value="241" />
        <int name="expand" value="243" />
        <int name="collapse" value="244" />
        <int name="file" value="245" />
        <int name="directory" value="246" />
    </attributes>

</irr_gui>

Re: Custom Gui skin

It would be nice to be able to extend the IGuiSkin-Type like in C/++ so that you can erase all default draw methods by own ones which also include images.
I know that it won't be easy to make this possible and could also be bad for the performance but it would give the wrapper more useful options. So I really hope that you'll implement it smile .