Jeck - Reverting r1183.
This commit is contained in:
@@ -248,21 +248,17 @@ void ShopItems::Update(float dt){
|
||||
}else{
|
||||
if (showPriceDialog!=-1){
|
||||
ShopItem * item = ((ShopItem *)mObjects[showPriceDialog]);
|
||||
if(item){
|
||||
int price = item->price;
|
||||
char buffer[4096];
|
||||
sprintf(buffer,"%s : %i credits",item->getText(),price);
|
||||
if(!dialog){
|
||||
dialog = NEW SimpleMenu(1,this,resources.GetJLBFont(Constants::MENU_FONT),SCREEN_WIDTH-300,SCREEN_HEIGHT/2,buffer);
|
||||
dialog->Add(1,"Yes");
|
||||
dialog->Add(2,"No");
|
||||
}
|
||||
else{
|
||||
dialog->Update(dt);
|
||||
}
|
||||
int price = item->price;
|
||||
char buffer[4096];
|
||||
sprintf(buffer,"%s : %i credits",item->getText(),price);
|
||||
if(!dialog){
|
||||
dialog = NEW SimpleMenu(1,this,resources.GetJLBFont(Constants::MENU_FONT),SCREEN_WIDTH-300,SCREEN_HEIGHT/2,buffer);
|
||||
dialog->Add(1,"Yes");
|
||||
dialog->Add(2,"No");
|
||||
}
|
||||
else{
|
||||
dialog->Update(dt);
|
||||
}
|
||||
else
|
||||
JGuiController::Update(dt);
|
||||
}else{
|
||||
u32 buttons[] = {PSP_CTRL_LEFT,PSP_CTRL_DOWN,PSP_CTRL_RIGHT,PSP_CTRL_UP,PSP_CTRL_CIRCLE};
|
||||
for (int i = 0; i < 5; ++i){
|
||||
@@ -317,8 +313,7 @@ void ShopItems::Render(){
|
||||
if(mCurr >= 0){
|
||||
mFont->SetColor(ARGB(255,255,255,0));
|
||||
ShopItem * item = ((ShopItem *)mObjects[mCurr]);
|
||||
if(item)
|
||||
mFont->DrawString(item->mText.c_str(), SCREEN_WIDTH/2 - 50, SCREEN_HEIGHT - 14,JGETEXT_CENTER);
|
||||
mFont->DrawString(item->mText.c_str(), SCREEN_WIDTH/2 - 50, SCREEN_HEIGHT - 14,JGETEXT_CENTER);
|
||||
mFont->SetColor(ARGB(255,255,255,255));
|
||||
}
|
||||
|
||||
@@ -331,7 +326,7 @@ void ShopItems::Render(){
|
||||
if (i == mCurr) mFont->SetColor(ARGB(255,255,255,0));
|
||||
else mFont->SetColor(ARGB(255,255,255,255));
|
||||
char buffer[512];
|
||||
sprintf(buffer, "%s", s ? s->getText() : "error");
|
||||
sprintf(buffer, "%s", s->getText());
|
||||
float x = 300;
|
||||
float y = 10 + 20*i;
|
||||
mFont->DrawString(buffer,x,y);
|
||||
|
||||
Reference in New Issue
Block a user