From c27e723fb58c36e3ecb5fb0e0ed75b530b432e4e Mon Sep 17 00:00:00 2001 From: William JCM Date: Thu, 16 Jan 2020 09:04:51 +0100 Subject: [PATCH] MainFrame: add a proper link to the GitHub. --- CMakeLists.txt | 1 + GUI/MainFrame.cpp | 5 +++- GUI/MainFrame.fbp | 65 ++++++++++++++++++++++++++++++++++++++++++++++- GUI/MainFrame.h | 2 ++ 4 files changed, 71 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f51325c..927d6a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,4 +50,5 @@ target_link_libraries(wxMASSManager PRIVATE Corrade::Utility wx_baseu-3.0 wx_mswu_core-3.0 + wx_mswu_adv-3.0 wtsapi32) diff --git a/GUI/MainFrame.cpp b/GUI/MainFrame.cpp index 0090de7..1bc9a06 100644 --- a/GUI/MainFrame.cpp +++ b/GUI/MainFrame.cpp @@ -114,10 +114,13 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co bSizerMain->Add( bSizerGameStatus, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - _aboutText = new wxStaticText( this, wxID_ANY, wxT("This version of the application was tested on M.A.S.S. Builder early access version 0.2.4.\nIt may or may not work with other versions of the game.\nMade for the M.A.S.S. Builder community by Guillaume Jacquemin.\nhttps://github.com/williamjcm/wxMASSManager"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL ); + _aboutText = new wxStaticText( this, wxID_ANY, wxT("This version of the application was tested on M.A.S.S. Builder early access version 0.2.4.\nIt may or may not work with other versions of the game.\nMade for the M.A.S.S. Builder community by Guillaume Jacquemin."), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL ); _aboutText->Wrap( -1 ); bSizerMain->Add( _aboutText, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 ); + _githubLink = new wxHyperlinkCtrl( this, wxID_ANY, wxT("https://github.com/williamjcm/wxMASSManager"), wxT("https://github.com/williamjcm/wxMASSManager"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + bSizerMain->Add( _githubLink, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + this->SetSizer( bSizerMain ); this->Layout(); diff --git a/GUI/MainFrame.fbp b/GUI/MainFrame.fbp index 512bdd1..0ea7ac1 100644 --- a/GUI/MainFrame.fbp +++ b/GUI/MainFrame.fbp @@ -1070,7 +1070,7 @@ 0 0 wxID_ANY - This version of the application was tested on M.A.S.S. Builder early access version 0.2.4. It may or may not work with other versions of the game. Made for the M.A.S.S. Builder community by Guillaume Jacquemin. https://github.com/williamjcm/wxMASSManager + This version of the application was tested on M.A.S.S. Builder early access version 0.2.4. It may or may not work with other versions of the game. Made for the M.A.S.S. Builder community by Guillaume Jacquemin. 0 0 @@ -1099,6 +1099,69 @@ -1 + + 5 + wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + + wxID_ANY + https://github.com/williamjcm/wxMASSManager + + 0 + + + 0 + + 1 + _githubLink + + 1 + + + protected + 1 + + Resizable + 1 + + wxHL_DEFAULT_STYLE + ; ; forward_declare + 0 + + https://github.com/williamjcm/wxMASSManager + + + + + + 0 diff --git a/GUI/MainFrame.h b/GUI/MainFrame.h index 69d6359..9639558 100644 --- a/GUI/MainFrame.h +++ b/GUI/MainFrame.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -51,6 +52,7 @@ class MainFrame : public wxFrame wxStaticText* _gameStatusLabel; wxStaticText* _gameStatus; wxStaticText* _aboutText; + wxHyperlinkCtrl* _githubLink; wxTimer _gameCheckTimer; // Virtual event handlers, overide them in your derived class