Skip to content

Commit

Permalink
new update, 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
YellowCat98 committed Mar 1, 2024
1 parent 53f6306 commit a0a4bdb
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_ARCHITECTURES "x86_64")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

project(GDLite VERSION 1.0.0)
project(GDLite VERSION 1.2.1)

# Set up the mod binary
add_library(${PROJECT_NAME} SHARED
Expand Down
16 changes: 9 additions & 7 deletions mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"win": "2.204",
"android": "2.205"
},
"version": "v1.2.0",
"version": "v1.2.1",
"id": "yellowcat98.gdlite",
"name": "GDLite",
"developer": "YellowCat98",
Expand All @@ -28,17 +28,19 @@
"type": "bool",
"default": false
},
"hide-gdlite-watermark": {
"name": "Hide the GDLite watermark",
"description": "Hides the 'GDLite, Free Trial' watermark from PlayLayer.",
"type": "bool",
"default": false
},
"remove-more-games-menu-modification" : {
"name": "Remove More Games Menu Modification",
"description": "Remove more games menu modification to prevent incompatibility",
"type": "bool",
"default": false
},
"gdlite-wm-pos": {
"name": "GDLite Watermark Position",
"description": "Ability to change the GDLite watermark position\n 0 = no watermark at all\n 1 = Bottom Left\n 2 = Bottom Right\n 3 = Top Left\n 4 = Top Right",
"type": "int",
"default": 1,
"min": 0,
"max": 4
}
}
}
33 changes: 28 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,35 @@ class $modify(PlayLayer) {
UILayer* uilayer = static_cast<UILayer*>(this->getChildByID("UILayer"));
CCLabelBMFont* label = CCLabelBMFont::create("GDLite. free trial", "bigFont.fnt");

label->setPosition(ccp(41, 9));
label->setScale(0.225f);

auto hidegdlitewmornot = Mod::get()->getSettingValue<bool>("hide-gdlite-watermark");
switch (Mod::get()->getSettingValue<int64_t>("gdlite-wm-pos"))
{
case 0:
/* hide label */
label->setVisible(false);
break;

case 1:
/* bottom left */
label->setPosition(41, 10);
break;

case 2:
/* bottom right */
label->setPosition(525, 10);
break;

case 3:
/* top left */
label->setPosition(41, 310);
break;

case 4:
/* top right */
label->setPosition(525, 310);
break;
}

label->setVisible(!hidegdlitewmornot);
label->setScale(0.225f);

uilayer->addChild(label);
return true;
Expand Down

0 comments on commit a0a4bdb

Please sign in to comment.