//
//  A T2 test game: 
//			a lhs banner that changes width: 
//				unspecified (to-contents), previous, previous, ...
//

#include <adv.t>
#include <std.t>

startroom: room
   sdesc = "XTads T2 banner test"
   ldesc = "Should show a lhs banner that changes width: unspecified (to-contents), previous, previous, ..."
   turnCount = 0
   widths = [nil, 'previous', 'previous']
	statusLine =
		{
		local cycleCount;
		local width;
		local widthAttr;
		
		turnCount += 1;
		cycleCount := ((turnCount - 1) % length(widths)) + 1;
		width := widths[cycleCount];
		if (width = nil) {
			widthAttr := '';
		} else {
			widthAttr := ('width=' + width);
		}
		
		"<banner id=custStatusLine align=left <<widthAttr>> border>
			banner text <<turnCount>>, <<widthAttr>>
		</banner>";
		}
;

replace commonInit: function
{
    // turn on html mode
    "\H+";
}
