adjust stagesettings ui; fix Enable Pick / Ban Button

This commit is contained in:
mrbesen 2023-01-22 23:46:03 +01:00
parent 152873d860
commit dd125d3183
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
2 changed files with 13 additions and 3 deletions

View File

@ -4,6 +4,8 @@
#include <thread> #include <thread>
#include <Log.h> #include <Log.h>
#include <QDebug>
LolAutoAccept::Stage::Stage() {} LolAutoAccept::Stage::Stage() {}
LolAutoAccept::Stage::~Stage() {} LolAutoAccept::Stage::~Stage() {}
@ -225,7 +227,7 @@ void LolAutoAccept::resetRunes() {
void LolAutoAccept::applyConfigToStage(Stage& stage, const Config::StageConfig& stageconf) { void LolAutoAccept::applyConfigToStage(Stage& stage, const Config::StageConfig& stageconf) {
stage.champids = dd.resolveChampIDs(stageconf.champs); stage.champids = dd.resolveChampIDs(stageconf.champs);
stage.enabled = stage.enabled; stage.enabled = stageconf.enabled;
stage.currentOffset = 0; stage.currentOffset = 0;
} }
@ -326,6 +328,11 @@ void LolAutoAccept::pickPhase(const ownactions_t& ownactions) {
} }
void LolAutoAccept::phase(const ownactions_t& ownactions, ClientAPI::ChampSelectActionType type, State s, bool complete, std::function<bool(uint32_t)> filter) { void LolAutoAccept::phase(const ownactions_t& ownactions, ClientAPI::ChampSelectActionType type, State s, bool complete, std::function<bool(uint32_t)> filter) {
if ( !( stages.at((int) s).enabled ) ) {
qDebug() << (int) s << " stage is disabled. skipping";
return;
}
for(auto it : ownactions) { for(auto it : ownactions) {
if(it.type == type) { if(it.type == type) {
Log::info << type << " action anvailable: " << it.id << " champid: " << it.championID; Log::info << type << " action anvailable: " << it.id << " champid: " << it.championID;

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>412</width> <width>412</width>
<height>180</height> <height>277</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -46,7 +46,7 @@
<property name="title"> <property name="title">
<string notr="true"/> <string notr="true"/>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2" columnstretch="4,3">
<property name="sizeConstraint"> <property name="sizeConstraint">
<enum>QLayout::SetMinAndMaxSize</enum> <enum>QLayout::SetMinAndMaxSize</enum>
</property> </property>
@ -59,6 +59,9 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="sizeConstraint"> <property name="sizeConstraint">
<enum>QLayout::SetMinAndMaxSize</enum> <enum>QLayout::SetMinAndMaxSize</enum>
</property> </property>