mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-05-10 08:31:16 +00:00
[client] overlay/config: general UX changes
* Moved the LG license and version onto a seperate tab. * Added general donation section and link to the website donation page * Removed donation details under gnif's section
This commit is contained in:
parent
d8f2125543
commit
81aa24d4d3
@ -77,14 +77,19 @@ static void config_renderLGTab(void)
|
|||||||
{
|
{
|
||||||
const float fontSize = igGetFontSize();
|
const float fontSize = igGetFontSize();
|
||||||
|
|
||||||
if (igCollapsingHeader_BoolPtr("About", NULL,
|
if (igCollapsingHeader_BoolPtr("Donations", NULL,
|
||||||
ImGuiTreeNodeFlags_DefaultOpen))
|
ImGuiTreeNodeFlags_DefaultOpen))
|
||||||
{
|
{
|
||||||
igText(LG_COPYRIGHT_STR);
|
igTextWrapped(LG_DONATION_STR);
|
||||||
overlayTextURL(LG_WEBSITE_STR, NULL);
|
|
||||||
igText(LG_VERSION_STR);
|
igBeginTable("split", 2, 0, (ImVec2){}, 0.0f);
|
||||||
igSeparator();
|
igTableSetupColumn("", ImGuiTableColumnFlags_WidthFixed, fontSize, 0);
|
||||||
igTextWrapped(LG_LICENSE_STR);
|
igTableNextColumn();
|
||||||
|
igBulletText("");
|
||||||
|
igTableNextColumn();
|
||||||
|
overlayTextURL(LG_DONATION_URL, NULL);
|
||||||
|
|
||||||
|
igEndTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (igCollapsingHeader_BoolPtr("Help & Support", NULL,
|
if (igCollapsingHeader_BoolPtr("Help & Support", NULL,
|
||||||
@ -102,7 +107,7 @@ static void config_renderLGTab(void)
|
|||||||
igEndTable();
|
igEndTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (igCollapsingHeader_BoolPtr("The Looking Glass Team / Donations", NULL,
|
if (igCollapsingHeader_BoolPtr("The Looking Glass Team", NULL,
|
||||||
ImGuiTreeNodeFlags_DefaultOpen))
|
ImGuiTreeNodeFlags_DefaultOpen))
|
||||||
{
|
{
|
||||||
for(const struct LGTeamMember * member = LG_TEAM; member->name; ++member)
|
for(const struct LGTeamMember * member = LG_TEAM; member->name; ++member)
|
||||||
@ -138,6 +143,15 @@ static void config_renderLGTab(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void config_renderLicenseTab(void)
|
||||||
|
{
|
||||||
|
igText(LG_COPYRIGHT_STR);
|
||||||
|
overlayTextURL(LG_WEBSITE_URL, NULL);
|
||||||
|
igText(LG_VERSION_STR);
|
||||||
|
igSeparator();
|
||||||
|
igTextWrapped(LG_LICENSE_STR);
|
||||||
|
}
|
||||||
|
|
||||||
static int config_render(void * udata, bool interactive, struct Rect * windowRects,
|
static int config_render(void * udata, bool interactive, struct Rect * windowRects,
|
||||||
int maxRects)
|
int maxRects)
|
||||||
{
|
{
|
||||||
@ -171,7 +185,7 @@ static int config_render(void * udata, bool interactive, struct Rect * windowRec
|
|||||||
|
|
||||||
igBeginTabBar("Configuration#tabs", 0);
|
igBeginTabBar("Configuration#tabs", 0);
|
||||||
|
|
||||||
if (igBeginTabItem("Looking Glass", NULL, 0))
|
if (igBeginTabItem("About", NULL, 0))
|
||||||
{
|
{
|
||||||
config_renderLGTab();
|
config_renderLGTab();
|
||||||
igEndTabItem();
|
igEndTabItem();
|
||||||
@ -208,6 +222,12 @@ static int config_render(void * udata, bool interactive, struct Rect * windowRec
|
|||||||
}
|
}
|
||||||
ll_unlock(cfg.tabCallbacks);
|
ll_unlock(cfg.tabCallbacks);
|
||||||
|
|
||||||
|
if (igBeginTabItem("License", NULL, 0))
|
||||||
|
{
|
||||||
|
config_renderLicenseTab();
|
||||||
|
igEndTabItem();
|
||||||
|
}
|
||||||
|
|
||||||
igEndTabBar();
|
igEndTabBar();
|
||||||
|
|
||||||
overlayGetImGuiRect(windowRects);
|
overlayGetImGuiRect(windowRects);
|
||||||
|
@ -21,8 +21,10 @@
|
|||||||
#include "common/types.h"
|
#include "common/types.h"
|
||||||
|
|
||||||
extern const char * LG_COPYRIGHT_STR;
|
extern const char * LG_COPYRIGHT_STR;
|
||||||
extern const char * LG_WEBSITE_STR;
|
extern const char * LG_WEBSITE_URL;
|
||||||
extern const char * LG_LICENSE_STR;
|
extern const char * LG_LICENSE_STR;
|
||||||
|
extern const char * LG_DONATION_STR;
|
||||||
|
extern const char * LG_DONATION_URL;
|
||||||
extern const StringPair LG_HELP_LINKS[];
|
extern const StringPair LG_HELP_LINKS[];
|
||||||
|
|
||||||
struct LGTeamMember
|
struct LGTeamMember
|
||||||
|
@ -20,10 +20,18 @@
|
|||||||
|
|
||||||
#include "common/appstrings.h"
|
#include "common/appstrings.h"
|
||||||
|
|
||||||
|
const char * LG_DONATION_STR =
|
||||||
|
"Looking Glass is written and supported by a small group of developers in our "
|
||||||
|
"free time and has been given to the world free of charge. If you find this "
|
||||||
|
"program useful please consider supporting our efforts through the following "
|
||||||
|
"address:";
|
||||||
|
|
||||||
|
const char * LG_DONATION_URL = "https://looking-glass.io/donations";
|
||||||
|
|
||||||
const char * LG_COPYRIGHT_STR =
|
const char * LG_COPYRIGHT_STR =
|
||||||
"Copyright © 2017-2022 The Looking Glass Authors";
|
"Copyright © 2017-2022 The Looking Glass Authors";
|
||||||
|
|
||||||
const char * LG_WEBSITE_STR =
|
const char * LG_WEBSITE_URL =
|
||||||
"https://looking-glass.io";
|
"https://looking-glass.io";
|
||||||
|
|
||||||
const char * LG_LICENSE_STR =
|
const char * LG_LICENSE_STR =
|
||||||
@ -72,34 +80,7 @@ const struct LGTeamMember LG_TEAM[] =
|
|||||||
"and direction of the project as a whole, focusing on the X11 "
|
"and direction of the project as a whole, focusing on the X11 "
|
||||||
"platform as well as maintaining the Looking Glass community on "
|
"platform as well as maintaining the Looking Glass community on "
|
||||||
"Discord and the Level1Tech forums.",
|
"Discord and the Level1Tech forums.",
|
||||||
.donate =
|
.donate = { { 0 } }
|
||||||
{
|
|
||||||
{
|
|
||||||
.name = "GitHub Sponsors",
|
|
||||||
.value = "https://github.com/sponsors/gnif"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.name = "Patreon",
|
|
||||||
.value = "https://www.patreon.com/gnif"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.name = "Ko-Fi",
|
|
||||||
.value = "https://ko-fi.com/lookingglass"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.name = "Bitcoin (BTC)",
|
|
||||||
.value = "14ZFcYjsKPiVreHqcaekvHGL846u3ZuT13"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.name = "Ethereum (ETH)",
|
|
||||||
.value = "0x6f8aEe454384122bF9ed28f025FBCe2Bce98db85"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.name = "Monero (XMR)",
|
|
||||||
.value = "47xM4zG7b2tEj4mnSywHve4ydZzn3wzhf22snDRB7aSEcXrgUBpoT2Z4phTnyFMi1sMyQtHbdufMYRQ2PzMn3PGUJAE1dpc"
|
|
||||||
},
|
|
||||||
{ 0 }
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "Guanzhong Chen (quantum)",
|
.name = "Guanzhong Chen (quantum)",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user