
#include <oslib/oslib.h>


PSP_MODULE_INFO("Devslib Sample", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);


//declaration
void Touche();


OSL_CIRCLE_MENU *Menu;



int main(int argc, char* argv[])
{


	//Initialisation
	oslInit(0);							//la lib
	oslInitGfx(OSL_PF_8888, 1);			//Gfx
	oslInitAudio();						//Sound


	//Tres compliquer car beaucoup de variable desoler :) effet garentie
	Menu = oslCreateCircleMenu("media/icons.png", 4, 180, 0, 80 , 80,40,240,20,120);


	while (!osl_quit)
	{
		//Debut du dessin
		oslStartDrawing();
		oslCls();

		oslMenuUpdateIcons(Menu);
	
		Touche();

		oslSynchronization();

	}

	oslEndGfx();
	oslQuit();
	return 0;
}





//gestion des touches ^^
void Touche()
{
	oslReadKeys();

   if (osl_keys->pressed.left)
    {
	oslMenuMoveIcons(Menu,1);
    }
    if (osl_keys->pressed.right)
    {
	oslMenuMoveIcons(Menu,0);
    }
	
}

