Compare commits

..

No commits in common. "6e11d0a6b089a2817e7daa167ee69fe9ae6772c3" and "a7f15bcc01546aff22b66944d5030afaa435cbd2" have entirely different histories.

7 changed files with 13 additions and 91 deletions

View file

@ -1,4 +1,4 @@
!insertmacro LANGFILE_EXT Portuguese
!insertmacro LANGFILE_EXT PortuguesePT
!pragma warning disable 6030
${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "O instalador irá guiá-lo através da instalação de $(^NameDA).$\r$\n$\r$\nAntes de iniciar a instalação, certifique-se de que o Geometry Dash não está aberto.$\r$\n$\r$\n$_CLICK"

View file

@ -58,7 +58,7 @@
!insertmacro GEODE_LANGUAGE "Polish"
!insertmacro GEODE_LANGUAGE "Russian"
!insertmacro GEODE_LANGUAGE "PortugueseBR"
!insertmacro GEODE_LANGUAGE "Portuguese"
!insertmacro GEODE_LANGUAGE "PortuguesePT"
!insertmacro GEODE_LANGUAGE "Ukrainian"
!insertmacro GEODE_LANGUAGE "Czech"
!insertmacro GEODE_LANGUAGE "Turkish"

View file

@ -28,8 +28,6 @@
#include "../../include/cocos2d.h"
#include "../ExtensionMacros.h"
enum class GJHttpType;
NS_CC_EXT_BEGIN
class CC_DLL CCHttpClient;
@ -218,50 +216,6 @@ public:
return _headers;
}
inline int getType() {
return _type;
}
inline void setType(int type) {
_type = type;
}
// @note Geode addition
inline void setType(GJHttpType type) {
_type = static_cast<int>(type);
}
inline bool getShouldCancel() {
return _shouldCancel;
}
inline void setShouldCancel(bool shouldCancel) {
_shouldCancel = shouldCancel;
}
inline int getDownloadProgress() {
return _downloadProgress;
}
inline void setDownloadProgress(int downloadProgress) {
_downloadProgress = downloadProgress;
}
inline int getReadTimeout() {
return _readTimeout;
}
inline void setReadTimeout(int readTimeout) {
_readTimeout = readTimeout;
}
inline int getConnectTimeout() {
return _connectTimeout;
}
inline void setConnectTimeout(int connectTimeout) {
_connectTimeout = connectTimeout;
}
protected:
// properties
@ -275,15 +229,13 @@ protected:
gd::vector<gd::string> _headers; /// custom http headers
// @note RobTop Addition
int _type;
int _requestTypeGJ;
// @note RobTop Addition
bool _shouldCancel;
// @note RobTop Addition
int _downloadProgress;
// @note RobTop Addition
int _readTimeout;
// @note RobTop Addition
int _connectTimeout;
};
NS_CC_EXT_END

View file

@ -1331,13 +1331,15 @@ namespace geode::cocos {
class CallFuncExtImpl : public cocos2d::CCActionInstant {
public:
static CallFuncExtImpl* create(const F& func) {
auto ret = new CallFuncExtImpl(func);
auto ret = new CallFuncExtImpl;
ret->m_func = func;
ret->autorelease();
return ret;
}
static CallFuncExtImpl* create(F&& func) {
auto ret = new CallFuncExtImpl(std::move(func));
auto ret = new CallFuncExtImpl;
ret->m_func = std::move(func);
ret->autorelease();
return ret;
}
@ -1345,17 +1347,8 @@ namespace geode::cocos {
private:
F m_func;
// F may not be default-constructible
CallFuncExtImpl(F&& func) : m_func(std::move(func)) {}
CallFuncExtImpl(F const& func) : m_func(func) {}
void update(float) override {
// Make sure any `std::function`s are valid
if constexpr (requires { static_cast<bool>(m_func); }) {
if (m_func) m_func();
} else {
m_func();
}
if (m_func) this->m_func();
}
};

View file

@ -28,7 +28,6 @@ public:
DownloadStatus m_status;
EventListener<ServerRequest<ServerModVersion>> m_infoListener;
EventListener<web::WebTask> m_downloadListener;
unsigned int m_scheduledEventForFrame = 0;
Impl(
std::string const& id,
@ -84,14 +83,7 @@ public:
}
if (!ModDownloadManager::get()->checkAutoConfirm()) {
// Throttle events to only once per frame to not cause a
// billion UI updates at once
if (m_scheduledEventForFrame != CCDirector::get()->getTotalFrames()) {
m_scheduledEventForFrame = CCDirector::get()->getTotalFrames();
Loader::get()->queueInMainThread([id = m_id]() {
ModDownloadEvent(id).post();
});
}
ModDownloadEvent(m_id).post();
}
});
auto fetchVersion = version.has_value() ? ModVersion(*version) : ModVersion(ModVersionLatest());
@ -165,14 +157,7 @@ public:
else if (event->isCancelled()) {
m_status = DownloadStatusCancelled();
}
// Throttle events to only once per frame to not cause a
// billion UI updates at once
if (m_scheduledEventForFrame != CCDirector::get()->getTotalFrames()) {
m_scheduledEventForFrame = CCDirector::get()->getTotalFrames();
Loader::get()->queueInMainThread([id = m_id]() {
ModDownloadEvent(id).post();
});
}
ModDownloadEvent(m_id).post();
});
auto req = web::WebRequest();

View file

@ -466,12 +466,8 @@ void ModItem::updateState() {
if (m_enableToggle && m_source.asMod()) {
m_enableToggle->toggle(m_source.asMod()->isOrWillBeEnabled());
// Disable the toggle if the mod has been uninstalled or if the mod is
// outdated
if (
modRequestedActionIsUninstall(m_source.asMod()->getRequestedAction()) ||
m_source.asMod()->targetsOutdatedVersion()
) {
// Disable the toggle if the mod has been uninstalled
if (modRequestedActionIsUninstall(m_source.asMod()->getRequestedAction())) {
m_enableToggle->setEnabled(false);
auto off = typeinfo_cast<CCRGBAProtocol*>(m_enableToggle->m_offButton->getNormalImage());
auto on = typeinfo_cast<CCRGBAProtocol*>(m_enableToggle->m_onButton->getNormalImage());

View file

@ -672,11 +672,7 @@ void ModPopup::updateState() {
m_cancelBtn->setVisible(false);
m_enableBtn->toggle(asMod && asMod->isOrWillBeEnabled());
m_enableBtn->setVisible(
asMod &&
asMod->getRequestedAction() == ModRequestedAction::None &&
!asMod->targetsOutdatedVersion()
);
m_enableBtn->setVisible(asMod && asMod->getRequestedAction() == ModRequestedAction::None);
m_reenableBtn->toggle(m_enableBtn->isToggled());
m_reenableBtn->setVisible(asMod && modRequestedActionIsToggle(asMod->getRequestedAction()));