mirror of
https://github.com/huderlem/porymap.git
synced 2026-11-10 19:08:22 -06:00
Add tab enums
This commit is contained in:
@@ -154,7 +154,10 @@ int ScriptUtility::getMapViewTab() {
|
||||
}
|
||||
|
||||
void ScriptUtility::setMapViewTab(int index) {
|
||||
if (this->getMainTab() != 0 || !window->ui->mapViewTab || index < 0 || index >= window->ui->mapViewTab->count())
|
||||
if (this->getMainTab() != MainTab::Map || !window->ui->mapViewTab || index < 0 || index >= window->ui->mapViewTab->count())
|
||||
return;
|
||||
// Can't select tab if it's disabled
|
||||
if (!window->ui->mapViewTab->isTabEnabled(index))
|
||||
return;
|
||||
window->on_mapViewTab_tabBarClicked(index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user