Page 7 of 8

Posted: Tue Jan 19, 2010 6:14 am
by grunt
I am trying to compile a dll of klaskers gui so i can use pinvoke with it and use it with c# but cant get it to compile:

221 C:\Documents and Settings\mhartwig\Desktop\source\CImageGUISkin.cpp conversion from `const irr::core::dimension2d<irr::u32>' to non-scalar type `irr::core::dimension2d<irr::s32>' requested

is the error i get. any help would be appreciated getting this to compile.

Posted: Tue Jan 19, 2010 6:23 am
by Lonesome Ducky
Can you show us some of the code where it is crashing at? But the error explains itself pretty well. You're trying to cast a dimension2d<u32> to dimension2d<s32>. You can fix it yourself, or tell us where it is crashing so we can help.

EDIT: Nevermind, I found it. In CImageGUISkin.cpp at

Code: Select all

void CImageGUISkin::drawElementStyle( const SImageGUIElementStyle& elem, const core::rect<s32>& rect, const core::rect<s32>* clip, video::SColor* pcolor  )
{
    core::rect<s32> srcRect;
    core::rect<s32> dstRect;
    core::dimension2di tsize = elem.Texture->getSize();

The dimension2di needs to be changed to dimension2du. That should clear up that error.

Posted: Tue Jan 19, 2010 6:50 am
by grunt
Actually i was able to get it to compile. Seems the version i downloaded in the earlier threads was older and you need the one from the svn to work with irrlicht 1.6 dll.

Suport 1.7

Posted: Sun Feb 07, 2010 1:32 pm
by Mamnarock
to use it with irrlicht 1.7

do the following modifications

CImageGUISkin.h
from

Code: Select all

virtual core::rect<s32> draw3DWindowBackground(IGUIElement* element,
			bool drawTitleBar, video::SColor titleBarColor,
			const core::rect<s32>& rect,
			const core::rect<s32>* clip=0)
to

Code: Select all

virtual core::rect<s32> draw3DWindowBackground(IGUIElement* element,
			bool drawTitleBar, video::SColor titleBarColor,
			const core::rect<s32>& rect,
			const core::rect<s32>* clip=0,
			core::rect<s32>* checkClientArea=0);
CImageGUISkin.cpp
from

Code: Select all

core::rect<s32> CImageGUISkin::draw3DWindowBackground(IGUIElement* element,
            bool drawTitleBar, video::SColor titleBarColor,
            const core::rect<s32>& rect,
            const core::rect<s32>* clip)
to

Code: Select all

core::rect<s32> CImageGUISkin::draw3DWindowBackground(IGUIElement* element,
            bool drawTitleBar, video::SColor titleBarColor,
            const core::rect<s32>& rect,
            const core::rect<s32>* clip,
			core::rect<s32>* checkClientArea)
this is to avoid the error of virtual call

Posted: Sat Feb 20, 2010 12:01 am
by CiRiuS2
Thanks Mamnarock :)

Posted: Sun Mar 14, 2010 8:02 pm
by D.Cent
Any idea how to make the checkbox tick white?

@Mammarock: Thank you very much, that helped a lot!

Posted: Mon Mar 15, 2010 1:06 pm
by thespecial1
thanks for this skin, has properly sorted out the look of my gui interface, easy to edit aswell ;0)

Posted: Fri Apr 09, 2010 7:19 pm
by monchito
Help!!
tried with CodeBlocks & irrlicht 1.7 and this is what i got, two errors
located at
gui::CImageGUISkin* skin = new gui::CImageGUISkin(driver, env->getSkin());

Code: Select all

E:\CodeBlockProjects\irrScene\main.cpp|981|error: cannot allocate an object of type `irr::gui::CImageGUISkin'|
because the following virtual functions are abstract:|

E:\irrlicht-1.7.1\include\IGUISkin.h|499|error:  virtual void irr::gui::IGUISkin::draw3DTabButton(irr::gui::IGUIElement*, bool, const irr::core::rect<irr::s32>&, const irr::core::rect<irr::s32>*, irr::gui::EGUI_ALIGNMENT)|

E:\irrlicht-1.7.1\include\IGUISkin.h|512|error:  virtual void irr::gui::IGUISkin::draw3DTabBody(irr::gui::IGUIElement*, bool, bool, const irr::core::rect<irr::s32>&, const irr::core::rect<irr::s32>*, irr::s32, irr::gui::EGUI_ALIGNMENT)|
any idea why this happen?
Thanks in advance

Posted: Fri Apr 09, 2010 7:47 pm
by ent1ty
The name of the topic suggests that it is compatible with Irrlicht 1.5 or 1.6, while you are using 1.7. Yes, I think that is the most likely reason.

Some texture is missing

Posted: Fri Apr 23, 2010 8:18 am
by manik_sheeri
Hi,

I am using this irrext , klasker'sgui for my texture based GUI application.
but I have noticed that in window mode , some of the textures appear missing from the gui elements.(This is usually for the bottom border of the elements).
But everything appears fine in fullscreen mode.

can anybody tell me what could be possible reason behind this?

Posted: Mon May 10, 2010 2:40 pm
by D.Cent
Which renderer do you use, manik_sheeri?

Posted: Fri Jul 09, 2010 10:18 am
by Frank Dodd
Great job on this GUI module. I've only just taken a look at this. Its working very well and is a very easy way to customize the GUI.

The errors that Monchito referred to some months ago are due to changes in the interface defined in IGUISkin (although they are only thrown by the latest dodgy GCC compiler I believe).

Simply check the function declaration in irrlicht/include/IGUISkin.h, to those that are in CImageGUISkin.h and CImageGUISkin.cpp. There are some new parameters in the functions copy them in so they match and you should be good to go.

At the risk of being renamed Frank "Whats the License" Dodd" ... could you clarify the licensing on this please :D

Edit: Asger has kindly returned my mail and clarified that this can be used under any licensing terms.

My contribution

Posted: Fri Jul 30, 2010 3:08 am
by madoc
I've been pokeing a sort psudo project for years on and off teaching myself stuff mostly for fun don't intend anything will ever come of it.
I've been using Klagui for quite awhile with it. FuzzySpoons additions were EXCELLENT but imho stopped 1 step to early.
I never liked that Klagui required code changes to change the skin, so heres what I came up with, I expanded it all a bit.
- Converted it all to an XML 'skin' format (this was technically unnecciary)
- This makes heavy use of a XMLRegistry type class I came up with for load/save of settings.
- Made a skinSystem class thats able to on the fly load/change/apply skins.
- Converted old klagui, fuzzyspoon klagui, and the ones that Christianclavet to my skin format so I could load them.
- Made a quick program to show it off.
I figured I took so much from Klagui/FuzzySpoon I could at least contribute what I came with.

Improvements:
- All colors 'skinable' incl checkboxes, theres two ways to fix the problem where they dont show up under fuzzyspoons, patch irrlicht and fix the fact that checkboxes according the documentation are tired to a certain color but are not. Or the easy way, which I did, override the offending function and fix it.
- Skinable tab control, can be skinned independently of the buttons and stuff, I just have near 0 artistic ability so just setting the tab background and the tab button to the button png from each skin was easiest :)
- Moved all the 'hardcoded' values out of the code and into the xml.
- Built the progress bar into the skinSystem
- Bunch of other stuff
Known issues:
- The xml format is terrible, it uses only attributes, when I wrote that class like 2 years ago my xml knowledge wasnt all that strong.
- Theres an odd white line on the shoulders of the tab control under the fuzzyspoon skin.
- clientrect is broken, I think it has to do with the updates I did to make it work with irrlicht 1.7.1 from an earlier post.


Now is your turn, expand further! (and make more open liscenced skins :) )
All of my mods are available under the 'do whatever the hell you want, I don't care' liscence :)
Remember that all the graphics and a lot of the code belong to previous posters.

Code:
Source and binary included
http://www.mediafire.com/?oz0xiffx23y8ca2
Enjoy!
Image
Image
Image
Treeview control is just something I use to debug stuff in XMLRegistry Class.

Posted: Fri Jul 30, 2010 8:01 am
by serengeor
@madoc Whoa that Looks sweet!

Posted: Fri Jul 30, 2010 11:46 am
by christianclavet
Woa! nice! Thank for improving this... I could try to make new skins now once I have time. Do we need to patch the engine to use it? If someone is able someday, being able to use alpha from texture would be great. (Certain element would be opaque (buttons) other could be semi-transparent (windows)