standardFont = "fonts/corona.mvec";
proportionalFont = "fonts/default.mvec";
comicFont = "fonts/komika_axis.mvec";

kRecordMetricsOnQuit = 1001;

kSpriteWindowDefaultDraw = 0;
kSpriteWindowFlipHorizontal = 1;
kSpriteWindowFlipVertical = 2;

BlackColor = Color(0,0,0,255);
BlueColor = Color(16,225,226,255);
YellowColor = Color(255,255,0,255);
WhiteColor = Color(255,255,255,255);
PurpleColor = Color(255,0,255,255);
MenuRedColor = Color(102,0,0,255);
RedColor = Color(163,11,11,255);
GreenColor = Color(34,253,26,255);
BorderColor = Color(30,42,102,255);
DarkGreenColor = Color(9,106,9,255);



StandardButtonGraphics = {
	"buttons/dialog_button_a1",
	"buttons/dialog_button_a2",
	"buttons/dialog_button_a3"
};

LargeButtonGraphics = {
	"buttons/dialog_button_a_large_1",
	"buttons/dialog_button_a_large_2",
	"buttons/dialog_button_a_large_3"
};

SolidButtonGraphics = {
	"buttons/map_button_a",
	"buttons/map_button_b",
	"buttons/map_button_c"
};



CheckboxButtonGraphics = {
	"buttons/checkbox_a",
	"buttons/checkbox_b",
	"buttons/checkbox_a",
	"buttons/checkbox_b"
};

LeftArrowGraphics = {
	"buttons/left_arrow_a.png",
	"buttons/left_arrow_b.png",
	"buttons/left_arrow_c.png"
};

RightArrowGraphics = {
	"buttons/right_arrow_a.png",
	"buttons/right_arrow_b.png",
	"buttons/right_arrow_c.png"
};

LeftArrow2Graphics = {
	"buttons/arrow2a.png",
	"buttons/arrow2b.png",
	"buttons/arrow2c.png"
};

RightArrow2Graphics = {
	"buttons/arrow1a.png",
	"buttons/arrow1b.png",
	"buttons/arrow1c.png"
};

ComicLeftButtonGraphics = LeftArrowGraphics;


ComicRightButtonGraphics = RightArrowGraphics;


LargeButtonFont = {
  standardFont,
  18,
  MenuRedColor
};

StandardButtonFont = {
  standardFont,
  16,
  MenuRedColor
};

StandardBorderButtonFont = {
  standardFont,
  16,
  BorderColor
};

SmallestButtonFont = {
  standardFont,
  12,
  MenuRedColor
};

SmallButtonFont = {
  standardFont,
  14,
  MenuRedColor
};

SmallBorderButtonFont = {
  standardFont,
  14,
  BorderColor
};

DialogTitleFont = {
  standardFont,
  18,
  BorderColor
};


DialogBodyFont = {
  standardFont,
  18,
  BorderColor
};


kComicPadding = 3;

ComicGiantFont = {
  comicFont,
  35,
  BlackColor
};

ComicBigFont = {
  comicFont,
  27,
  BlackColor
};

ComicKindaBigFont = {
  comicFont,
  22,
  BlackColor
};


ComicMediumFont = {
  comicFont,
  16,
  BlackColor
};


ComicSmallFont = {
  comicFont,
  13,
  BlackColor
};

ComicSmallestFont = {
  comicFont,
  11,
  BlackColor
};

kDefaultButtonSound="audio/sfx/menu_click.ogg";
kDefaultRolloverButtonSound="audio/sfx/menu_rollover.ogg";
DefaultStyle = {
	sound = kDefaultButtonSound,
	rolloversound = kDefaultRolloverButtonSound,
	xoffset = 2,
	yoffset = 2,
	padding = 3
};

SliderStyle = 
{
	parent=DefaultStyle,
	railtop = "buttons/sliderrailtop",
	railmid = "buttons/sliderrailmid",
	railbot = "buttons/sliderrailbot",
	sliderimage = "buttons/sliderknob",
	yoffset = 1,
	sliderrollimage = "buttons/sliderknobover",
};

ScrolledWindowStyle=
{
	parent= SliderStyle,
	flags=kHAlignLeft+kVAlignTop,
};

SmallButtonStyle =
{
	parent=DefaultStyle,
	scale=0.8,
	font=SmallButtonFont,
	graphics=StandardButtonGraphics,
	type = kPush
};

SmallestButtonStyle =
{
	parent=DefaultStyle,
	scale=0.6,
	font=SmallButtonFont,
	graphics=StandardButtonGraphics,
	type = kPush
};

StandardButtonStyle =
{
	parent=DefaultStyle,
	font=StandardButtonFont,
	graphics=StandardButtonGraphics,
	type = kPush
};

SolidButtonStyle =
{
	parent=DefaultStyle,
	font=StandardBorderButtonFont,
	graphics=SolidButtonGraphics,
	xoffset = 0,
	yoffset = 0,
	type = kPush
};


SetDefaultStyle(DefaultStyle);

kIllegalNameChars = "!@#$%^&*()><\\\"\'[]{}|?/+=~`.,;:-";

kDisableFade = 0.5;


function SwapToModalSetName( winName )
	SetWindowNameMetric(winName);
	SwapToModal(winName);
end

function SwapToModalSetNameWithTip( winName, tipString, showTip )
	SetWindowNameMetric(winName);
	SwapToModalSetName(winName);
	
	if (showTip == true) then
		DisplayDialog { 
			"scripts/bigok.lua", 
			body =tipString,
			title = ""
		};
	end
end

function DoModalWithTip( fileToRead, tipString, showTip )

	local id = PushModal( fileToRead );
	--DebugOut("DoModal "..fileToRead.." started! id="..id);
	ReadFile( fileToRead ) ;
	
	if (showTip == true) then
		DisplayDialog { 
			"scripts/bigok.lua", 
			body =tipString,
			title = ""
		};
	end
	
	SetTopModalOnly(true);

	WaitForCloseMessage(id);
	
	SetTopModalOnly(false);
	
    local temp = gReturnValue;
    gReturnValue = nil ;
    return temp ;
end