hey all
I created a row of 12 buttons by customizing the GUI button action.
what i did was i added a for loop to the OnGUI() function.
the code for the OnGUI() looks like this:
public override void OnGUI()
{
base.OnGUI();
bool pressed = false;
for(int i = 0; i < ButtonAmount.Value; i++)
{
if (GUI.Button(new Rect((Screen.height/9)*i, top.Value, Screen.height/10,
Screen.height/10), content, style.Value))
{
storeResult.Value = i;
Fsm.Event(sendEvent);
pressed = true;
}
}
if (storeButtonState != null)
{
storeButtonState.Value = pressed;
}
}
The buttons are functioning as they should, except the Textures.
i want at least 3 textures to switch at each click for each button.
already tried using arrays that's holds the textures but without success.
help will be most appreciated
tnx