Mouseover buttons
by Jendrik Posche · in Torque Game Engine · 08/12/2008 (5:01 am) · 1 replies
Hi All,
Im trying to create a button that has a mouse over. I've read that the file names should be:
button_n.png
button_i.png
button_d.png
button_h.png
However when I have these images in my directory, i only get the normal button.png. When I open the console I'm seeing the following error:
Could not locate texture:/button.png_d
Could not locate texture:/button.png_i
Could not locate texture:/button.png_h
But when I use
button.png_d
button.png_i
button.png_h
I get the following error:
ResourceObject::construct: NULL resource create function for 'button.png_h'
Warning/engine/core/resmanager.cc 793 ResourceObject::construct: NULL resource create function.
How come it's adding _h/_d/_i after the extension? And how come it resmanager can't load the image.
I'm using TGE 1.5.2 here.
Regards
Im trying to create a button that has a mouse over. I've read that the file names should be:
button_n.png
button_i.png
button_d.png
button_h.png
However when I have these images in my directory, i only get the normal button.png. When I open the console I'm seeing the following error:
Could not locate texture:
Could not locate texture:
Could not locate texture:
But when I use
button.png_d
button.png_i
button.png_h
I get the following error:
ResourceObject::construct: NULL resource create function for 'button.png_h'
Warning
How come it's adding _h/_d/_i after the extension? And how come it resmanager can't load the image.
I'm using TGE 1.5.2 here.
Regards
Associate Scott Burns
GG Alumni
Example:
new GuiBitmapButtonCtrl(OverlayQuitPage) { profile = "GuiButtonProfile"; horizSizing = "left"; vertSizing = "bottom"; position = "614 10"; extent = "16 14"; minExtent = "8 2"; visible = "1"; command = "quit();"; text = "Button"; groupNum = "-1"; buttonType = "PushButton"; [b]bitmap = "./arrows/exit";[/b] helpTag = "0"; };Torque takes the base name of the texture you're looking for, adds the _whatever, and then looks for that texture starting in the folder that was initially designated. It will check for all the extensions that Torque supports and if it doesn't find it the first time it will then start moving up directories and looking there.