Skip to content

Commit

Permalink
ooh
Browse files Browse the repository at this point in the history
  • Loading branch information
hiimjasmine00 committed Aug 22, 2024
1 parent 7ecfb81 commit 522b1a9
Show file tree
Hide file tree
Showing 31 changed files with 213 additions and 180 deletions.
48 changes: 5 additions & 43 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,52 +54,14 @@ jobs:
name: Build Output
path: ${{ steps.build.outputs.build-output }}

draft:
name: Draft Release
release:
name: Release the mod
runs-on: ubuntu-latest
needs: ['package']

steps:
- name: Delete Existing Release
uses: actions/github-script@v7
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const owner = process.env.GITHUB_REPOSITORY.split("/")[0];
const repo = process.env.GITHUB_REPOSITORY.split("/")[1];
const response = await github.rest.repos.listReleases({ owner, repo });
console.log("Checking for existing release...");
for (const release of response.data) {
if (release.tag_name == process.env.COMMIT_MESSAGE) {
console.log("Existing release found, deleting...");
await github.rest.repos.deleteRelease({ owner, repo, release_id: release.id });
await github.rest.git.updateRef({
owner,
repo,
ref: `tags/${release.tag_name}`,
sha: context.sha,
force: true
});
}
}
console.log("Done.");
- name: Download Build Output
uses: actions/download-artifact@v4
with:
name: Build Output
path: build-output
- uses: actions/checkout@v4

- name: Create Draft Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: hiimjustin000/release-geode-mod@main
with:
files: |
build-output/*.geode
build-output/*.pdb
tag_name: ${{ github.event.head_commit.message }}
name: ${{ github.event.head_commit.message }}
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
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;arm64")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

project(DemonsInBetween VERSION 1.1.7)
project(DemonsInBetween VERSION 1.2.0)

add_library(${PROJECT_NAME} SHARED
src/DemonsInBetween.cpp
Expand Down
28 changes: 0 additions & 28 deletions CMakeSettings.json

This file was deleted.

2 changes: 1 addition & 1 deletion about.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A mod that adds additional demon difficulties in between existing ones.
- [hiimjustin000](user:7466002) - Creator of the mod

# Gallery
![Quick Search](hiimjustin000.demons_in_between/quicksearch.png&scale:0.8)
![Quick Search](hiimjustin000.demons_in_between/quicksearch.png&scale:0.8333)

# Difficulties
- Free Demon (Tier 1)
Expand Down
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Demons In Between Changelog
## v1.2.0 (2024-08-22)
- Added main level support for the new demon difficulties
- Added decimal support for the demon info button in the level info page
- Added GDDP Integration override setting
- Moved the demon info button in the level info page to the left side of the page
- Tweaked the quick search popup

## v1.1.7 (2024-07-19)
- Fixed a bug where the demon's original difficulty would be displayed as "Extreme Demon" in the demon info popup

Expand Down
15 changes: 13 additions & 2 deletions mod.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"geode": "3.2.0",
"geode": "3.4.0",
"gd": {
"android": "2.206",
"win": "2.206",
"mac": "2.206"
},
"version": "v1.1.7",
"version": "v1.2.0",
"id": "hiimjustin000.demons_in_between",
"name": "Demons In Between",
"developer": "hiimjustin000",
Expand All @@ -20,6 +20,9 @@
],
"resources": {
"spritesheets": {
"DIB_IconSheet": [
"resources/IconSheet/*.png"
],
"DIB_LongSheet": [
"resources/LongSheet/*.png"
],
Expand All @@ -37,6 +40,14 @@
"resources/*.png"
]
},
"settings": {
"gddp-integration-override": {
"name": "GDDP Integration Override",
"description": "Whether or not to override the GDDP Integration difficulties.",
"type": "bool",
"default": false
}
},
"tags": [
"content",
"enhancement",
Expand Down
Binary file added resources/IconSheet/DIB_01_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_02_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_03_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_04_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_05_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_06_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_07_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_08_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_09_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_10_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_11_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_12_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_13_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_14_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_15_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_16_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_17_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_18_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_19_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/IconSheet/DIB_20_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
147 changes: 82 additions & 65 deletions src/DIBSearchPopup.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,70 @@
#include "DIBSearchPopup.hpp"

TableNode* TableNode::create(int columns, int rows) {
auto ret = new TableNode();
if (ret->init(columns, rows)) {
ret->autorelease();
return ret;
}
delete ret;
return nullptr;
}

bool TableNode::init(int columns, int rows) {
if (!CCNode::init()) return false;

setAnchorPoint({ 0.5f, 0.5f });
m_menus = CCArray::create();
m_menus->retain();
m_columns = columns;
m_rows = rows;

return true;
}

void TableNode::setColumnLayout(AxisLayout* columnLayout) {
m_columnLayout = columnLayout;
setLayout(m_columnLayout);
}

void TableNode::setRowLayout(AxisLayout* rowLayout) {
m_rowLayout = rowLayout;
for (auto menu : CCArrayExt<CCMenu*>(m_menus)) {
menu->setLayout(m_rowLayout);
}
}

void TableNode::setRowHeight(float rowHeight) {
m_rowHeight = rowHeight;
for (auto menu : CCArrayExt<CCMenu*>(m_menus)) {
menu->setContentSize({ m_obContentSize.width, rowHeight });
}
}

void TableNode::updateAllLayouts() {
for (auto menu : CCArrayExt<CCMenu*>(m_menus)) {
menu->updateLayout();
}
updateLayout();
}

void TableNode::addButton(CCMenuItemSpriteExtra* button) {
CCMenu* menu = nullptr;
if (m_menus->count() <= 0 || static_cast<CCMenu*>(m_menus->objectAtIndex(m_menus->count() - 1))->getChildrenCount() >= m_columns) {
menu = CCMenu::create();
menu->setContentSize({ m_obContentSize.width, m_rowHeight });
menu->setLayout(m_rowLayout);
addChild(menu);
m_menus->addObject(menu);
} else menu = static_cast<CCMenu*>(m_menus->objectAtIndex(m_menus->count() - 1));

menu->addChild(button);
}

TableNode::~TableNode() {
CC_SAFE_RELEASE(m_menus);
}

DIBSearchPopup* DIBSearchPopup::create() {
auto ret = new DIBSearchPopup();
if (ret->initAnchored(350.0f, 280.0f)) {
Expand All @@ -14,71 +79,23 @@ bool DIBSearchPopup::setup() {
setTitle("Quick Search");
m_noElasticity = true;

auto menuRow1 = CCMenu::create();
menuRow1->setLayout(RowLayout::create()->setAxisAlignment(AxisAlignment::Even));
menuRow1->setPosition(175.0f, 220.0f);
menuRow1->setContentSize({ 350.0f, 60.0f });
m_mainLayer->addChild(menuRow1);

createDifficultyButton(menuRow1, 1);
createDifficultyButton(menuRow1, 2);
createDifficultyButton(menuRow1, 3);
createDifficultyButton(menuRow1, 4);
createDifficultyButton(menuRow1, 5);

menuRow1->updateLayout();

auto menuRow2 = CCMenu::create();
menuRow2->setLayout(RowLayout::create()->setAxisAlignment(AxisAlignment::Even));
menuRow2->setPosition(175.0f, 160.0f);
menuRow2->setContentSize({ 350.0f, 60.0f });
m_mainLayer->addChild(menuRow2);

createDifficultyButton(menuRow2, 6);
createDifficultyButton(menuRow2, 7);
createDifficultyButton(menuRow2, 8);
createDifficultyButton(menuRow2, 9);
createDifficultyButton(menuRow2, 10);

menuRow2->updateLayout();

auto menuRow3 = CCMenu::create();
menuRow3->setLayout(RowLayout::create()->setAxisAlignment(AxisAlignment::Even));
menuRow3->setPosition(175.0f, 100.0f);
menuRow3->setContentSize({ 350.0f, 60.0f });
m_mainLayer->addChild(menuRow3);

createDifficultyButton(menuRow3, 11);
createDifficultyButton(menuRow3, 12);
createDifficultyButton(menuRow3, 13);
createDifficultyButton(menuRow3, 14);
createDifficultyButton(menuRow3, 15);

menuRow3->updateLayout();

auto menuRow4 = CCMenu::create();
menuRow4->setLayout(RowLayout::create()->setAxisAlignment(AxisAlignment::Even));
menuRow4->setPosition(175.0f, 40.0f);
menuRow4->setContentSize({ 350.0f, 60.0f });
m_mainLayer->addChild(menuRow4);

createDifficultyButton(menuRow4, 16);
createDifficultyButton(menuRow4, 17);
createDifficultyButton(menuRow4, 18);
createDifficultyButton(menuRow4, 19);
createDifficultyButton(menuRow4, 20);

menuRow4->updateLayout();
auto table = TableNode::create(5, 4);
table->setContentSize({ 350.0f, 240.0f });
table->setColumnLayout(ColumnLayout::create()->setAxisReverse(true));
table->setRowLayout(RowLayout::create()->setAxisAlignment(AxisAlignment::Even));
table->setRowHeight(60.0f);
table->setPosition(175.0f, 130.0f);
m_mainLayer->addChild(table);

for (int i = 1; i < 21; i++) {
table->addButton(CCMenuItemExt::createSpriteExtraWithFrameName(fmt::format("DIB_{:02d}_btn2_001.png"_spr, i).c_str(), 1.0f, [this, i](auto) {
DemonsInBetween::DIFFICULTY = i;
DemonsInBetween::SEARCHING = true;
CCDirector::sharedDirector()->pushScene(CCTransitionFade::create(0.5f, LevelBrowserLayer::scene(DemonsInBetween::searchObjectForPage(0))));
}));
}

table->updateAllLayouts();

return true;
}

void DIBSearchPopup::createDifficultyButton(CCMenu* menu, int difficulty) {
auto button = CCMenuItemExt::createSpriteExtraWithFrameName(fmt::format("DIB_{:02d}_btn2_001.png"_spr, difficulty).c_str(), 1.0f, [this, difficulty](auto) {
DemonsInBetween::DIFFICULTY = difficulty;
DemonsInBetween::SEARCHING = true;
CCDirector::sharedDirector()->pushScene(CCTransitionFade::create(0.5f, LevelBrowserLayer::scene(DemonsInBetween::searchObjectForPage(0))));
});
button->setTag(difficulty);
menu->addChild(button);
}
23 changes: 22 additions & 1 deletion src/DIBSearchPopup.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
#include "DemonsInBetween.hpp"

class TableNode : public CCNode {
protected:
CCArray* m_menus;
AxisLayout* m_columnLayout;
AxisLayout* m_rowLayout;
int m_columns;
int m_rows;
float m_rowHeight;

bool init(int columns, int rows);
public:
static TableNode* create(int columns, int rows);

void setColumnLayout(AxisLayout*);
void setRowLayout(AxisLayout*);
void setRowHeight(float);
void updateAllLayouts();
void addButton(CCMenuItemSpriteExtra*);

~TableNode() override;
};

class DIBSearchPopup : public Popup<> {
protected:
bool setup() override;
void createDifficultyButton(CCMenu*, int);
public:
static DIBSearchPopup* create();
};
Loading

0 comments on commit 522b1a9

Please sign in to comment.