From a0a4bdb39d6bc200d67c6b676b6f7a3c3ff30bc6 Mon Sep 17 00:00:00 2001 From: YellowCat98 Date: Fri, 1 Mar 2024 21:07:00 +0100 Subject: [PATCH] new update, 1.2.1 --- CMakeLists.txt | 2 +- mod.json | 16 +++++++++------- src/main.cpp | 33 ++++++++++++++++++++++++++++----- 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 18862fd..465b651 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/mod.json b/mod.json index 52d721a..8984c29 100644 --- a/mod.json +++ b/mod.json @@ -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", @@ -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 } } } diff --git a/src/main.cpp b/src/main.cpp index f0f81cc..0e5fae9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -148,12 +148,35 @@ class $modify(PlayLayer) { UILayer* uilayer = static_cast(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("hide-gdlite-watermark"); + switch (Mod::get()->getSettingValue("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;