require( "scripts/style.lua" );

LeftButtonGraphics = {
	"buttons/arrowleft_up",
	"buttons/arrowleft_down",
	"buttons/arrowleft_over"
};


MakeDialog
{
	name="rankingconteiner", -- Remember, this is like saying table['name']=name, so it works.
	fit=true,
	
	Bitmap
	{
		image="backgrounds/shade",
		alpha = 0.99,
	},

    Bitmap
    {
		image="gui/ranking/bg",
		x=kCenter,
		y=kCenter,

		fit=true,

		SetStyle(DialogTitleText),
        Text
		{
			name = "rankingtitle",
			label= "rankingheader",
			y=25,
		},
        Text
		{
			name = "profilename",
			label= "player",
			flags = kHAlignCenter + kVAlignCenter,
			x = 33, y = 75,
			w = 189, h = 104,
			font = 
			{
				standardFont,
				40,
				BlackColor,
			}
		},
        Text
		{
			name = "total",
			label= "total",
			flags = kHAlignCenter + kVAlignCenter,
			x = 819, y = 80,
			w = 151, h = 104,
			font = 
			{
				standardFont,
				40,
				BlackColor,
			}
		},
		Ranking
		{
			x=0,y=0,
			w=kMax,h=kMax,
			name="ranking",
			SetStyle(ButtonStyle),
			Button
			{
				name = "prevpage",
				graphics = LeftButtonGraphics,
				--flags = 5,
				x = 908,
				y = 660,
				command=function()
						PrevPage();
					end;
			},
			Text
			{
				name = "pagetext",
				label = "#1/1",
				flags = kHAlignCenter + kVAlignCenter,
				x = 930, y = 662,
				w = 38, h = 25,
				font = 
				{
					standardFont,
					25,
					BlackColor,
				}
			},
			Button
			{
				name = "nextpage",
				graphics = LeftButtonGraphics,
				--flags = 5,
				x = 965,
				y = 660,
				hflip=true,
				command=function()
						NextPage();
					end;
			},
		},
		
        Button
		{
			w=103,h=78,
			clickSound = "audio/sfx/buttons/default_click.ogg",
			command = function()
						PlayCloseSound();
					  end;
			graphics = {
				"buttons/blueidle",
				"buttons/bluedown",
				"buttons/blueover"
				},
			font = StandardButtonFont,
			close = true,
			flags = 5,
			label = "ok",
			name = "ok",
			tw=kMax-8,
			th=kMax-2,
			x = 460,
			y = 660,
		},
    },
	PlayPopupSound();
} -- MakeDialog
