Commit Graph

16 Commits

Author SHA1 Message Date
Richard Qian
f136c6fe36
In-game high scores management (#4483)
* Add in-game high score selection screens, based on the ghost replay screens

Its functionality is basic for now, mainly to let players have a central place to view
their high scores

Other things to improve:
* Allow sorting the high score entries by criteria
* Allow deleting high score nodes and possibly entries
* Use better icons

* The string for the high scores title in the track info screen can now be translated

* Refine in-game high score selection screens

Includes:
* High score info dialog now shows track and setup information
* A race can be started with the displayed setup, using the current player and kart
* Icon to access the screen now placed between the tutorial and achievements buttons
* It is possible to delete a specific high score group or all of the high score groups
* Change the order of some columns to make them easier to hide for non-linear modes
* The list will now filter out enpty high score groups

* Replace bomb icon (as used in the help menu) with the full object version from STK 0.8

It has been edited to remove most of the transparency in the object itself

* Implement column clicking in the high score selection screen, and minor GUI fixes

Note that high score entry sorting is not yet working properly

Includes:
* Top right buttons replaced by button bar containing them; fixes unreliable clicking
* High score manager has some one-line functions moved into its header file
* High scores can be sorted by some criteria
* Sorting is done before every time high scores are saved

* Fix header define names for the high score info dialog

* Fix high score sorting, reorganize its associated code

* More refinements to the high score selection screen

Includes:
* Clearing high scores no longer causes memory leaks
* The manual refresh button has been removed, as it has been deemed useless

* Remove unused header files for the high scores information dialog header

* The high scores box in the track information screen no longer has '='

* Fix pressing escape key in the high score information dialog crashing the game

Also remove unused widget variables and unnecessary function overrides

* Do not write high scores for races that have 0 laps and/or have no real karts

* Allow passing a parameter to prevent high scores from temporarily being written

This setting lasts only as long as the game runs; it is useful during track and
kart animation testing, where unwanted high score entries should not be written

* Force update sources.cmake, as new source files are being added for high scores screens

* Fix memory leak and strings

Co-authored-by: Benau <Benau@users.noreply.github.com>
2021-02-12 11:12:43 +08:00
Deve
b5f3fafaac Slightly increase button size for android 2019-11-07 21:33:58 +01:00
Deve
4be93daa83 Add small left margin to all back buttons 2019-10-24 22:25:49 +02:00
Deve
755b8a2f1b Slightly increase back button size and more consistent header pos/size 2019-10-05 23:44:14 +02:00
Du maosen
8316d91469 Some improvements for soccer AI spinner (#4069)
* Improve code

* Bigger space in track info

* Bug fix && improvements

* Bug fix && improvements

* Bug fix && improvements
2019-09-26 10:12:24 +08:00
riso
0547e1e469 Add options to control the number of red/blue AI in soccer mode (#4063)
* Add options to control the number of red/blue AI in soccer mode (offline)

* fix a bug related to the upper bound when AI num=0 and trying to lower the number

* forgot to fix this

* remove the Balanced/Custom spinner

* improve the AI number spinner's behavior at lower bound

* Hide blue ai number setting if not soccer

* move getting red/blue players number to function TrackInfoScreen::getRedBluePlayerNumber()

* Tab to Space

* rename local variable m_xxx to num_xxx

* bug fix

* improve the default AI number: try the previously used one, if cannot use the previous, recalculate the AI number using balanced
2019-09-23 21:59:17 +08:00
Benau
fdf92e108d Improve spacing in track info screen 2019-06-14 20:50:24 +08:00
Deve
10a580ebd3 Give slightly more space for options in tracks screen 2019-05-15 22:37:56 +02:00
Deve
5b133c21c9 Make hiscores list scrollable 2019-05-15 22:27:29 +02:00
Mrxx99
b55ec5cfb8 FFA for offline play (#3708)
* added widget to track info screen to select between Free-For-All and Three Strikes Battle

* setting AI to zero and setting time target to 2 minutes for testing

* setting also hitcapture limit to prevent immediate race end

* setting m_count_down_reached_zero to false in ffa reset to allow starting a new race after the previous ended through time limit

* integrated necessary adjustments and made possible to set time target

* removed unused spinner variable

* use translations

* centralized is_soccer and show_ffa_spinner variables

* setting target value spinner visible/invisible depending on ffa game type

* using no hittarget and fix for this in free for all mode

* set use_highscores to false for FFA

* disabling AI for FFA

* disable hit limit icon for FFA if no hit limit is set ( = 0 )

* changed icon and name of three strikes battle to only battle in race setup screen

* set AI to Battle AI if mode is FFA

* added config parameters for FFA

* added define which can be used to enable FFA AI

* resolved merge conflict

* moved ffa options higher

* fix for setting ai karts

* improved m_show_ffa_spinner and m_is_soccer

* removed code for disabling widgets for FFA AI

* implemented requested changes
2019-02-20 19:18:02 -05:00
Mrxx99
c959836e34 Move soccer options to track info screen (#3638)
* moved soccer race options to track info screen

* using one spinner for both target mode values

* merged pointamount-spinner with lap-spinner and renamed it to target-value-spinner

* fixed identation

* small fix in track_info screen

* storing target value when value was changed

* making sure tartet spinners are invisible when not needed; small adjustments

* some test with solving space issues on small resolutions

* Revert "some test with solving space issues on small resolutions"

This reverts commit f6b6526681.

* test with collapsing widgets

* removed deleting childs of widgets in track_info_screen

* readded deleted spacer

* collapsing target type widgets is now working

* made target type spinner wider to have enough space for text in it on small resolutions

* re-added setting target value to invisible/visible

* using new collapsing widget function in track info screen for target type widgets
2019-01-02 20:29:53 -05:00
Deve
ad21bc0886 Make spinner widgets in track info slightly bigger 2018-10-12 22:51:06 +02:00
Alayan
791a490e58 Fix display of very long track author names 2018-09-24 13:28:26 +02:00
Alayan
902e64c7f5 Redesign track info screen to work with 5 highscores, battle mode and hi-dpi 2018-09-22 03:31:07 +02:00
Alayan
82408aab2f Restore 5 highscores 2018-09-22 01:55:28 +02:00
Alayan
03839b7cfe Move GUI files to categorized folders and update all references 2018-09-16 16:37:42 +02:00