require( "scripts/style.lua" );

kButtonSpacing = 60;	-- Put our buttons 60 pixels apart
kButtonY = kCenter-60;	-- Three buttons means center 60 pixels above the center

MakeDialog
{
	WndEditEdge
	{
		fit = true;

	-- Name the modal dialog
	name="editedgecost",
	Bitmap
	{
		image="backgrounds/dialog",
		x=kCenter,
		y=kCenter,
		
		Text
		{
			name = "label1",
			x=kCenter,
			y=kButtonY,
			w=200,
			h=100,
		},
		
		TextEdit
		{
			name = "edit1",
			x=kCenter+200,
			y=kButtonY,
			w=200,
			h=100,
			label = "cost",
		},

		SetStyle(ButtonStyle),
		Button
		{
			name = "btnOk",
			x=kCenter,
			y=kButtonY,
			label="ok",
			command=
				function()
					-- Pop up an options screen
					SetEdgeCost(from, to, GetLabel("edit1"));
					CloseWindow();
				end
		},
		
		Button
		{
			x=kCenter,
			y=kButtonY + (kButtonSpacing * 1),
			label="cancel",
			close = true -- just closes -> no action
		},
	},
	},	
}