#include <tads.h>

/*
 * An XTads test game.
 * Focus is on correct layout for several banners that go before a sibling.
 *	b0
 *		b1 above, abs size 3
 *			b2 left, first,     size 5%
 *			b3 left, before b2, size 40%
 *			b4 left, before b2, size=35nu   
 *			b5 left, before b2, size 5%
 */
main(args)
{
	local b0 = nil;

   "Main";

   local b1 = bannerCreate(b0, BannerFirst, nil, BannerTypeText, BannerAlignTop, 3, BannerSizeAbsolute, 0);
	bannerSay(b1, 'b1\nl2\nl3');
	inputKey();
	
	//---
	
	local b2 = bannerCreate(b1, BannerFirst, 0, BannerTypeText, BannerAlignLeft, 5, BannerSizePercent, BannerStyleBorder);
	bannerSay(b2, 'b2');
	inputKey();
   
	//---
	
	local b3 = bannerCreate(b1, BannerBefore, b2, BannerTypeText, BannerAlignLeft, 40, BannerSizePercent, BannerStyleBorder);
	bannerSay(b3, 'b3');
	inputKey();
	
   //---
   
   local b4 = bannerCreate(b1, BannerBefore, b2, BannerTypeText, BannerAlignLeft, 35, BannerSizeAbsolute, 0);
	bannerSay(b4, 'b4');
	inputKey();
   
   //---

	local b5 = bannerCreate(b1, BannerBefore,  b2,  BannerTypeText, BannerAlignLeft, 5, BannerSizePercent, BannerStyleBorder);
	bannerSay(b5, 'b5');
	inputKey();

   //---
    
    "\bPress another key to exit...\n";
    inputKey();
}
