Hi, here is some questions i had after readin the tutorial about makin a user interface :
1) How can i set the font size?
2) How can i make a display of a int variable?
3) When i try to load a fond texture, i have that: "The amount of upper pixels or lower corner pixels is == 0,font file may be corrupted", and i see a blue fons, what can i do?
Thank you
varied questions
Re: varied questions
This depends on the size of the fonts in your bitmap. The IrrFontTool allows you to pick the font size before creating the bitmap with the font on it.haraelendil wrote:1) How can i set the font size?
haraelendil wrote:2) How can i make a display of a int variable?
Code: Select all
core::stringw wStr = "This is my integer - ";
wStr += (int)var;
What font texture are you trying to load?haraelendil wrote:3) When i try to load a fond texture, i have that: "The amount of upper pixels or lower corner pixels is == 0,font file may be corrupted", and i see a blue fons, what can i do?
-
- Posts: 6
- Joined: Sun Jan 30, 2005 4:56 pm
2.) i guess he means something like this:
core::stringw wStr = "This is my integer - ";
wStr += (int)var;
guienv->addStaticText(wStr, rect<int>(10,10,200,22), true);
3.) in the irrlicht directory there is a folder called Tools, which contains a Font converter. you can convert standart font files with that tool to font bitmaps which you then can use in irrlicht.
core::stringw wStr = "This is my integer - ";
wStr += (int)var;
guienv->addStaticText(wStr, rect<int>(10,10,200,22), true);
3.) in the irrlicht directory there is a folder called Tools, which contains a Font converter. you can convert standart font files with that tool to font bitmaps which you then can use in irrlicht.
-
- Posts: 6
- Joined: Sun Jan 30, 2005 4:56 pm
2)
it's what i tried, but doesn't work:
no matching function for call to `irr::gui::IGUIEnvironment::addStaticText(irr::core::stringw&, irr::core::rect<irr::s32>, bool)'
candidates are: virtual irr::gui::IGUIStaticText* irr::gui::IGUIEnvironment::addStaticText(const wchar_t*, const irr::core::rect<irr::s32>&, bool, bool, irr::gui::IGUIElement*, irr::s32)
3) ok, thanks
it's what i tried, but doesn't work:
no matching function for call to `irr::gui::IGUIEnvironment::addStaticText(irr::core::stringw&, irr::core::rect<irr::s32>, bool)'
candidates are: virtual irr::gui::IGUIStaticText* irr::gui::IGUIEnvironment::addStaticText(const wchar_t*, const irr::core::rect<irr::s32>&, bool, bool, irr::gui::IGUIElement*, irr::s32)
3) ok, thanks
-
- Posts: 370
- Joined: Mon Aug 29, 2005 10:54 pm
- Location: http://web.utk.edu/~pfox1