Finally, another update. Aside from bug fixes and more validation, here's the major new stuff:
- New functions: Tango_Sync(), @sync(), @else(), @elseif(), @goto(), @close(), @pressa(), @menuwait()
- New variable: @style
- Persistent string style flag
- Complex backdrops can now have text
- It's possible (optionally) to cancel from menus now
- New input functions allow you to change what buttons are used
- String control code \25 works in messages now
I might've missed a few things there.
If you're already using it, a couple of things will need updated. The newline character is now 26 (since that's how \25 is stored), @domenu() now takes an argument, and @waituntil(@chosen) is no longer needed afterward. @menuwait() is used when something other than the string creates the menu.
Edit: And now I've found a couple of problems. :p If you don't want errors in allegro.log, change these bits, both in tango/common.zh.
At the end of __Tango_SetCurrentString(), replace
Code:
__Tango_Data[__TCS_FONT]=
__Tango_Styles[styleStart+TANGO_STYLE_TEXT_FONT];
with
Code:
if(style!=TANGO_INVALID)
__Tango_Data[__TCS_FONT]=
__Tango_Styles[styleStart+TANGO_STYLE_TEXT_FONT];
else
__Tango_Data[__TCS_FONT]=TANGO_INVALID;
And in __Tango_GetStringFlags(), add a bit after the first line:
Code:
int dataStart=stringID*__TANGO_SIZEOF_DATA;
if(__Tango_StringData[dataStart+__TSDIDX_STYLE]==TANGO_INVALID)
return 0;