TextWindows...changing a specific corner sprite on the fly **SOLVED**

Started by Knox, Wed 13/10/2010 00:30:42

Previous topic - Next topic

Knox

I looked up the textWindow properties and I could only seem to find background image, but nothing for the specific corner sprites...

How could I change a corner's bottom left-hand or right-hand graphic (in my case ID 1 or ID 3) with a script?

I could just create a new textWindow GUI with the appropriate sprites...but I wanted to know if it can be done by just switching the id's graphic.

Something like :
Code: ags

void processBubbleSide(string sSide)
{
  if (sSide == "Left") gTextWindow.TextWindowEdgeGraphic(1) = 45;
  else if (sSide == "Right") gTextWindow.TextWindowEdgeGraphic(3) = 46;
}


The number in the parenthesis would be the TextWindowEdge's ID (1 is bottom left corner, 3 is the bottom-right corner)

This will enable me to have a bubble-arrow on the appropriate side depending on where the character's portrait shows up.

ps: If this isnt possible, Ill just make a 2nd textWindow gui and switch between the 2 gui's instead :P
--All that is necessary for evil to triumph is for good men to do nothing.

Khris

It should be possible using the .Controls[] array:
  gTextWindow.Controls[1].AsButton.NormalGraphic = 45;

Knox

ok cool Im going to try that tomorrow morning!

**It works!

thanks :)
--All that is necessary for evil to triumph is for good men to do nothing.

SMF spam blocked by CleanTalk