mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-21 21:17:19 +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();
|
||||
|
||||
if (igCollapsingHeader_BoolPtr("About", NULL,
|
||||
if (igCollapsingHeader_BoolPtr("Donations", NULL,
|
||||
ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
igText(LG_COPYRIGHT_STR);
|
||||
overlayTextURL(LG_WEBSITE_STR, NULL);
|
||||
igText(LG_VERSION_STR);
|
||||
igSeparator();
|
||||
igTextWrapped(LG_LICENSE_STR);
|
||||
igTextWrapped(LG_DONATION_STR);
|
||||
|
||||
igBeginTable("split", 2, 0, (ImVec2){}, 0.0f);
|
||||
igTableSetupColumn("", ImGuiTableColumnFlags_WidthFixed, fontSize, 0);
|
||||
igTableNextColumn();
|
||||
igBulletText("");
|
||||
igTableNextColumn();
|
||||
overlayTextURL(LG_DONATION_URL, NULL);
|
||||
|
||||
igEndTable();
|
||||
}
|
||||
|
||||
if (igCollapsingHeader_BoolPtr("Help & Support", NULL,
|
||||
@ -102,7 +107,7 @@ static void config_renderLGTab(void)
|
||||
igEndTable();
|
||||
}
|
||||
|
||||
if (igCollapsingHeader_BoolPtr("The Looking Glass Team / Donations", NULL,
|
||||
if (igCollapsingHeader_BoolPtr("The Looking Glass Team", NULL,
|
||||
ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
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,
|
||||
int maxRects)
|
||||
{
|
||||
@ -171,7 +185,7 @@ static int config_render(void * udata, bool interactive, struct Rect * windowRec
|
||||
|
||||
igBeginTabBar("Configuration#tabs", 0);
|
||||
|
||||
if (igBeginTabItem("Looking Glass", NULL, 0))
|
||||
if (igBeginTabItem("About", NULL, 0))
|
||||
{
|
||||
config_renderLGTab();
|
||||
igEndTabItem();
|
||||
@ -208,6 +222,12 @@ static int config_render(void * udata, bool interactive, struct Rect * windowRec
|
||||
}
|
||||
ll_unlock(cfg.tabCallbacks);
|
||||
|
||||
if (igBeginTabItem("License", NULL, 0))
|
||||
{
|
||||
config_renderLicenseTab();
|
||||
igEndTabItem();
|
||||
}
|
||||
|
||||
igEndTabBar();
|
||||
|
||||
overlayGetImGuiRect(windowRects);
|
||||
|
@ -21,8 +21,10 @@
|
||||
#include "common/types.h"
|
||||
|
||||
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_DONATION_STR;
|
||||
extern const char * LG_DONATION_URL;
|
||||
extern const StringPair LG_HELP_LINKS[];
|
||||
|
||||
struct LGTeamMember
|
||||
|
@ -20,10 +20,18 @@
|
||||
|
||||
#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 =
|
||||
"Copyright © 2017-2022 The Looking Glass Authors";
|
||||
|
||||
const char * LG_WEBSITE_STR =
|
||||
const char * LG_WEBSITE_URL =
|
||||
"https://looking-glass.io";
|
||||
|
||||
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 "
|
||||
"platform as well as maintaining the Looking Glass community on "
|
||||
"Discord and the Level1Tech forums.",
|
||||
.donate =
|
||||
{
|
||||
{
|
||||
.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 }
|
||||
}
|
||||
.donate = { { 0 } }
|
||||
},
|
||||
{
|
||||
.name = "Guanzhong Chen (quantum)",
|
||||
|
Loading…
Reference in New Issue
Block a user