mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
impr: Replace Patreon links with Ko-Fi
This commit is contained in:
4
.github/FUNDING.yml
vendored
4
.github/FUNDING.yml
vendored
@@ -1,5 +1,5 @@
|
||||
# Sponsor links
|
||||
|
||||
patreon: werwolv
|
||||
custom: https://werwolv.net/donate
|
||||
github: WerWolv
|
||||
ko_fi: WerWolv
|
||||
custom: "https://werwolv.net/donate"
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
|
||||
## Supporting
|
||||
|
||||
If you like my work, please consider supporting me on GitHub Sponsors, Patreon or PayPal. Thanks a lot!
|
||||
If you like my work, please consider supporting me on GitHub Sponsors, Ko-Fi or PayPal. Thanks a lot!
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/sponsors/WerWolv"><img src="https://werwolv.net/assets/github_banner.png" alt="GitHub donate button" /></a>
|
||||
<a href="https://www.patreon.com/werwolv"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Patreon donate button" /></a>
|
||||
<a href="https://ko-fi.com/WerWolv"><img src="https://werwolv.net/assets/kofi_banner.png" alt="Ko-Fi donate button" /></a>
|
||||
<a href="https://werwolv.net/donate"><img src="https://werwolv.net/assets/paypal_banner.png" alt="PayPal donate button" /></a>
|
||||
</p>
|
||||
|
||||
|
||||
BIN
plugins/builtin/romfs/assets/common/donation/ko-fi.png
Normal file
BIN
plugins/builtin/romfs/assets/common/donation/ko-fi.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 32 KiB |
@@ -159,18 +159,20 @@ namespace hex::plugin::builtin {
|
||||
ImGui::EndChild();
|
||||
|
||||
struct DonationPage {
|
||||
DonationPage(const std::fs::path &path, std::string link) :
|
||||
DonationPage(std::string name, const std::fs::path &path, std::string link) :
|
||||
name(std::move(name)),
|
||||
texture(ImGuiExt::Texture::fromImage(romfs::get(path).span<std::byte>(), ImGuiExt::Texture::Filter::Linear)),
|
||||
link(std::move(link)) { }
|
||||
|
||||
std::string name;
|
||||
AutoReset<ImGuiExt::Texture> texture;
|
||||
std::string link;
|
||||
};
|
||||
|
||||
static std::array DonationPages = {
|
||||
DonationPage("assets/common/donation/paypal.png", "https://werwolv.net/donate"),
|
||||
DonationPage("assets/common/donation/github.png", "https://github.com/sponsors/WerWolv"),
|
||||
DonationPage("assets/common/donation/patreon.png", "https://patreon.com/werwolv")
|
||||
DonationPage("GitHub Sponsors", "assets/common/donation/github.png", "https://github.com/sponsors/WerWolv"),
|
||||
DonationPage("Ko-Fi", "assets/common/donation/ko-fi.png", "https://ko-fi.com/werwolv"),
|
||||
DonationPage("PayPal", "assets/common/donation/paypal.png", "https://werwolv.net/donate")
|
||||
};
|
||||
|
||||
if (ImGui::BeginTable("DonationLinks", 5, ImGuiTableFlags_SizingStretchSame)) {
|
||||
@@ -183,7 +185,7 @@ namespace hex::plugin::builtin {
|
||||
const auto size = (page.texture->getSize() * 1_scaled) / 1.5F;
|
||||
const auto startPos = ImGui::GetCursorScreenPos();
|
||||
ImGui::Image(*page.texture, size);
|
||||
|
||||
ImGui::SetItemTooltip("%s (%s)", page.name.c_str(), page.link.c_str());
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::GetForegroundDrawList()->AddShadowCircle(startPos + size / 2, size.x / 2, ImGui::GetColorU32(ImGuiCol_Button), 100.0F, ImVec2(), ImDrawFlags_ShadowCutOutShapeBackground);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user