Skip to content

Commit

Permalink
Added a sponsor button (#1054)
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlegiantJGC authored May 29, 2024
1 parent 85ceb6b commit dd41b8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions amulet_map_editor/api/framework/pages/main_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ def __init__(self, parent: wx.Window):
self._discord_button.Bind(wx.EVT_BUTTON, self._discord)
sizer.Add(self._discord_button, 0, wx.ALL | wx.CENTER, 5)

self._sponsor_button = wx.Button(self, size=(400, 70))
self._sponsor_button.SetFont(button_font)
self._sponsor_button.Bind(wx.EVT_BUTTON, self._sponsor)
sizer.Add(self._sponsor_button, 0, wx.ALL | wx.CENTER, 5)

sizer.AddStretchSpacer(2)

self._lang_button = wx.BitmapButton(
Expand All @@ -69,6 +74,7 @@ def _load_strings(self):
self._open_world_button.SetLabel(lang.get("main_menu.open_world"))
self._user_manual_button.SetLabel(lang.get("main_menu.user_manual"))
self._user_manual_button.SetToolTip(lang.get("app.browser_open_tooltip"))
self._sponsor_button.SetLabel(lang.get("main_menu.sponsor"))
self._bug_tracker_button.SetLabel(lang.get("main_menu.bug_tracker"))
self._bug_tracker_button.SetToolTip(lang.get("app.browser_open_tooltip"))
self._discord_button.SetLabel(lang.get("main_menu.discord"))
Expand All @@ -90,6 +96,10 @@ def _bugs(_):
def _discord(_):
webbrowser.open("https://www.amuletmc.com/discord")

@staticmethod
def _sponsor(_):
webbrowser.open("https://github.com/sponsors/Amulet-Team")

def enable(self):
self.GetTopLevelParent().create_menu()

Expand Down
1 change: 1 addition & 0 deletions amulet_map_editor/lang/en.lang
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ menu_bar.help.menu_name=&Help
main_menu.tab_name=Main Menu
main_menu.open_world=Open World
main_menu.user_manual=User Manual
main_menu.sponsor=Support Us
main_menu.bug_tracker=Bug Tracker
main_menu.discord=Amulet Discord

Expand Down

0 comments on commit dd41b8e

Please sign in to comment.