Skip to content

Commit 4981158

Browse files
committed
alpha ui design
1 parent 5357fcd commit 4981158

11 files changed

Lines changed: 175 additions & 159 deletions

about.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Thank you to <cj>Midair</c> for the mod idea, <cy>Alphalaneous</c> for the extra
99
- Erymanthus
1010
- uproxide
1111
- km7dev
12+
- Alphalaneous
1213
- sofabeddd
1314

1415
# How to use

mod.json

Lines changed: 69 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,78 @@
11
{
2-
"geode": "4.6.1",
2+
"geode": "5.0.0",
33
"gd": {
4-
"win": "2.2074",
5-
"android": "2.2074",
6-
"mac": "2.2074",
7-
"ios": "2.2074"
4+
"win": "2.2081",
5+
"android": "2.2081",
6+
"mac": "2.2081",
7+
"ios": "2.2081"
88
},
99
"id": "firee.object-workshop",
1010
"name": "Object Workshop",
1111
"version": "v1.4.8",
1212
"developer": "Firee",
1313
"description": "Download, upload, or find custom objects made by other creators!",
14-
"resources": {
15-
"sprites": [
16-
"resources/*.png"
17-
]
18-
},
19-
"links": {
20-
"community": "https://discord.gg/XGBMVVvJ7J",
21-
"source": "https://github.com/FireMario211/Object-Workshop"
22-
},
23-
"tags": ["online", "utility", "content", "editor", "interface"],
24-
"settings": {
25-
"token": {
26-
"name": "Auth Token",
27-
"description": "Authentication Token (DO NOT SHARE)",
28-
"type": "string",
29-
"default": ""
30-
},
31-
"auth-server": {
32-
"name": "Auth Server",
33-
"description": "Authentication Server (-1 = None, 0 = DashAuth, 1 = Argon, 2 = Custom Auth (Ignores the test auth))",
34-
"type": "int",
35-
"default": -1,
36-
"min": -1,
37-
"max": 2
38-
},
39-
"object-bypass": {
40-
"name": "Custom Object Bypass",
41-
"description": "Removes the limit for 1000 objects and removes the limit of 750 maximum custom objects.",
42-
"default": true,
43-
"type": "bool"
44-
},
45-
"render-objects": {
46-
"name": "Render Objects",
47-
"description": "The amount of objects that should be shown. Decrease for performance. (0 = Unlimited)",
48-
"type": "int",
49-
"default": 0,
50-
"min": 0,
51-
"max": 50000
52-
},
53-
"prerender-objects": {
54-
"name": "Pre-Render Object Capacity",
55-
"description": "The amount of objects needed before they are \"pre-rendered\" for faster performance. Will cause a stutter upon loading. This <cr>does not</c> count for viewing more information about the object. (0 = Always Enable)",
56-
"type": "int",
57-
"default": 5000,
58-
"min": 0,
59-
"max": 50000
60-
},
61-
"prerender-full": {
62-
"name": "Pre-Render Full View",
63-
"description": "Whether or not to also pre-render when viewing more information about the object. Do note this will disable particles. (When they get added)",
64-
"type": "bool",
65-
"default": false
66-
},
67-
"cert-valid": {
68-
"name": "Cert Validation",
69-
"description": "Whether or not to validate the certificate when making web requests to Object Workshop. (Only disable if you know what this is for!)",
70-
"type": "bool",
71-
"default": true
72-
}
73-
},
74-
"dependentold": [
75-
{
76-
"id": "fig.authentication",
77-
"version": ">=v1.0.2",
78-
"importance": "recommended"
79-
}
80-
],
81-
"dependencies": [
82-
{
83-
"id": "alphalaneous.editortab_api",
84-
"version": ">=v1.0.16",
85-
"importance": "required"
86-
},
87-
{
88-
"id": "geode.node-ids",
89-
"version": ">=1.21.1",
90-
"importance": "required"
91-
}
92-
]
14+
"resources": {
15+
"sprites": [
16+
"resources/*.png"
17+
]
18+
},
19+
"links": {
20+
"community": "https://discord.gg/XGBMVVvJ7J",
21+
"source": "https://github.com/FireMario211/Object-Workshop"
22+
},
23+
"tags": ["online", "utility", "content", "editor", "interface"],
24+
"settings": {
25+
"token": {
26+
"name": "Auth Token",
27+
"description": "Authentication Token (DO NOT SHARE)",
28+
"type": "string",
29+
"default": ""
30+
},
31+
"auth-server": {
32+
"name": "Auth Server",
33+
"description": "Authentication Server (-1 = None, 0 = DashAuth, 1 = Argon, 2 = Custom Auth (Ignores the test auth))",
34+
"type": "int",
35+
"default": -1,
36+
"min": -1,
37+
"max": 2
38+
},
39+
"object-bypass": {
40+
"name": "Custom Object Bypass",
41+
"description": "Removes the limit for 1000 objects and removes the limit of 750 maximum custom objects.",
42+
"default": true,
43+
"type": "bool"
44+
},
45+
"render-objects": {
46+
"name": "Render Objects",
47+
"description": "The amount of objects that should be shown. Decrease for performance. (0 = Unlimited)",
48+
"type": "int",
49+
"default": 0,
50+
"min": 0,
51+
"max": 50000
52+
},
53+
"prerender-objects": {
54+
"name": "Pre-Render Object Capacity",
55+
"description": "The amount of objects needed before they are \"pre-rendered\" for faster performance. Will cause a stutter upon loading. This <cr>does not</c> count for viewing more information about the object. (0 = Always Enable)",
56+
"type": "int",
57+
"default": 5000,
58+
"min": 0,
59+
"max": 50000
60+
},
61+
"prerender-full": {
62+
"name": "Pre-Render Full View",
63+
"description": "Whether or not to also pre-render when viewing more information about the object. Do note this will disable particles. (When they get added)",
64+
"type": "bool",
65+
"default": false
66+
},
67+
"cert-valid": {
68+
"name": "Cert Validation",
69+
"description": "Whether or not to validate the certificate when making web requests to Object Workshop. (Only disable if you know what this is for!)",
70+
"type": "bool",
71+
"default": true
72+
}
73+
},
74+
"dependencies": {
75+
"alphalaneous.editortab_api": ">=2.0.1",
76+
"geode.node-ids": ">=1.21.1"
77+
}
9378
}

resources/objects_icon.png

16.2 KB
Loading

resources/objects_icon_outline.png

18.8 KB
Loading

resources/select_outline.png

4.09 KB
Loading

src/nodes/CategoryButton.cpp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
#include <UIBuilder.hpp>
33

44
void CategoryButton::setIndicatorState(bool enabled) {
5-
m_bgSprBehind->setVisible(enabled);
5+
if (m_bgSpr != nullptr) {
6+
m_bgSpr->setOpacity((enabled) ? 120 : 255);
7+
}
8+
if (m_bgSpr9 != nullptr) {
9+
m_bgSprBehind->setVisible(enabled);
10+
m_bgSpr9->setColor((enabled) ? ccColor3B({183, 132, 38}) : ccColor3B({0,0,0}));
11+
m_bgSpr9->setOpacity((enabled) ? 255 : 60);
12+
}
613
}
714

815
bool CategoryButton::init(const char* sprName, bool isSpriteFrame, bool bgVisible) {
@@ -12,14 +19,14 @@ bool CategoryButton::init(const char* sprName, bool isSpriteFrame, bool bgVisibl
1219
if (isSpriteFrame) {
1320
Build<CCSprite>::createSpriteName(sprName).with([this](auto node) {
1421
node->setScale((this->getContentWidth() - 3) / node->getContentWidth());
15-
}).parentAtPos(this, Anchor::Center);
22+
}).store(m_bgSpr).parentAtPos(this, Anchor::Center);
1623
} else {
1724
Build<CCSprite>::create(sprName).with([this](auto node) {
1825
node->setScale((this->getContentWidth() - 3) / node->getContentWidth());
19-
}).parentAtPos(this, Anchor::Center);
26+
}).store(m_bgSpr).parentAtPos(this, Anchor::Center);
2027
}
2128
} else {
22-
Build<CCScale9Sprite>::create("square02_small.png").opacity(60).contentSize(this->getContentSize()).with([sprName, isSpriteFrame](auto box) {
29+
Build<CCScale9Sprite>::create("square02b_small.png").color({0,0,0}).opacity(60).contentSize(this->getContentSize()).with([sprName, isSpriteFrame](auto box) {
2330
// should be 0.75f
2431
if (isSpriteFrame) {
2532
Build<CCSprite>::createSpriteName(sprName).with([box](auto node) {
@@ -30,7 +37,7 @@ bool CategoryButton::init(const char* sprName, bool isSpriteFrame, bool bgVisibl
3037
node->setScale((box->getContentWidth() - 9) / node->getContentWidth());
3138
}).parentAtPos(box, Anchor::Center);
3239
}
33-
}).parentAtPos(this, Anchor::Center);
40+
}).store(m_bgSpr9).parentAtPos(this, Anchor::Center);
3441
}
3542
Build<CCSprite>::create("select_outline.png"_spr).scale(0.35f).visible(false).store(m_bgSprBehind).parentAtPos(this, Anchor::Center);
3643
return true;

src/nodes/CategoryButton.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ using namespace geode::prelude;
66
class CategoryButton : public CCNode {
77
protected:
88
virtual bool init(const char* sprName, bool isSpriteFrame, bool bgVisible);
9+
CCSprite* m_bgSpr = nullptr;
10+
CCScale9Sprite* m_bgSpr9 = nullptr;
911
CCSprite* m_bgSprBehind;
1012
public:
1113
void setIndicatorState(bool enabled);

src/nodes/ScrollLayerExt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ ScrollLayerExt::ScrollLayerExt(CCRect const& rect, bool scrollWheelEnabled, bool
153153
this->addChild(m_contentLayer);
154154

155155
m_touchStartPosition2 = cocos2d::CCPointMake(0.f, 0.f);
156-
m_touchPosition2 = cocos2d::CCPointMake(0.f, 0.f);
156+
m_touchPosition2 = cocos2d::CCPointMake(0.f, 0.f);
157157

158158
this->setID("ScrollLayerExt"_spr);
159159

0 commit comments

Comments
 (0)