-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d4ba2b
commit 726f417
Showing
9 changed files
with
261 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#pragma once | ||
|
||
#include "Client.h" | ||
|
||
class ClientUtils | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#pragma once | ||
|
||
#include <Geode/Geode.hpp> | ||
|
||
//definetly not ai generated | ||
|
||
using namespace geode::prelude; | ||
|
||
class ClippingNode : public CCMenu { | ||
private: | ||
CCRect m_clipRect; | ||
|
||
public: | ||
static ClippingNode* create(const CCRect& clipRect) { | ||
ClippingNode* node = new ClippingNode(); | ||
if (node && node->initWithClipRect(clipRect)) { | ||
node->autorelease(); | ||
return node; | ||
} | ||
CC_SAFE_DELETE(node); | ||
return NULL; | ||
} | ||
|
||
bool initWithClipRect(const CCRect& clipRect) { | ||
if (!CCMenu::init()) { | ||
return false; | ||
} | ||
m_clipRect = clipRect; | ||
return true; | ||
} | ||
|
||
void setClipRect(const CCRect& clipRect) | ||
{ | ||
m_clipRect = clipRect; | ||
} | ||
|
||
virtual void visit() { | ||
if (!m_clipRect.equals(CCRectZero)) { | ||
glEnable(GL_SCISSOR_TEST); | ||
CCEGLView::sharedOpenGLView()->setScissorInPoints(m_clipRect.origin.x, m_clipRect.origin.y, m_clipRect.size.width, m_clipRect.size.height); | ||
CCMenu::visit(); | ||
glDisable(GL_SCISSOR_TEST); | ||
} else { | ||
CCMenu::visit(); | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#pragma once | ||
|
||
#include <imgui-cocos.hpp> | ||
|
||
class ColourUtility | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#pragma once | ||
|
||
#include <imgui-cocos.hpp> | ||
|
||
class DrawUtils | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters