-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
50 changed files
with
190 additions
and
24 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
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-179 Bytes
(93%)
resources/spritesheets/GJ_GameSheet03/GJ_sStarsIcon_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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,103 @@ | ||
#pragma once | ||
|
||
#include <imgui.h> | ||
#include <cocos2d.h> | ||
|
||
using namespace cocos2d; | ||
|
||
static std::ostream& operator<<(std::ostream& stream, ImVec2 const& vec) { | ||
return stream << vec.x << ", " << vec.y; | ||
} | ||
|
||
static std::ostream& operator<<(std::ostream& stream, ImVec4 const& vec) { | ||
return stream << vec.x << ", " << vec.y << ", " << vec.z << ", " << vec.w; | ||
} | ||
|
||
static ImVec2 operator+(ImVec2 const& a, ImVec2 const& b) { | ||
return { | ||
a.x + b.x, | ||
a.y + b.y | ||
}; | ||
} | ||
|
||
static ImVec2 operator-(ImVec2 const& a, ImVec2 const& b) { | ||
return { | ||
a.x - b.x, | ||
a.y - b.y | ||
}; | ||
} | ||
|
||
static ImVec2 operator-(ImVec2 const& a) { | ||
return { -a.x, -a.y }; | ||
} | ||
|
||
static ImVec2& operator-=(ImVec2& a, ImVec2 const& b) { | ||
a.x -= b.x; | ||
a.y -= b.y; | ||
return a; | ||
} | ||
|
||
static ImVec2 operator/(ImVec2 const& a, ImVec2 const& b) { | ||
return { | ||
a.x / b.x, | ||
a.y / b.y | ||
}; | ||
} | ||
|
||
static ImVec2 operator/(ImVec2 const& a, int b) { | ||
return { | ||
a.x / b, | ||
a.y / b | ||
}; | ||
} | ||
|
||
static ImVec2 operator/(ImVec2 const& a, float b) { | ||
return { | ||
a.x / b, | ||
a.y / b | ||
}; | ||
} | ||
|
||
static bool operator!=(ImVec2 const& a, ImVec2 const& b) { | ||
return a.x != b.x || a.y != b.y; | ||
} | ||
|
||
static ImVec2 operator*(ImVec2 const& v1, float multi) { | ||
return { v1.x * multi, v1.y * multi }; | ||
} | ||
|
||
static ImVec2 toVec2(CCPoint const& a) { | ||
const auto size = ImGui::GetMainViewport()->Size; | ||
const auto winSize = CCDirector::get()->getWinSize(); | ||
return { | ||
a.x / winSize.width * size.x, | ||
(1.f - a.y / winSize.height) * size.y | ||
}; | ||
} | ||
|
||
static ImVec2 toVec2(CCSize const& a) { | ||
const auto size = ImGui::GetMainViewport()->Size; | ||
const auto winSize = CCDirector::get()->getWinSize(); | ||
return { | ||
a.width / winSize.width * size.x, | ||
-a.height / winSize.height * size.y | ||
}; | ||
} | ||
|
||
static CCPoint toCocos(const ImVec2& pos) { | ||
const auto winSize = CCDirector::sharedDirector()->getWinSize(); | ||
const auto size = ImGui::GetMainViewport()->Size; | ||
return CCPointMake( | ||
pos.x / size.x * winSize.width, | ||
(1.f - pos.y / size.y) * winSize.height | ||
); | ||
}; | ||
|
||
#include <imgui-cocos.hpp> | ||
#include <Geode/modify/CCDirector.hpp> | ||
class $modify(ImGuiInit, CCDirector) { | ||
$override void runWithScene(CCScene * pScene) { | ||
CCDirector::runWithScene(pScene); | ||
ImGuiCocos::get().setup([] {}).draw([] {}); | ||
}; | ||
}; |
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
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
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