Skip to content

Commit

Permalink
Tech tree button (to open Onetech in browser) on login screen. Better…
Browse files Browse the repository at this point in the history
… tool tips for several buttons. Fixes #647
  • Loading branch information
jasonrohrer committed Jul 3, 2020
1 parent c6cf7a9 commit ae1d0c4
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 1 deletion.
4 changes: 4 additions & 0 deletions documentation/changeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Version 346 ???

--Category editor preserves index, if possible, when switching categories.

--Tech tree button (to open Onetech in browser) on login screen. Better tool
tips for several buttons. Fixes #647




Server Fixes
Expand Down
20 changes: 19 additions & 1 deletion gameSource/ExistingAccountPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ ExistingAccountPage::ExistingAccountPage()
mLoginButton( mainFont, 400, 0, translate( "loginButton" ) ),
mFriendsButton( mainFont, 400, -80, translate( "friendsButton" ) ),
mGenesButton( mainFont, 550, 0, translate( "genesButton" ) ),
mFamilyTreesButton( mainFont, 400, -160, translate( "familyTrees" ) ),
mFamilyTreesButton( mainFont, 320, -160, translate( "familyTrees" ) ),
mTechTreeButton( mainFont, 550, -160, translate( "techTree" ) ),
mClearAccountButton( mainFont, 400, -280,
translate( "clearAccount" ) ),
mCancelButton( mainFont, -400, -280,
Expand Down Expand Up @@ -97,6 +98,7 @@ ExistingAccountPage::ExistingAccountPage()
setButtonStyle( &mFriendsButton );
setButtonStyle( &mGenesButton );
setButtonStyle( &mFamilyTreesButton );
setButtonStyle( &mTechTreeButton );
setButtonStyle( &mClearAccountButton );
setButtonStyle( &mCancelButton );
setButtonStyle( &mSettingsButton );
Expand All @@ -118,6 +120,7 @@ ExistingAccountPage::ExistingAccountPage()
addComponent( &mFriendsButton );
addComponent( &mGenesButton );
addComponent( &mFamilyTreesButton );
addComponent( &mTechTreeButton );
addComponent( &mClearAccountButton );
addComponent( &mCancelButton );
addComponent( &mSettingsButton );
Expand All @@ -137,6 +140,7 @@ ExistingAccountPage::ExistingAccountPage()
mFriendsButton.addActionListener( this );
mGenesButton.addActionListener( this );
mFamilyTreesButton.addActionListener( this );
mTechTreeButton.addActionListener( this );
mClearAccountButton.addActionListener( this );

mCancelButton.addActionListener( this );
Expand All @@ -163,6 +167,12 @@ ExistingAccountPage::ExistingAccountPage()
mLoginButton.setMouseOverTip( translate( "saveTip" ) );
mClearAccountButton.setMouseOverTip( translate( "clearAccountTip" ) );

mFriendsButton.setMouseOverTip( translate( "friendsTip" ) );
mGenesButton.setMouseOverTip( translate( "genesTip" ) );
mFamilyTreesButton.setMouseOverTip( translate( "familyTreesTip" ) );
mTechTreeButton.setMouseOverTip( translate( "techTreeTip" ) );


int reviewPosted = SettingsManager::getIntSetting( "reviewPosted", 0 );

if( reviewPosted ) {
Expand Down Expand Up @@ -428,6 +438,14 @@ void ExistingAccountPage::actionPerformed( GUIComponent *inTarget ) {
}
delete [] url;
}
else if( inTarget == &mTechTreeButton ) {
char *url = SettingsManager::getStringSetting( "techTreeURL", "" );

if( strcmp( url, "" ) != 0 ) {
launchURL( url );
}
delete [] url;
}
else if( inTarget == &mViewAccountButton ) {
if( mHideAccount ) {
mViewAccountButton.setLabelText( translate( "hide" ) );
Expand Down
1 change: 1 addition & 0 deletions gameSource/ExistingAccountPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class ExistingAccountPage : public GamePage, public ActionListener {
TextButton mFriendsButton;
TextButton mGenesButton;
TextButton mFamilyTreesButton;
TextButton mTechTreeButton;
TextButton mClearAccountButton;
TextButton mCancelButton;

Expand Down
7 changes: 7 additions & 0 deletions gameSource/languages/English.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ atSignTip "INSERT '@' SIGN (INTL KEYBOARDS)"
loginButton "LOGIN"
friendsButton "FRIENDS"
familyTrees "FAMILY TREES"
techTree "TECH"
genesButton "GENES"
geneticHistoryButton "GENETIC HISTORY"

Expand Down Expand Up @@ -91,6 +92,12 @@ submit "SUBMIT"
saveTip "LOGIN AND STORE DETAILS LOCALLY"
clearAccountTip "DELETES ACCOUNT DETAILS FROM DISK"

friendsTip "GET BORN WITH FRIENDS"
genesTip "GENETIC SCORE DETAILS"

familyTreesTip "OPEN FAMILY TREES IN WEB BROWSER"
techTreeTip "OPEN TECH TREE IN WEB BROWSER"


accountKey "KEY:"
paste "PASTE"
Expand Down
1 change: 1 addition & 0 deletions gameSource/settings/techTreeURL.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http://onetech.info

0 comments on commit ae1d0c4

Please sign in to comment.