X Tutup
Skip to content

Add About button to Main Menu#6145

Merged
impaktor merged 5 commits intopioneerspacesim:masterfrom
impaktor:help-button
Oct 27, 2025
Merged

Add About button to Main Menu#6145
impaktor merged 5 commits intopioneerspacesim:masterfrom
impaktor:help-button

Conversation

@impaktor
Copy link
Member

@impaktor impaktor commented May 30, 2025

Info tab

Give brief description of the game, for first time players. Should stress single player, Newtonian physics, free software, open world. Below is the text from our web page, with slight addition.
2025-05-30-091105_1275x716_scrot

Links

My plan was/is to have clickable hyperlinks by using ImGui's new ImGui::TextLinkOpenURL introduced in v1.91.0 (ocornut/imgui#7660), which we'll shortly get into PiGui through #6143, depending on if we accept allowing pioneer to open links/execute shell actions, as there's safety concerns. There are three options for how to be able to follow links in PiGui:

  • Use the new hyperlink feature of ImGui
  • Have a read-only input text, this allows for select & copy text
  • Have a dedicated "copy" to clipboard button

Documentation / Help

@bszlrd this is where I thought a question-mark icon would be apt
2025-05-30-090436_1278x718_scrot

Donate

Demonstrating crypto addresses as read-only input text to be able to copy-paste it, QR code goes to paypal. I think it's better to have information directly here, rather than to link to our homepage's donation page
2025-05-30-090449_1278x718_scrot

License

I had an idea we could read in licenses/GPL-3.txt and display here (or skip it)
2025-05-30-090500_1275x715_scrot

Software used

Just a list of content in contrib/ folder. Alternative is to read in AUTHORS.txt (or skip it)
2025-05-30-090511_1276x715_scrot

Goal

I want to lower the threshold for players to find documentation, wiki, manual, and also, there's the financial aspect of adding a donate button which I think will lower the threshold for more "spontaneous" donations

Financial situation

We usually get 2-4 donations / year of about €10 each, most of them the first 3 months, coinciding with the release. In 2024 & 2023 we went +/- 0, much thanks to a E.M. who generously donated $50(!) both years. Annual expenses are (this year) 323 SEK (domain) and 774 NOK for VM, which amounts to 1000 NOK or SEK or 100 EUR or USD (yes, exchange rate is 10 SEK = 10 NOK = 1 EUR = 1 USD in my mind, error is smaller than how close I keep tabs on this).

This year ManDay (on IRC) helped us to get a nicer paypal donation page by nagging me to set it up, and is contributing with monthly donations (a new feature), which helps a lot

With that said, I don't intend to hold this over anyone's head as some extortion, just being transparent, and to be clear, I don't want any donations from the dev team, as their time & effort is the donation that keeps pioneer going. In my mind, donations comes from players.

TODO

  • re-word text (suggestions welcome)
  • localize, I'm thinking to its own language module
  • URLs are either 1. hyperlinks, or 2. copy-paste text, or 3. copy-to-clipboard-button
  • License tab fix / remove?

@sturnclaw
Copy link
Member

Feel free to expose TextLinkOpenURL as part of this PR, as the other one is now merged.

Initial thoughts:

  • I like it.
  • Some formatting/styling changes might be nice, but that's definitely a topic for closer to the end of the PR's lifespan.
  • The overall appearance / framework might be good for an in-game help system.
  • The only thing I don't like is the ability for unscrupulous/malicious actors to modify the donation information (e.g. wallet addresses) at packaging/distribution time; IMO this is something where it's better to have all of that information live exclusively on the website. This is not a strongly-held opinion; if it's the opinion of the rest of the dev team that the benefits outweigh the risks then I am willing to accept the current implementation.

@bszlrd
Copy link
Contributor

bszlrd commented May 30, 2025

Having the support information only on our website, and only a link to it to avoid scams sounds reasonable to me.

@impaktor impaktor force-pushed the help-button branch 5 times, most recently from 9bc174b to 654db50 Compare June 7, 2025 05:46
@impaktor
Copy link
Member Author

impaktor commented Jun 7, 2025

OK, ready for review.

Some thoughts for reviewer:

  • There might be left-over redundant code from my copy-pasting the code from the options dialogue.
  • I've hard coded QR code to 128 x 128, perhaps there's a better way?
  • For some reason I'm not setting pionillium.body size for the Software-tab. Perhaps I should
  • Documentation tab is just one word + 3 links. No need to be lengthy.
  • License-tab is untranslated, and only headlines on Software-tab are localized.

Regarding donation tab

The only thing I don't like is the ability for unscrupulous/malicious actors to modify the donation information (e.g. wallet addresses) at packaging/distribution time

I can remove the wallet addresses, no one has ever used them thus far anyway. However, I would like to keep the paypal-link and QR code, as I know from my own experience that the threshold must be kept as low as possible. If someone has the thought to feel like a Samaritan and donate and then have to click through (additional) links this becomes an obstacle, and that Samaritan feeling dissipates into the ether for each link they have to click through.

Technically a link to the homepage could still be maliciously swapped to a different payment source, if someone is hell bent on stealing.

As long as Debian/Ubuntu/Fedora package is OK, I'm good. I assume one could do some hard-coded md5sum/sha1 check on the lua file at start up, but that defeats the purpose of lua moddable code I assume.

Sample

For some reason github + my internet connection do not agree, there's an (updated) version of what it looks like here:
http://191.101.80.52/files/about.mp4

@impaktor impaktor marked this pull request as ready for review June 7, 2025 07:32
@sturnclaw
Copy link
Member

The paypal link is fine to keep, I think, as is the QR code.

My concern was the lack of any general ability for the end-user to verify that their donation is actually going to official project resources rather than someone's personal wallet address; our donate page + our paypal button are acceptable as they have a third-party trust factor (e.g. our control of the domain address + Paypal's rendering of the recipient's name.)

...On that note, did you ever manage to get the Paypal donate button into the PioneerSpaceSim name rather than your name? I'm not concerned about it, but it's one of those "extra steps" for a potential donator to verify that Karl F. is the name of the Pioneer project manager 😄

@impaktor impaktor force-pushed the help-button branch 2 times, most recently from 6c04137 to de52f1b Compare June 9, 2025 05:38
@impaktor
Copy link
Member Author

impaktor commented Jun 9, 2025

The paypal link is fine to keep, I think, as is the QR code.

I've updated the PR, now looks like so:

2025-06-09-072827_1551x894_scrot

...On that note, did you ever manage to get the Paypal donate button into the PioneerSpaceSim name rather than your name?

I've looked into it, but was thwarted by paypal deciding to "fail to authenticate" my login, I'll have to call them (today) and see if I can sort both things out.

I believe code, layout, and wording is now ready for review.

Copy link
Contributor

@mwerle mwerle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, thank you.

Left some minor nitpicks (grammar/spelling).

On a high level - wouldn't it make sense to load the data from files instead of hard-coding it into the LUA? Some/most of this information might be useful as standalone text files as well, and would be a lot easier to maintain if it was separate. In fact, ideally there'd be a script to automatically keep the information up-to-date and accurate (one of the issues of being too detailed here..)

Finally (and not meaning to blow my own trumpet here), what about adding the (contents of the) AUTHORS file? Having game credits in-game somewhere is pretty standard and this About box goes well beyond what most do in acknowledging everything else that's gone into the game.

(NB: I am about to travel so feel free to ignore my "Request changes" if I don't reply in a timely manner)

Comment on lines +176 to +186
ui.withFont(pionillium.heading, function()
ui.text(l.LICENSE)
end)
ui.withFont(pionillium.body, function()
ui.text("Licensed under the terms of the GPL v3")
ui.text("Copyright © 2008-2025 Pioneer Developers")
ui.text("Portions copyright © 2013-2014 Meteoric Games Ltd")

ui.textWrapped("Pioneer's core code and extension modules are licensed under the terms of the GNU General Public License version 3. See licenses/GPL-3.txt for details.")
ui.textWrapped("Pioneer's art, music and other assets are licensed under the terms of the Creative Commons Attribution-ShareAlike 3.0 Unported License. See licenses/CC-BY-SA-3.0.txt for details.")
end)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the use of links in all the other pages, perhaps a link to the full GPL v3 license should be added here instead of asking the user to manually find the file on their computer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. Above is minimal effort copy-paste of the text that was in AUTHORS.txt. We do have a licenses/ folder, so I see no issue with referring the reader to it.


ui.bulletText(l.VERSION_LATEST)
ui.sameLine()
ui.textLinkOpenURL(l.VERSION_LATEST_CONTINUED, "https://github.com/pioneerspacesim/pioneer")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest going straight to the "Releases" page; most non-developers who have never seen GitHub before will have no idea what to do..

Suggested change
ui.textLinkOpenURL(l.VERSION_LATEST_CONTINUED, "https://github.com/pioneerspacesim/pioneer")
ui.textLinkOpenURL(l.VERSION_LATEST_CONTINUED, "https://github.com/pioneerspacesim/pioneer/releases")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. I assume they can find the latest release e.g. on our homepage or wherever they got the version they're currently playing. If we want them to play latest pre-compiled release we could just link to our homepage's download page. Here my thinking was they can get current master.

Anyone else have thoughts on what would be best to do here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.. oh, my mistake - I thought the GitHub page had nightly builds or something.

If you're asking people to compile it themselves, then that's well out of reach of most people and adding a link to GitHub in the About box is not really going to help. The people who are aware of GitHub and the capability to compile software will likely have figured this out already.

ui.withFont(pionillium.body, function()
ui.textWrapped(l.DONATE_BODY)
ui.spacing()
ui.textLinkOpenURL("PayPal:", "https://www.paypal.com/donate/?hosted_button_id=UPNFQCFJ9WSY6")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Out-of-scope)

The PayPal donation page could be improved by uppercasing the text and fixing the grammar:

"Donations covers running expenses of the pioneer space sim project. Surplus goes to development budget."

->

"Donations cover running expenses of the Pioneer space sim project. Surplus goes to development budget."

Potentially include a link to the Pioneer homepage (not sure this is possible).

IMHO this will make it look more legit. Even a tiny spelling mistake rings red alerts for me given the number of scams online these days.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'll likely have to setup a new page (once I re-gain access to my paypal) that's a "fundraiser" showing only the pioneer name, rather than my own, so I'll likely have to update this paypal URL before merge.

@sturnclaw
Copy link
Member

@mwerle welcome back! I feared for a bit that you had gone on to join the ranks of the well respected but ultimately never seen again Pioneer Developers... 😅

Thanks for the in-depth review! I think this PR is still a bit of a WIP in terms of finishing the major features it intends to land.

I may have to claim culpability for the lack of text files as data-source; I only just now remembered that we merged read-only file IO for the data:// directory as well as the user:// directory back in 2023, and may have provided a (wrongly) authoritative answer in the negative for our ability to read raw text files from the game's data.

Also, I noticed some other channels have a human-readable invitation link instead of a shortcode. Not sure how that can be set up.

That is a feature for Discord "Community" servers with a certain number of Nitro boosters. It's called a vanity URL and requires the server to jump through a lot of hoops to get there.

If I recall correctly, the invite link we use on the website (and in this PR) was one I specifically generated for Pioneer's use (for statistics that I never actually bother to check) and does not expire.

@impaktor
Copy link
Member Author

wouldn't it make sense to load the data from files instead of hard-coding it into the LUA?

Indeed, however, that would mean splitting/re-writing AUTHORS.txt into some format that is possible to parse, (and also generate a human readable AUTHORS.txt?), that could be left as a later exercise to whom ever feels motivated to do it.

what about adding the (contents of the) AUTHORS file

Indeed. This file is manually updated far more frequently than the third party software section of it is, so would have to update both places, unless we parse it somehow.

As I've previously expressed (to @sturnclaw), I'm interested in reading in the gpl license file and display as a (read-only) code-text block under the license tab, but as I understand it, reading of that path is only supported for json? Either way, feels fairly low priority, or rather "nice to have but only if it is easy to do".

@sturnclaw
Copy link
Member

sturnclaw commented Jun 14, 2025

I'm interested in reading in the gpl license file and display as a (read-only) code-text block under the license tab, but as I understand it, reading of that path is only supported for json? Either way, feels fairly low priority, or rather "nice to have but only if it is easy to do".

So - I wrongly told you earlier that it was only possible to read JSON files. As it stands, you have the ability to read raw text files (via a stripped-down version of the io API) from the data directory as well as read/write in the user directory.

However, the point is currently rather moot because we do not ship a copy of the GPL license text within the data/ directory at all (thus it is completely inaccessible to scripts), and in fact its location is rather variable depending on which OS the game is packaged for.

Feel free to add a copy of the GPL license text to the data/ directory. I'd recommend displaying it in a scrolling child window rather than a text edit widget however, as there's less overhead and the text edit widget isn't really meant for what you're trying to do.

@Bodasey
Copy link

Bodasey commented Jun 15, 2025

Transfer money to a bank account without knowing the bank account's owner? Dangerous, fraud, never do this, says the police... (money laundering)

To be clear: I have not said one of you does such things.

@impaktor
Copy link
Member Author

impaktor commented Oct 22, 2025

Status

OK, a few months have passed, I've now set up a new donations page, that is more "pioneery", and replaced the QR-code and paypal link in this PR to use this new page instead.

DONE

Thus I consider this PR to be ready for merge.

Future further improvements

I'll leave it "as an exercise" to whom ever feels the motivation to:

  • Flesh out the Documentation tab? (beyond current 3 links to wiki from manual, faq and basic flight?)
  • Read in AUTHORS.txt (display under contribution tab?)
  • Read in and parse Changelog.txt in a separate tab (use news.png icon)
  • Read in and display NEWS.md in a separate "Release"-tab?
  • Display content of License folder in some nifty way

and if we then have code to read in and parse txt files in project root, then we can just as well read in and display the licenses/ folder under the license tab as well. I think that would be dandy.

But for now, this can be merged, if reviewer doesn't have any objections.

Shows:
- tab1: Introduction info, version and link bugtracker
- tab2: Help, link wiki, forum, discord, FAQ
- tab3: donate,
- tab4: content contributions,
- tab5: License GPL
- tab6: Software used, list (copy of) content of contrib/
@impaktor impaktor merged commit e7b03a5 into pioneerspacesim:master Oct 27, 2025
4 checks passed
@impaktor impaktor deleted the help-button branch October 27, 2025 19:40
@impaktor
Copy link
Member Author

OK, so merged, as I wanted it in master, and further work can be done later, by anyone motivated to do so. Some suggestions:

  • Set pionillium.body size also for the Software-tab?
  • Move license/ folder to data/ and read it in under the License tab, clicking each license reads in the license file from the folder, and opens it in a floating window
  • Parsing of AUTHORS, Changelog.txt, or NEWS.md would require them to be in data/ so I guess that is on hold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

X Tutup