|
9 | 9 | #include <EditKeyConfigUI.hpp> |
10 | 10 | #include <Button.hpp> |
11 | 11 | #include <PulsingCircle.hpp> |
| 12 | +#include <SetupRangeUI.hpp> |
12 | 13 |
|
13 | 14 | using namespace qolmod; |
14 | 15 |
|
@@ -83,17 +84,24 @@ bool OptionsUI::setup() |
83 | 84 | favBtn->m_offButton->setOpacity(150); |
84 | 85 |
|
85 | 86 | auto btnKeybind = Button::create(CCSprite::createWithSpriteFrameName("keybinds.png"_spr), this, menu_selector(OptionsUI::onChangeKeybind)); |
86 | | - btnKeybind->setContentSize(btnKeybind->getContentSize() * 3); |
| 87 | + btnKeybind->setContentSize(btnKeybind->getContentSize() * ccp(1, 2)); |
87 | 88 | btnKeybind->getNormalImage()->setPosition(btnKeybind->getContentSize() / 2); |
88 | 89 | btnKeybind->setPosition(ccp(m_size.width - 18 * 2, -m_size.height + 18 * 2)); |
89 | 90 |
|
| 91 | + auto btnRanges = Button::create(CCSprite::createWithSpriteFrameName("ranges.png"_spr), this, menu_selector(OptionsUI::onChangeRanges)); |
| 92 | + btnRanges->setContentSize(btnRanges->getContentSize() * ccp(1, 2)); |
| 93 | + btnRanges->setPositionX(btnKeybind->getPositionX() - 25); |
| 94 | + btnRanges->setPositionY(btnKeybind->getPositionY()); |
| 95 | + btnRanges->getNormalImage()->setPosition(btnRanges->getContentSize() / 2); |
| 96 | + |
90 | 97 | auto btnShortcut = CCMenuItemToggler::create(CCSprite::createWithSpriteFrameName("shortcuts.png"_spr), CCSprite::createWithSpriteFrameName("shortcuts.png"_spr), this, menu_selector(OptionsUI::onChangeShortcut)); |
91 | 98 | btnShortcut->setUserData(module); |
92 | 99 | btnShortcut->setPosition(ccp(2, -m_size.height + 18 * 2)); |
93 | 100 |
|
94 | 101 | menu3->addChild(favBtn); |
95 | 102 | menu3->addChild(btnKeybind); |
96 | 103 | menu3->addChild(btnShortcut); |
| 104 | + menu3->addChild(btnRanges); |
97 | 105 |
|
98 | 106 | node = CategoryNode::create(); |
99 | 107 | node->setAnchorPoint(ccp(0.5f, 0.5f)); |
@@ -145,15 +153,8 @@ void OptionsUI::onInfo(CCObject* sender) |
145 | 153 | ModuleInfoAlert::create(module)->show(); |
146 | 154 | } |
147 | 155 |
|
148 | | -#include <SetupRangeUI.hpp> |
149 | | - |
150 | 156 | void OptionsUI::onSeperateOptionsInfo(CCObject* sender) |
151 | 157 | { |
152 | | - // DO NOT UPLOAD THIS IS FOR TESTING |
153 | | - SetupRangeUI::create(module)->show(); |
154 | | - |
155 | | - return; |
156 | | - |
157 | 158 | Mod::get()->setSavedValue<bool>("has-shown-seperate-info", true); |
158 | 159 |
|
159 | 160 | if (pulsingCircle) |
@@ -197,6 +198,11 @@ void OptionsUI::onChangeKeybind(CCObject* sender) |
197 | 198 | ui->show(); |
198 | 199 | } |
199 | 200 |
|
| 201 | +void OptionsUI::onChangeRanges(CCObject* sender) |
| 202 | +{ |
| 203 | + SetupRangeUI::create(module)->show(); |
| 204 | +} |
| 205 | + |
200 | 206 | OptionsUI::~OptionsUI() |
201 | 207 | { |
202 | 208 | if (instance == this) |
|
0 commit comments