New GUI skin [update: new skins, support for 1.5/1.6]

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Tannz0rz
Posts: 35
Joined: Fri May 08, 2009 12:25 am
Location: Orlando FL, USA

Post by Tannz0rz »

Jookia wrote:To make it more portable so you don't have to include it into your project files, I've used t0rt0r0's code and edited it to be a simple folder that you can include.

Download links. Unless the whole world explodes, atleast one will be up.

Code: Select all

http://willhostforfood.com/access.php?fileid=69788
http://www.zshare.net/download/611971668708b97c/
http://www.badongo.com/file/15398615
http://rapidshare.com/files/243083038/Klagui_Portable.zip.html
http://www.megaupload.com/?d=DL1WYNC3
http://depositfiles.com/files/esymsc4cx

Code: Select all

1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(217) : error C2548: 'irr::gui::CImageGUISkin::drawIcon' : missing default parameter for parameter 7
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(275) : error C2039: 'dimension2du' : is not a member of 'irr::core'
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(275) : error C2065: 'dimension2du' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(275) : error C2146: syntax error : missing ';' before identifier 'tsize'
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(275) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(325) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(325) : error C2228: left of '.Width' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(325) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(325) : error C2228: left of '.Width' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(331) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(331) : error C2228: left of '.Width' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(337) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(337) : error C2228: left of '.Height' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(343) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(343) : error C2228: left of '.Width' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(343) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(343) : error C2228: left of '.Width' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(343) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(343) : error C2228: left of '.Height' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(349) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(349) : error C2228: left of '.Width' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(349) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(349) : error C2228: left of '.Height' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(355) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(355) : error C2228: left of '.Height' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(355) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(355) : error C2228: left of '.Height' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(361) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(361) : error C2228: left of '.Width' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(361) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(361) : error C2228: left of '.Height' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(361) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(361) : error C2228: left of '.Width' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(361) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(361) : error C2228: left of '.Height' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(367) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(367) : error C2228: left of '.Height' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(367) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(367) : error C2228: left of '.Width' must have class/struct/union
1>        type is ''unknown-type''
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(367) : error C2065: 'tsize' : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\cimageguiskin.h(367) : error C2228: left of '.Height' must have class/struct/union
1>        type is ''unknown-type''
Anyone have a clue? Or is dimension2du a magical type within irr::core surrounded by unicorns?[/code]
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You are using an incompatible Irrlicht version.
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

New version of klaskers skin :

A quick preview :

Image


For all users :

I am re-building klaskers with a few modifications and a better demo.

The changes im making need to be seperated , and some minor modifications to the irrlicht source (which will be in SVN of irrlicht).

This means :

NEW FEATURES (minor ones)
NEW SKIN
NEW VERSIONS :
Compatible with irrlicht versions :
1.5
1.5.1
1.6 (SVN)



Download links

http://irrlicht.sourceforge.net/phpBB2/ ... 501#202501

KNOWN ISSUES

Couple of things are not setup here (but you can do) things like

a) checkbox tick image, you can set it via the IGUIEnvironment to a white one of your choice.

b) close buttons etc etc, this is atm, not a concern for me but its easy to change without rebuilding irrlicht (as above) so have fun.


SVN VERSION


The patch below should only matter if you are using SVN (and the patch has not been included yet by bitplane)

http://www.owned.co.za/downloads/IGUIWi ... cing.patch

(you can save the below as a .patch file and apply via tortoise or other client)

Code: Select all

Index: include/IGUISkin.h
===================================================================
--- include/IGUISkin.h	(revision 2587)
+++ include/IGUISkin.h	(working copy)
@@ -151,6 +151,10 @@
 		EGDS_TEXT_DISTANCE_X,
 		//! distance for text from background
 		EGDS_TEXT_DISTANCE_Y,
+		//! distance for text in the title bar, from the left of the window rect
+		EGDS_TITLEBARTEXT_DISTANCE_X,
+		//! distance for text in the title bar, from the top of the window rect
+		EGDS_TITLEBARTEXT_DISTANCE_Y,
 		//! this value is not used, it only specifies the amount of default sizes
 		//! available.
 		EGDS_COUNT
Index: source/Irrlicht/CGUIWindow.cpp
===================================================================
--- source/Irrlicht/CGUIWindow.cpp	(revision 2587)
+++ source/Irrlicht/CGUIWindow.cpp	(working copy)
@@ -223,8 +223,8 @@
 
             if (DrawTitlebar && Text.size())
             {
-                rect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X);
-                rect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y);
+                rect.UpperLeftCorner.X += skin->getSize(EGDS_TITLEBARTEXT_DISTANCE_X);
+                rect.UpperLeftCorner.Y += skin->getSize(EGDS_TITLEBARTEXT_DISTANCE_Y);
                 rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5;
 
                 IGUIFont* font = skin->getFont(EGDF_WINDOW);

Last edited by FuzzYspo0N on Sat Aug 15, 2009 11:52 pm, edited 1 time in total.
Tannz0rz
Posts: 35
Joined: Fri May 08, 2009 12:25 am
Location: Orlando FL, USA

Post by Tannz0rz »

FuzzYspo0N wrote:New version of klaskers skin
Oh nice, thanks. This one is actually working for me.
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

glad to hear. i hope to see more skins too!

Also note : i left my G:\dev\irrlicht.1.5\include and lib references on purpose. :)
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

Project updated in the irrExt project! Get it here :

http://irrext.svn.sourceforge.net/viewv ... in/Klagui/

Submit patches and bugs on the tracker. thanks!
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

I've now added the patch to Irrlicht trunk, so you won't need the patch if you're running SVN/1.6
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Steel Style
Posts: 168
Joined: Sun Feb 04, 2007 3:30 pm
Location: France

Post by Steel Style »

Really cool stuff :D. Glad to hear that it's on the trunk.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Nice work Fuzzy :D
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Mamnarock
Posts: 2
Joined: Mon Nov 09, 2009 11:45 pm

Post by Mamnarock »

I´m testing the GUI skin but i can´t change the tab style.

It is possible to use style in the tabs?
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Really Nice. Is there are some docs/informations to create the GUI assets?

I would surely be interested to create new skins too.

Is the window skin is "fixed", from the assets it look like the size is determined.

How were you able to have that reflection from the window?

EDIT:
OK. Seem to have figured some things out. I think the IRRlicht code will have to be slightly modified if we need to change specific GUI item (windows close button for example, it's using the button skin)

Here my current attempt on a "vista style" Skin:
Image

I have put the UI interface in a ZIP file and included the part I've modified in the main.cpp demo. Downloaded from my site
http://www.clavet.org/forum/download/file.php?id=107 90Kb

Here is an attemp at MAC OS style:
Image

Download Skin: http://www.clavet.org/forum/download/file.php?id=108

One thing that I find strange is that the textures are a bit darker than the original texture. The background should be white and it look grey.
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

Post by omar shaaban »

i hope that replace the original gui of irrlicht! :P
Brkopac
Posts: 88
Joined: Fri Sep 19, 2008 2:36 am

Post by Brkopac »

Halan wrote:if i wanna use it it says "not possible to create instance of abstract class"

Code: Select all

1>------ Build started: Project: Klagui, Configuration: Debug Win32 ------
1>Build started 11/14/2009 5:14:59 AM.
1>IsProjectFileNewer:
1>Skipping target "IsProjectFileNewer" because all output files are up-to-date with respect to the input files.
1>_PrepareForBuild:
1>  Touching "Debug\lastbuild.timestamp".
1>ClCompile:
1>  CImageGUISkin.cpp
1>c:\programming\libraries\klagui\source\cimageguiskin.cpp(221): error C2440: 'initializing' : cannot convert from 'const irr::core::dimension2d<T>' to 'irr::core::dimension2d<T>'
1>          with
1>          [
1>              T=irr::u32
1>          ]
1>          and
1>          [
1>              T=irr::s32
1>          ]
1>          Constructor for class 'irr::core::dimension2d<T>' is declared 'explicit'
1>          with
1>          [
1>              T=irr::s32
1>          ]
1>  main.cpp
1>c:\programming\libraries\klagui\source\main.cpp(76): error C2259: 'irr::gui::CImageGUISkin' : cannot instantiate abstract class
1>          due to following members:
1>          'void irr::gui::IGUISkin::draw3DTabButton(irr::gui::IGUIElement *,bool,const irr::core::rect<T> &,const irr::core::rect<T> *,irr::gui::EGUI_ALIGNMENT)' : is abstract
1>          with
1>          [
1>              T=irr::s32
1>          ]
1>          c:\programming\libraries\irrlicht\include\iguiskin.h(490) : see declaration of 'irr::gui::IGUISkin::draw3DTabButton'
1>          'void irr::gui::IGUISkin::draw3DTabBody(irr::gui::IGUIElement *,bool,bool,const irr::core::rect<T> &,const irr::core::rect<T> *,irr::s32,irr::gui::EGUI_ALIGNMENT)' : is abstract
1>          with
1>          [
1>              T=irr::s32
1>          ]
1>          c:\programming\libraries\irrlicht\include\iguiskin.h(503) : see declaration of 'irr::gui::IGUISkin::draw3DTabBody'
1>c:\programming\libraries\klagui\source\main.cpp(126): error C2039: 'setEmptyColor' : is not a member of 'irr::gui::CGUIProgressBar'
1>          c:\programming\libraries\klagui\source\cguiprogressbar.h(16) : see declaration of 'irr::gui::CGUIProgressBar'
1>  Generating Code...
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.92
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Here is a full console paste out from Visual Studio 2010. I'm attempting to build it against the current SVN (rev. 2862).
Image - The glory days.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

cimageguiskin.cpp cannot convert from 'const irr::core::dimension2d<T>' to 'irr::core::dimension2d<T>'
Some variables with u32 should be replaced with s32 in parameters used in a function named "dimension2d"

'void irr::gui::IGUISkin::draw3DTabButton' seem to have something associated with this but I'm not sure what, perhaps a parameter. Seem to be related again to the u32->s32 changes

'setEmptyColor' : is not a member of 'irr::gui::CGUIProgressBar' in cguiprogressbar.h, check that it's defined in both the CPP and the .H file.

I haved used the 1.6 official release and it did not do that.

EDIT: Found the problem with the skin being darker than the original.

Looked into CImageGuiSkin.cpp

Into method: void CImageGUISkin::drawElementStyle

Line was like this:

Code: Select all

video::SColor faceColor = getColor(EGDC_3D_FACE);
Changed for this:

Code: Select all

video::SColor faceColor = video::SColor(255,255,255,255); 
If you look at the result the image is brighter (the same intensity as the original). Look at the exit demo button.
Before:
Image
Now:
Image

I really hope that work will continue on this so we'll be able to skin other GUI elements. This as some great potential... The only other wish I could make is that it would be great if the textures could be tiled into the specified zone instead of being stretched. (I checked my Vista desktop here and the textures are being tiled into the GUI)

EDIT2:
If we can have more GUI element being skinnable I would like to redo theses skins and improve the Klasker demo by presenting something like this:

Image

As a note: we won't be able to create "textured" skins like "brushed metal" skins because they are scaled (textures), a tiled approach for them would work.

I would like to thank FuzzYspo0N and Klasker to have given us this. This really give us better looking interfaces right now.
Sir_Hans
Posts: 143
Joined: Sun Dec 06, 2009 2:23 pm
Location: Germany

Post by Sir_Hans »

Nice, I looked for something like that for a long time but the listbox, the editbox, the checkbox and the comobobox use the same texture.
Is there a way to have different texture for every and maybe another checkmark?
Post Reply