Merge branch 'main' of https://github.com/geode-sdk/geode into main

This commit is contained in:
HJfod 2024-07-29 20:59:11 +03:00
commit fabe7d37de
4 changed files with 8 additions and 8 deletions

View file

@ -861,7 +861,7 @@ namespace geode::cocos {
return {color.r / 255.f, color.g / 255.f, color.b / 255.f, color.a / 255.f};
}
[[deprecated("This function sucks, use cc3bFromHexString instead")]]
[[deprecated("This function may have unintended behavior, use cc3bFromHexString or manually expand the color instead")]]
constexpr cocos2d::ccColor3B cc3x(int hexValue) {
if (hexValue <= 0xf)
return cocos2d::ccColor3B{

View file

@ -150,10 +150,10 @@ protected:
virtual void valueChanged(bool updateText = true) {
if (this->hasUncommittedChanges()) {
m_nameLabel->setColor(cc3x(0x1d0));
m_nameLabel->setColor({0x11, 0xdd, 0x00});
}
else {
m_nameLabel->setColor(cc3x(0xfff));
m_nameLabel->setColor({0xff, 0xff, 0xff});
}
if (m_resetBtn) m_resetBtn->setVisible(this->hasNonDefaultValue());
auto isValid = setting()->validate(m_uncommittedValue);

View file

@ -145,22 +145,22 @@ void ModSettingsPopup::onResetAll(CCObject*) {
void ModSettingsPopup::settingValueCommitted(SettingNode*) {
if (this->hasUncommitted()) {
m_applyBtnSpr->setColor(cc3x(0xf));
m_applyBtnSpr->setColor({0xff, 0xff, 0xff});
m_applyBtn->setEnabled(true);
}
else {
m_applyBtnSpr->setColor(cc3x(0x4));
m_applyBtnSpr->setColor({0x44, 0x44, 0x44});
m_applyBtn->setEnabled(false);
}
}
void ModSettingsPopup::settingValueChanged(SettingNode*) {
if (this->hasUncommitted()) {
m_applyBtnSpr->setColor(cc3x(0xf));
m_applyBtnSpr->setColor({0xff, 0xff, 0xff});
m_applyBtn->setEnabled(true);
}
else {
m_applyBtnSpr->setColor(cc3x(0x4));
m_applyBtnSpr->setColor({0x44, 0x44, 0x44});
m_applyBtn->setEnabled(false);
}
}

View file

@ -24,7 +24,7 @@ static constexpr float g_fontScale = .5f;
static constexpr float g_paragraphPadding = 7.f;
static constexpr float g_indent = 7.f;
static constexpr float g_codeBlockIndent = 8.f;
static constexpr ccColor3B g_linkColor = cc3x(0x7ff4f4);
static constexpr ccColor3B g_linkColor = {0x7f, 0xf4, 0xf4};
TextRenderer::Font g_mdFont = [](int style) -> TextRenderer::Label {
if ((style & TextStyleBold) && (style & TextStyleItalic)) {