This commit is contained in:
Alayan 2018-11-23 17:20:33 +01:00
commit 1e178cdcf9
4 changed files with 292 additions and 315 deletions

View File

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/icons/back.png"/>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header width="80%" height="7%" align="center" text="SuperTuxKart Options" text_align="center"/>
<spacer width="100%" height="1%"/>
<div width="100%" height="92%" layout="horizontal-row" >
<vertical-tabs id="options_choice" height="100%" width="18%">
<icon-button id="tab_general" width="128" height="128" icon="gui/icons/options_general.png"
I18N="Section in the settings menu" text="General"/>
<icon-button id="tab_video" width="128" height="128" icon="gui/icons/options_video.png"
I18N="Section in the settings menu" text="Graphics"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/icons/options_audio.png"
I18N="Section in the settings menu" text="Audio"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/icons/options_ui.png"
I18N="Section in the settings menu" text="User Interface"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/icons/options_players.png"
I18N="Section in the settings menu" text="Players"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/icons/options_input.png"
I18N="Section in the settings menu" text="Controls"/>
<icon-button id="tab_language" width="128" height="128" icon="gui/icons/options_language.png"
I18N="Section in the settings menu" text="Language"/>
</vertical-tabs>
<box proportion="1" width="100%" layout="vertical-row">
<spacer width="5" height="5"/>
<div layout="horizontal-row" width="75%" height="fit" align="center">
<spacer proportion="1"/>
<label text="You are playing as" height="100%"/>
<spacer width="2%" height="1"/>
<button id="playername" width="27%" align="center"/>
<spacer proportion="1"/>
</div>
<spacer width="5" height="10"/>
<label width="100%"
I18N="In the player configuration screen"
text="Press enter or double-click on a player to edit their settings"
text_align="center" />
<spacer width="5" height="20"/>
<box proportion="5" width="75%" align="center" layout="vertical-row" padding="8">
<list id="players" x="0" y="0" width="100%" height="100%"/>
</box>
<spacer width="20" height="25"/>
<button id="addplayer" x="20"
I18N="In the player configuration screen"
text="Add Player" align="center"/>
<spacer width="20" height="15"/>
</box>
</div>
</stkgui>

File diff suppressed because it is too large Load Diff

View File

@ -1986,7 +1986,8 @@ std::tuple<std::string, uint8_t, bool, bool> ServerLobby::handleVote()
auto track_vote = tracks.begin();
for (auto c_vote = tracks.begin(); c_vote != tracks.end(); c_vote++)
{
if (c_vote->second > vote)
if (c_vote->second > vote ||
(c_vote->second >= vote && rg.get(2) == 0))
{
vote = c_vote->second;
track_vote = c_vote;
@ -2002,7 +2003,8 @@ std::tuple<std::string, uint8_t, bool, bool> ServerLobby::handleVote()
auto lap_vote = laps.begin();
for (auto c_vote = laps.begin(); c_vote != laps.end(); c_vote++)
{
if (c_vote->second > vote)
if (c_vote->second > vote ||
(c_vote->second >= vote && rg.get(2) == 0))
{
vote = c_vote->second;
lap_vote = c_vote;
@ -2018,7 +2020,8 @@ std::tuple<std::string, uint8_t, bool, bool> ServerLobby::handleVote()
auto reverse_vote = reverses.begin();
for (auto c_vote = reverses.begin(); c_vote != reverses.end(); c_vote++)
{
if (c_vote->second > vote)
if (c_vote->second > vote ||
(c_vote->second >= vote && rg.get(2) == 0))
{
vote = c_vote->second;
reverse_vote = c_vote;

View File

@ -152,7 +152,6 @@ class TabbedUserScreen : public BaseUserScreen,
public GUIEngine::ScreenSingleton<TabbedUserScreen>
{
private:
//FIXME : options_players.stkgui exists but is unused
TabbedUserScreen() : BaseUserScreen("user_screen_tab.stkgui")
{}