Skip to content

Commit ca85707

Browse files
committed
fix android not compiling and remove some useless comments
1 parent 4c1fee8 commit ca85707

1 file changed

Lines changed: 3 additions & 36 deletions

File tree

src/ui/popups/ObjUploadPopup.cpp

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ namespace {
1717
CCLayerColor* mask = CCLayerColor::create({255, 255, 255});
1818
mask->setContentSize(bg->getContentSize());
1919
Build<CCClippingNode>::create().contentSize(this->getContentSize()).anchorPoint(0.5f,0.5f).zOrder(1).with([editorLayer, data, mask](auto node) {
20-
unsigned int objectCount = std::count(data.begin(), data.end(), ';');
21-
if (!data.empty()) {
20+
auto zData = ZStringView(data);
21+
unsigned int objectCount = std::count(zData.begin(), zData.end(), ';');
22+
if (!zData.empty()) {
2223
auto smartBlock = CCArray::create();
2324
int renderLimit = Mod::get()->getSettingValue<int64_t>("render-objects");
2425
int preRender = Mod::get()->getSettingValue<int64_t>("prerender-objects");
@@ -172,28 +173,6 @@ bool ObjUploadPopup::init(UserData user) {
172173
m_objName->setCommonFilter(CommonFilter::Any);
173174
m_mainLayer->addChildAtPosition(m_objName, Anchor::Center, {0, -20});
174175

175-
/*
176-
m_objDesc = TextInputNode::create("Description [Optional]", 300, {270, 60}, 90);//{270.F, 30.F}, 90);
177-
m_objDesc->getInput()->setScale(0.5F);
178-
bottomBg->addChildAtPosition(m_objDesc, Anchor::Center, {-1, -3});
179-
m_objDesc->addChildAtPosition(m_objDesc->getInput(), Anchor::Center);
180-
m_objDesc->setUpdateCallback([this](std::string text) {
181-
m_objDesc->getInput()->m_textArea->m_width = 300.0F / Utils::calculateScale(text, 50, 300, 1.0F, 0.5F);
182-
m_objDesc->getInput()->setScale(Utils::calculateScale(text, 50, 300, 0.75F, 0.45F));
183-
m_objDesc->getInput()->setPosition({
184-
Utils::calculateScale(text, 50, 300, 100, 60),
185-
Utils::calculateScale(text, 50, 300, 25, 20)
186-
});
187-
});
188-
//m_objDesc->getBackground()->setScale(0.5F);
189-
/\*m_objDesc->getBackground()->setContentSize({
190-
(m_objDesc->getSize().width - 20.F) * 2.F,
191-
(m_objDesc->getSize().height + 20.F) * 2.F
192-
});*\/
193-
/\*m_objDesc->getBackground()->setContentSize({
194-
520, 100
195-
});*/
196-
197176
#ifndef GEODE_IS_ANDROID32
198177
auto textArea = TextArea::create("", "chatFont.fnt", 1.0F, 335.0F, {0.5, 0.5}, 20.0F, true);
199178
// TextArea::create(&local_64,"chatFont.fnt",,0x439d8000,this_03,0x41a00000,1);
@@ -218,18 +197,6 @@ bool ObjUploadPopup::init(UserData user) {
218197
}
219198
);
220199
#endif
221-
//"Rules", "bigFont.fnt", "GJ_button_03.png"
222-
//const char* caption, int width, bool absolute, const char* font, const char* texture, float height, float scale
223-
/*Build<ButtonSprite>::create("Rules", 200, false, "bigFont.fnt", "GJ_button_03.png", 30.f, 0.8f).intoMenuItem([]() {
224-
FLAlertLayer::create(
225-
nullptr,
226-
"Rules",
227-
"",
228-
"OK",
229-
nullptr,
230-
400.0F
231-
)->show();
232-
}).store(m_rulesBtn).parentAtPos(m_buttonMenu, Anchor::Center, {0, -90});*/
233200
Build<ButtonSprite>::create("Upload", 205, true, "bigFont.fnt", "GJ_button_01.png", 30.f, 0.8f).intoMenuItem([this]() {
234201
if (Mod::get()->getSavedValue<int>("rule_ver") != RULES_VERSION) {
235202
RulesPopup::create([this]() {

0 commit comments

Comments
 (0)