[fixed]Irrlicht 1.8.0-alpha IGUISkinSetFont()

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
DJLinux
Posts: 19
Joined: Fri Dec 02, 2011 4:39 am
Location: germany
Contact:

[fixed]Irrlicht 1.8.0-alpha IGUISkinSetFont()

Post by DJLinux »

This example changed the Button and ToolTip font in version 1.7.3.
With Irrlicht 1.8.0-alpha the ToolTip font are changed only.

I don't know, is it a bug or a new "feature" ?

Is enum EGDF_BUTTON are ignored or removed from 1.8.0-alpha ?

Don't worry about the code it's a new language binding
However it works with 1.7.3 so it must be a problem with the 1.8.0-alpha branch

DJ.
Image

Code: Select all

dim Device   as IrrlichtDevice  = CreateDevice()
dim Driver   as IVideoDriver    = DeviceGetVideoDriver(Device)
dim GUIEnv   as IGUIEnvironment = DeviceGetGUIEnvironment(Device)
dim GUISkin  as IGUISkin        = GUIEnvironmentGetSkin(GUIEnv)
dim NoParent as IGUIElement     ' is NULL !
dim Button   as IGUIButton      = GUIEnvironmentAddButton(GUIEnv,10,30,50,50,NoParent,1,"Text","ToolTip")
dim GUIFont  as IGUIFont        = GUIEnvironmentGetFont(GUIEnv,"media/system12.xml")
' replace the default gui skin font for Button and ToolTip
GUISkinSetFont(GUISkin,GUIFont,EGDF_BUTTON)  ' !!! <--- ignored in Irrlicht 1.8.0-alpha
GUISkinSetFont(GUISkin,GUIFont,EGDF_TOOLTIP)
 
DeviceSetWindowCaption(Device,"GUIFont")
while DeviceRun(Device)
  if DeviceIsWindowActive(Device) then
    VideoDriverBeginScene(Driver,128,128,128)
      ' SceneMangerDrawAll(Scene)
      GUIEnvironmentDrawAll(GUIEnv)
    VideoDriverEndScene(Driver)
  endif
  if IsKeyDown(KEY_ESCAPE) then
    DeviceCloseDevice(Device)
  endif
  DeviceSleep(Device,20)
wend
DeviceDrop(Device)
Last edited by DJLinux on Sat Apr 28, 2012 1:42 pm, edited 1 time in total.
(Sorry about my bad English)
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht 1.8.0-alpha IGUISkinSetFont(IGUIFont,EGDF_BUTTO

Post by CuteAlien »

Good find, thanks for reporting. It's now fixed again.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply