Skip to content
This repository has been archived by the owner on Aug 15, 2021. It is now read-only.

Commit

Permalink
Songsフォルダに何も入ってないときクラッシュするバグを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
NoixChou committed Jul 20, 2019
1 parent 49dc87d commit a2785d7
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Otoge/Game/Scenes/Play/MusicSelect/MusicSelectScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,19 @@ MusicSelectScene::MusicSelectScene() : Scene("MusicSelectScene")
}
}


ListPanel_->GetPanelInstance()->SetScreenHeight((MusicPanels_[0]->GetScreenHeight() + 1.0f) * (MusicPanels_.size() + 1));
ListPanel_->GetPanelInstance()->ReCalculateScreen();
ListPanel_->GetPanelInstance()->RefreshDrawBuffer();
int PanelCount = 0;
for(auto panel : MusicPanels_)
if (!MusicPanels_.empty())
{
panel->SetPositionY((panel->GetScreenHeight() + 1.0f) * PanelCount);
ListPanel_->GetPanelInstance()->AddChildTask(panel);
PanelCount++;
ListPanel_->GetPanelInstance()->SetScreenHeight((MusicPanels_[0]->GetScreenHeight() + 1.0f) * (MusicPanels_.size() + 1));
ListPanel_->GetPanelInstance()->ReCalculateScreen();
ListPanel_->GetPanelInstance()->RefreshDrawBuffer();
int PanelCount = 0;
for (auto panel : MusicPanels_)
{
panel->SetPositionY((panel->GetScreenHeight() + 1.0f) * PanelCount);
ListPanel_->GetPanelInstance()->AddChildTask(panel);
PanelCount++;
}
}

StartFadeIn();
}

Expand Down

0 comments on commit a2785d7

Please sign in to comment.