wip chex still buggy + customEvent
This commit is contained in:
parent
04da76c021
commit
a15037c5f2
6 changed files with 145 additions and 28 deletions
|
|
@ -19,6 +19,19 @@ EndpointHandler::EndpointHandler(uint64_t idx) {
|
|||
}
|
||||
}
|
||||
|
||||
void EndpointHandler::setFrontVisibilityInfo(EndpointState state, uint64_t frontIdx){
|
||||
ephfv.visibility = state;
|
||||
ephfv.frontIdx = frontIdx;
|
||||
}
|
||||
|
||||
uint64_t EndpointHandler::getFrontVisibilityIndex(){
|
||||
return ephfv.frontIdx;
|
||||
}
|
||||
|
||||
EndpointState EndpointHandler::getFrontVisibilityState(){
|
||||
return ephfv.visibility;
|
||||
}
|
||||
|
||||
/* these two, currently unused. If I use them, I should feel bad.
|
||||
* Endpoint* EndpointHandler::getEndpoint() {
|
||||
* return this->ep;
|
||||
|
|
@ -152,7 +165,32 @@ void OverseerHandler::setChangeFrontDefaultsFunction(std::function<void(Roles, s
|
|||
|
||||
void OverseerHandler::changeFrontDefaultsCallback(Roles role, std::wstring endpointId) {
|
||||
this->changeFrontDefaults(role, endpointId);
|
||||
}
|
||||
}
|
||||
|
||||
void OverseerHandler::reviseEndpointShowing(std::wstring endpointId, EndpointState state) {
|
||||
EndpointHandler* affected = nullptr;
|
||||
for (auto eph : this->endpointHandlers) {
|
||||
if (eph->getId() == endpointId) {
|
||||
affected = eph;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//todo:
|
||||
if(EndpointState::ENDPOINT_ACTIVE & state) {
|
||||
//todo:
|
||||
return;
|
||||
} else if (affected->getFrontVisibilityState() == EndpointState::ENDPOINT_ACTIVE){
|
||||
this->removeEndpointWidget(affected->getFrontVisibilityIndex());
|
||||
affected->setFrontVisibilityInfo(EndpointState::ENDPOINT_ALL, INT_MAX);
|
||||
}
|
||||
return;
|
||||
//this->reviseEndpointShowing(endpointId, role);
|
||||
}
|
||||
|
||||
void OverseerHandler::setRemoveEndpointWidgetFunction(std::function<void(uint64_t)> removeEndpointWidget){
|
||||
this->removeEndpointWidget = removeEndpointWidget;
|
||||
}
|
||||
|
||||
|
||||
void OverseerHandler::setEndpointHandlers(std::vector<EndpointHandler*> ephs){
|
||||
this->endpointHandlers = ephs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue