#include "std.mi"

Function Fn_ReSizeButton(Button b, int TargetX, int TargetY, Float Speed, int TargetA);


Global Group		grpMain;
Global Group		grpAlubumArtbtn;
Global Group		grpAlbmArt;
Global ToggleButton	btnAlbArt;
Global int 		intState;

System.onScriptLoaded() {

	grpMain 	= getScriptGroup();
	grpAlubumArtbtn	= grpMain.findObject("AlubumArt_Button.Group");
	grpAlbmArt	= grpMain.findObject("AlbumArt.Group");
	btnAlbArt	= grpAlubumArtbtn.findObject("AlubumArt_Button");
	intState	= System.getPrivateInt("PMasiro", "AlubumArt", 0);

	if (intState == 0){

		grpAlbmArt.Show();
	}
	else if(intState == 1){

		grpAlbmArt.Hide();
	}
}

System.onScriptUnloading() {

	System.setPrivateInt("PMasiro", "AlubumArt", intState);
}

btnAlbArt.onLeftButtonUp(int x, int y) {


	if (intState == 0){

		grpAlbmArt.Hide();
	}
	else if(intState == 1){

		grpAlbmArt.Show();
	}
	
	System.setPrivateInt("PMasiro", "AlubumArt", intState);

	intState ++;
	if(intState >=2) intState = 0;

}
