From fb495e927f1398d994b7f4fe84a7177b780f8369 Mon Sep 17 00:00:00 2001 From: RaZooM Date: Fri, 13 Mar 2026 17:29:48 +0300 Subject: [PATCH] Add option to disable tab pagination --- changelog.md | 3 +++ mod.json | 11 +++++++++-- src/EditorUI.cpp | 18 +++++++++++++----- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/changelog.md b/changelog.md index cb16dc1..6931b2a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +# 2.0.12 +- Add option to disable tab pagination + # 2.0.11 - Fixes diff --git a/mod.json b/mod.json index 58fd5d6..830f762 100644 --- a/mod.json +++ b/mod.json @@ -6,7 +6,7 @@ "android": "2.2081", "ios": "2.2081" }, - "version": "v2.0.11", + "version": "v2.0.12", "id": "alphalaneous.editortab_api", "name": "EditorTab API", "developer": "Alphalaneous", @@ -26,5 +26,12 @@ "homepage": "https://linktr.ee/Alphalaneous", "source": "https://github.com/Alphalaneous/EditorTab-API", "community": "https://discord.gg/Txn2CA5dHF" - } + }, + "settings": { + "disable-pages": { + "type": "bool", + "name": "Disable pages", + "default": false + } + } } diff --git a/src/EditorUI.cpp b/src/EditorUI.cpp index 842b251..34391a8 100644 --- a/src/EditorUI.cpp +++ b/src/EditorUI.cpp @@ -196,8 +196,12 @@ void ETEditorUI::setupButtons() { m_tabsMenu->setContentWidth(getContentWidth() / m_tabsMenu->getScale()); - auto tabWidth = m_tabsMenu->getContentWidth() - 36; - fields->m_maxTabs = (tabWidth - 2) / 34; + if (Mod::get()->getSettingValue("disable-pages")) { + fields->m_maxTabs = 9999; + } else { + auto tabWidth = m_tabsMenu->getContentWidth() - 36; + fields->m_maxTabs = (tabWidth - 2) / 34; + } fields->m_arrowMenu = CCMenu::create(); fields->m_arrowMenu->setContentSize(m_tabsMenu->getContentSize()); @@ -260,9 +264,13 @@ void ETEditorUI::resizeButtons() { auto fields = m_fields.self(); m_tabsMenu->setContentWidth(getContentWidth() / m_tabsMenu->getScale()); - auto tabWidth = m_tabsMenu->getContentWidth() - 36; - fields->m_maxTabs = (tabWidth - 2) / 34; - + if (Mod::get()->getSettingValue("disable-pages")) { + fields->m_maxTabs = 9999; + } else { + auto tabWidth = m_tabsMenu->getContentWidth() - 36; + fields->m_maxTabs = (tabWidth - 2) / 34; + } + fields->m_arrowMenu->setContentSize(m_tabsMenu->getContentSize()); fields->m_arrowMenu->setPosition(m_tabsMenu->getPosition()); fields->m_arrowMenu->setScale(m_tabsMenu->getScale());