Skip to content

Commit

Permalink
update 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Jul 18, 2024
1 parent 715b84a commit 45ec445
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## v0.3.1-alpha
* Fixed the touch prio in support popup

## v0.3.0-alpha
* Implemented freeform brush drawing using the [Ramer–Douglas–Peucker algorithm] (https://en.wikipedia.org/wiki/Ramer–Douglas–Peucker_algorithm)
* New UI! Moved everything into a build tab, with new buttons and design
Expand Down
3 changes: 3 additions & 0 deletions include/Allium/ui/SupportPopup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ namespace allium {
static SupportPopup* create();
bool init() override;

~SupportPopup() override;
void registerWithTouchDispatcher() override;

void keyBackClicked() override;
void onClose(cocos2d::CCObject* sender);
};
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"win": "2.206",
"android": "2.206"
},
"version": "v0.3.0-alpha",
"version": "v0.3.1-alpha",
"id": "alk.allium",
"name": "Allium Drawing Tool",
"developer": "alk",
Expand Down
10 changes: 10 additions & 0 deletions src/ui/SupportPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ SupportPopup* SupportPopup::create() {
return nullptr;
}

SupportPopup::~SupportPopup() {
cocos2d::CCTouchDispatcher::get()->unregisterForcePrio(this);
}

void SupportPopup::registerWithTouchDispatcher() {
cocos2d::CCTouchDispatcher::get()->addTargetedDelegate(this, -500, true);
}

bool SupportPopup::init() {
if (!FLAlertLayer::initWithColor({0, 0, 0, 160})) return false;

Expand All @@ -21,6 +29,8 @@ bool SupportPopup::init() {

this->setKeypadEnabled(true);

cocos2d::CCTouchDispatcher::get()->registerForcePrio(this, 2);

m_mainLayer = CCLayer::create();
this->addChildAtPosition(m_mainLayer, Anchor::Center, ccp(0, 0));

Expand Down

0 comments on commit 45ec445

Please sign in to comment.