|
|
|
@ -288,12 +288,12 @@ class ChampionsLeaguePointSolver : public olc::PixelGameEngine |
|
|
|
|
|
|
|
|
|
for(int i=0;i<inputButtons.size();i++){ |
|
|
|
|
if(i==0){ |
|
|
|
|
inputButtons[i]=new QuickGUI::Button(gui,std::to_string(i),{2.f+(1%3)*50,ScreenHeight()-(4-9/3)*26.f},{48,24}); |
|
|
|
|
inputButtons[i]=new QuickGUI::Button(gui,std::to_string(i),{2.f+(1%3)*50,ScreenHeight()-(4-9/3)*26.f},{49,25}); |
|
|
|
|
}else |
|
|
|
|
if(i==10){ |
|
|
|
|
inputButtons[i]=new QuickGUI::Button(gui,"<--",{2.f+(2%3)*50,ScreenHeight()-(4-9/3)*26.f},{48,24}); |
|
|
|
|
inputButtons[i]=new QuickGUI::Button(gui,"<--",{2.f+(2%3)*50,ScreenHeight()-(4-9/3)*26.f},{49,25}); |
|
|
|
|
}else{ |
|
|
|
|
inputButtons[i]=new QuickGUI::Button(gui,std::to_string(i),{2.f+((i-1)%3)*50,ScreenHeight()-(4-(i-1)/3)*26.f},{48,24}); |
|
|
|
|
inputButtons[i]=new QuickGUI::Button(gui,std::to_string(i),{2.f+((i-1)%3)*50,ScreenHeight()-(4-(i-1)/3)*26.f},{49,25}); |
|
|
|
|
} |
|
|
|
|
inputButtons[i]->bVisible=false; |
|
|
|
|
inputButtons[i]->Enable(false); |
|
|
|
@ -344,6 +344,10 @@ class ChampionsLeaguePointSolver : public olc::PixelGameEngine |
|
|
|
|
bestComboB={}; |
|
|
|
|
} |
|
|
|
|
QuickGUI::TextBox*prevActiveBox=activeBox; |
|
|
|
|
if(GetMouse(0).bPressed&&(GetMouseY()<ScreenHeight()-(4-(0-1)/3)*26+2||GetMouseX()>2+((10-1)/3)*50+2)){ |
|
|
|
|
prevActiveBox=nullptr; |
|
|
|
|
activeBox=nullptr; |
|
|
|
|
} |
|
|
|
|
gui.Update(this); |
|
|
|
|
gui.Draw(this); |
|
|
|
|
|
|
|
|
@ -368,9 +372,13 @@ class ChampionsLeaguePointSolver : public olc::PixelGameEngine |
|
|
|
|
TextEntryEnable(true,prevActiveBox->sText); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
for(int i=0;i<inputButtons.size();i++){ |
|
|
|
|
inputButtons[i]->bVisible=false; |
|
|
|
|
inputButtons[i]->Enable(false); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(calculating){ |
|
|
|
|
activeBox=nullptr; |
|
|
|
|
if(calculationStep<cases.size()){ |
|
|
|
@ -388,7 +396,7 @@ class ChampionsLeaguePointSolver : public olc::PixelGameEngine |
|
|
|
|
SongCombinations picked1,picked2; |
|
|
|
|
for(SongCombinations&A:bestComboA){ |
|
|
|
|
for(SongCombinations&B:bestComboB){ |
|
|
|
|
if(A.totalEX+B.totalEX>highestEX&&A.p1Picked.size()+B.p1Picked.size()==4&&A.p2Picked.size()+B.p2Picked.size()==4&&A.p3Picked.size()+B.p3Picked.size()==4){ |
|
|
|
|
if(A.totalEX+B.totalEX>highestEX&&A.p1Picked.size()+B.p1Picked.size()<=4&&A.p2Picked.size()+B.p2Picked.size()<=4&&A.p3Picked.size()+B.p3Picked.size()<=4){ |
|
|
|
|
highestEX=A.totalEX+B.totalEX; |
|
|
|
|
picked1=A; |
|
|
|
|
picked2=B; |
|
|
|
|