New GUI skin [update: new skins, support for 1.5/1.6]
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.
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.
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
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
The dimension2di needs to be changed to dimension2du. That should clear up that error.
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.
Suport 1.7
to use it with irrlicht 1.7
do the following modifications
CImageGUISkin.h
from
to
CImageGUISkin.cpp
from
to
this is to avoid the error of virtual call
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)
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);
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)
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)
-
- Posts: 135
- Joined: Thu Oct 30, 2008 11:56 am
- Location: UK
- Contact:
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());
any idea why this happen?
Thanks in advance
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)|
Thanks in advance
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.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
-
- Posts: 53
- Joined: Tue May 19, 2009 12:18 am
Some texture is missing
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?
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?
-
- Posts: 208
- Joined: Sun Apr 02, 2006 9:20 pm
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
Edit: Asger has kindly returned my mail and clarified that this can be used under any licensing terms.
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
Edit: Asger has kindly returned my mail and clarified that this can be used under any licensing terms.
My contribution
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!
Treeview control is just something I use to debug stuff in XMLRegistry Class.
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!
Treeview control is just something I use to debug stuff in XMLRegistry Class.
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact: