2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 13:07:42 +00:00

More mouse events for pause screen

This commit is contained in:
Jack Andersen
2019-01-21 18:23:51 -10:00
parent 1b019b734b
commit aeb6a9a147
18 changed files with 214 additions and 38 deletions

View File

@@ -78,6 +78,26 @@ void CGuiTableGroup::SelectWorker(int idx) {
}
}
void CGuiTableGroup::DoSelectWorker(int worker) {
if (worker == xc4_userSelection)
return;
if (IsWorkerSelectable(worker)) {
int oldSel = xc4_userSelection;
SelectWorker(worker);
if (x104_doMenuSelChange)
x104_doMenuSelChange(this, oldSel);
}
}
void CGuiTableGroup::SetWorkersMouseActive(bool active) {
CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
while (child) {
if (child->GetWorkerId() != -1)
child->SetMouseActive(active);
child = static_cast<CGuiWidget*>(child->GetNextSibling());
}
}
void CGuiTableGroup::DeactivateWorker(CGuiWidget* widget) { widget->SetIsActive(false); }
void CGuiTableGroup::ActivateWorker(CGuiWidget* widget) { widget->SetIsActive(true); }