dofile( "scripts/integration/position_data.lua" );
dofile( "scripts/game_style.lua" );

dofile( "scripts/actionbar.lua" );
dofile( "scripts/auction.lua" );
dofile( "scripts/advisor.lua" );
dofile( "scripts/buildrailroad.lua" );
dofile( "scripts/buildnormal.lua" );
dofile( "scripts/buildspecial.lua" );
dofile( "scripts/chanceview.lua" );
dofile( "scripts/districtcard.lua" );
dofile( "scripts/freeparking.lua" );
dofile( "scripts/go.lua" );
dofile( "scripts/gotojail.lua" );
dofile( "scripts/jailview.lua" );
dofile( "scripts/justvisiting.lua" );
dofile( "scripts/industrytaxview.lua" );
dofile( "scripts/mortgage.lua" );
dofile( "scripts/negativebalance.lua" );
dofile( "scripts/planningpermission.lua" );
dofile( "scripts/playerintervention.lua" );
dofile( "scripts/playerpanel.lua" );
dofile( "scripts/playerdeal.lua" );
dofile( "scripts/tooltip.lua" );
dofile( "scripts/earthquake.lua" );
dofile( "scripts/buildhazard.lua" );
dofile( "scripts/resigndialog.lua" );
dofile( "scripts/achievement.lua" );
dofile( "scripts/historylog.lua" );
dofile( "scripts/genericmessagebox.lua" );


dofile( "board/board_export.lua" );
dofile( "hud/chance/chance.lua" );

--dofile( "scripts/integration/typo_bible.lua" );

kXSmallBtn = 350;
kYSmallBtn = 550;
kXSmallBtn_space = 80;

--WriteOnDebugConsole(kLevelToLoad);

kX_BuildPopup_Btn = 640;
kY_BuildPopup_Btn = 323;
kYSpace_BuildPopup_Btn = 22;

			
MakeDialog
{
	name = "MonopolyGameDlg",
	
	fit=true;
	Bitmap
	{
		name="backgroundimage",
		image="board/bg_boardbg",
	},

	GameWindow
	{
		name = "MonopolyGameWindow",
		x = 0,
		y = 0,
		w=800,
		h=600,
	
		Bitmap
		{
			name="fade",
			image="hud/black_bg",
			x=0,
			y=0,
			w=4,
			h=3,
			alpha=true,
			scale=256,
		},	
		
		Text
		{
			name = "upper_text",
			font = White30Font,
			x = 0,
			y = 80,
			w = kMax,
			h = kMax,
			flags = kHAlignCenter + kVAlignTop,
			label = ""
		},
		
		Text
		{
			name = "lower_text",
			font = White18Font,
			x = 0,
			y = 490,
			w = kMax,
			h = kMax,
			flags = kHAlignCenter + kVAlignTop,
			label = ""
		},
			  		
		-- player panels
		Window
		{
			name = "playerpanels";
			x = 0,
			y = 0,
			w = kMax,
			h = kMax,
			
			Group(upperleftplayerpanel_group);
			Group(upperrightplayerpanel_group);
			Group(lowerrightplayerpanel_group);
			Group(lowerleftplayerpanel_group);
		};
		
		-- in jail assets
		Group(jailview_group);

		-- board assets
		sprites = psd2window_board_export();
		
		-- auction assets
		Group(auctiondialog_group);
		Group(bidpopup_group);   
		
		-- build normal assets
		Group(buildnormalview_group);
		
		-- build special assets
		Group(buildspecialview_group);

		-- planning permission assets
		Group(planningpermissionview_group);
		
		-- earthquake assets
		Group(earthquakeview_group);
		
		-- build hazard assets (for chance cards)
		Group(buildhazard_group);
		
		-- build railroad
		Group(buildrailroadview_group);
		
		-- mortgage railroad
		Group(mortgageview_group);
	
		-- chance view assets
		Group(chanceview_group);

		-- industry tax assets
		Group(industrytaxview_group);
		
		-- go assets
		Group(go_group);
		
		-- just visiting assets
		Group(justvisiting_group);
		
		-- free parking assets
		Group(freeparking_group);
		
		-- "Go to jail" assets
		Group(gotojail_group);
		 
		 -- negative balance assets
		Group(negativebalance_group);  
		
		 -- player intervention assets
		Group(intervention_group);  
		
		-- advisor
		Group(advisor_group);

		 -- district card assets
		Group(districtcard_group); 
		
		-- chance card
		Group(chancecard_group);	
		
		-- Auction winner popup (after district card)
		Group(auctionwin_group);

		-- Deal interface
		Group(dealinterface_group);
		
		-- resign dialog
		Group(resigndialog_group);
		
		-- history dialog
		Group(resigndialog_group);
		
		-- achievement popup
		Group(achievement_group);
		
		-- Generic Dialog Group	  
		Group(genericdialog_group);
	  
		-- action bar assets
		Group(actionbar_group);

		-- history log
		Group(historylog_group);
		
		-- player turn text
		Text
		{
			name = "player_turn_text",
			font = White60Font,
			x = 0,
			y = 0,
			w = kMax,
			h = kMax,
			flags = kHAlignCenter + kVAlignCenter,
			label = ""
		},
		
		-- tooltip
		Group(tooltip_group);
		
		-- Cancel button 
		-- (used in action bar and on top of taxi button)
		MonopolyButton
		{
			graphics =
			{
				'hud/btn_undo_01',
				'hud/btn_undo_02',
				'hud/btn_undo_03',
			};
			name='select_district_cancel';
			x=250;
			y=50;
			tooltip = "over.undo",
			tooltip_x = 250 + 0.5 * 34,
			tooltip_y = 50 - 15,
			command=	
				function()
					SendCustomGameMessage("OnSelectDistrictCancel");
				end;
		},
		
		-- fade for in game pause
		Bitmap
		{
			name="over_fade",
			image="hud/black_bg",
			x=0,
			y=0,
			w=4,
			h=3,
			alpha=true,
			scale=256,
		},
		
		-- paused text
		Text
		{
			name = "paused_text",
			font = White60Font,
			x = 0,
			y = 0,
			w = kMax,
			h = kMax,
			flags = kHAlignCenter + kVAlignCenter,
			label = "ui.ingame.pause"
		},
	},
}

SetFocus("MonopolyGameDlg"); 
 