add EditorUI::sliderChanged + Result::ok + bump version

This commit is contained in:
hjfod 2023-02-27 18:36:36 +02:00
parent 33a91d67bc
commit 4a15afc7a7
3 changed files with 46 additions and 1 deletions
VERSION
bindings
loader/include/Geode/utils

View file

@ -1 +1 @@
1.0.0-beta.8
1.0.0-beta.9

View file

@ -1275,6 +1275,7 @@ class EditorUI : cocos2d::CCLayer, FLAlertLayerProtocol, ColorSelectDelegate, GJ
void alignObjects(cocos2d::CCArray* objs, bool alignY) = mac 0x2cea0, win 0x8f320;
virtual void scrollWheel(float vertical, float horizontal) = win 0x921d0, mac 0x31370, ios 0x2c4884;
void createMoveMenu() = mac 0x275e0, win 0x8c0d0;
void sliderChanged(cocos2d::CCObject* slider) = win 0x78cc0;
bool m_isPlayingMusic;
EditButtonBar* m_buttonBar;

View file

@ -204,6 +204,50 @@ namespace geode {
[[nodiscard]] constexpr decltype(auto) errorOr(U&& val) const& {
return this->Base::error_or(std::forward<U>(val));
}
/**
* Convert the result into an optional containing the value if Ok, and
* nullopt if Err
*/
[[nodiscard]] constexpr decltype(auto) ok() const& {
if (this->isOk()) {
return std::optional(this->unwrap());
}
return std::nullopt;
}
/**
* Convert the result into an optional containing the value if Ok, and
* nullopt if Err
*/
[[nodiscard]] constexpr decltype(auto) ok() && {
if (this->isOk()) {
return std::optional(this->unwrap());
}
return std::nullopt;
}
/**
* Convert the result into an optional containing the error if Err, and
* nullopt if Ok
*/
[[nodiscard]] constexpr decltype(auto) err() const& {
if (this->isErr()) {
return std::optional(this->unwrapErr());
}
return std::nullopt;
}
/**
* Convert the result into an optional containing the error if Err, and
* nullopt if Ok
*/
[[nodiscard]] constexpr decltype(auto) err() && {
if (this->isErr()) {
return std::optional(this->unwrapErr());
}
return std::nullopt;
}
};
template <class T = impl::DefaultValue>