Artic_Ice83
18-12-2007 13:30:11
Hi!
With the previous version of quick gui (the 0.97 pre release before the SVN updates), for make a rollover effect on text box i did setTexture("image.png"), but now this option isn't available.
so, since in the forum there's a thread that explain a metod to change for example the texture of a button with the function setSkinComponent(".image.png") i tryed that, but the application crashes when i go over the text box.
this is the trunk of code (i don't remember the exact code...but this is similar...):
for the event handlers:
i tryed also to change the entire skin and all goes, but when i go over the text box appear also the text cursor (i don't want it to appear...). if i delete the cursor image for the over status, it crashes...
With the previous version of quick gui (the 0.97 pre release before the SVN updates), for make a rollover effect on text box i did setTexture("image.png"), but now this option isn't available.
so, since in the forum there's a thread that explain a metod to change for example the texture of a button with the function setSkinComponent(".image.png") i tryed that, but the application crashes when i go over the text box.
this is the trunk of code (i don't remember the exact code...but this is similar...):
textBox = win->createTextBox();
textBox->setText("example text");
textBox->addEventHandler(MOUSE_ENTER, &MyClass::mouseEnter, this);
textBox->addEventHandler(MOUSE_LEAVE, &MyClass::mouseLeave, this);
for the event handlers:
void mouseEnter(const ... &args)
{
textBox->setSkinComponent(".image.png");
}
void mouseLeave(const ... &args)
{
textBox->setSkinComponent(".textbox.png");
}
i tryed also to change the entire skin and all goes, but when i go over the text box appear also the text cursor (i don't want it to appear...). if i delete the cursor image for the over status, it crashes...