All done!
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
ecf5f876a0
commit
2da216bbf3
@ -288,12 +288,12 @@ class ChampionsLeaguePointSolver : public olc::PixelGameEngine
|
|||||||
|
|
||||||
for(int i=0;i<inputButtons.size();i++){
|
for(int i=0;i<inputButtons.size();i++){
|
||||||
if(i==0){
|
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
|
}else
|
||||||
if(i==10){
|
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{
|
}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]->bVisible=false;
|
||||||
inputButtons[i]->Enable(false);
|
inputButtons[i]->Enable(false);
|
||||||
@ -344,6 +344,10 @@ class ChampionsLeaguePointSolver : public olc::PixelGameEngine
|
|||||||
bestComboB={};
|
bestComboB={};
|
||||||
}
|
}
|
||||||
QuickGUI::TextBox*prevActiveBox=activeBox;
|
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.Update(this);
|
||||||
gui.Draw(this);
|
gui.Draw(this);
|
||||||
|
|
||||||
@ -368,9 +372,13 @@ class ChampionsLeaguePointSolver : public olc::PixelGameEngine
|
|||||||
TextEntryEnable(true,prevActiveBox->sText);
|
TextEntryEnable(true,prevActiveBox->sText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
for(int i=0;i<inputButtons.size();i++){
|
||||||
|
inputButtons[i]->bVisible=false;
|
||||||
|
inputButtons[i]->Enable(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(calculating){
|
if(calculating){
|
||||||
activeBox=nullptr;
|
activeBox=nullptr;
|
||||||
if(calculationStep<cases.size()){
|
if(calculationStep<cases.size()){
|
||||||
@ -388,7 +396,7 @@ class ChampionsLeaguePointSolver : public olc::PixelGameEngine
|
|||||||
SongCombinations picked1,picked2;
|
SongCombinations picked1,picked2;
|
||||||
for(SongCombinations&A:bestComboA){
|
for(SongCombinations&A:bestComboA){
|
||||||
for(SongCombinations&B:bestComboB){
|
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;
|
highestEX=A.totalEX+B.totalEX;
|
||||||
picked1=A;
|
picked1=A;
|
||||||
picked2=B;
|
picked2=B;
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user