Game Development Community

Pb with mouse cursor on dynamic button

by Maxime Jouin · in Torque Game Engine · 12/28/2007 (1:07 am) · 4 replies

Hi all,

Here is my pb:

I have to build a menu including some known buttons and some dynamic buttons.
Known buttons are describ in my gui file.
Dynamic ones are build in my CPP code after the menu is displayed.

Everything is ok except the mouse cursor.
When i roll over the known button, the bitmap of the button changes and the mouse cursor changes too. that's the nominal case.
When i roll over the dynamic buttons, the bitmap of the button changes but not the mouse cursor.

Thanks for your help.
Enjoy life!!

#1
12/28/2007 (4:49 am)
What is a pb?
#2
12/28/2007 (5:16 am)
My guess would be 'pb' = problem.
#3
12/28/2007 (6:22 am)
Yep. pb for problem.

Sorry, I'm french and we use this short word for 'problem' in french. I though in english too.

Any idea for my case?
Did i have to initialize a field of my BitmapButtonCtrl when i create it from my C++ code?
#4
01/03/2008 (6:49 am)
Ok, after many hours on my problem, i find the solution. So i post it to help the communauty:

Just call explicitely the onAdd() method of your bitmapbuttonctrl.

Have a nice day and enjoy your life.