Merge remote-tracking branch 'origin/master' into curved

This commit is contained in:
Benau 2018-07-06 23:49:04 +08:00
commit 8931d90813
67 changed files with 2171 additions and 1209 deletions

View File

@ -5,6 +5,9 @@
#
sudo: false
language: cpp
os:
- linux
- osx
compiler:
- gcc
- clang
@ -40,21 +43,17 @@ addons:
- zlib1g-dev
before_script:
# Unfortunately using all threads crashes g++: "g++: internal compiler error: Killed (program cc1plus)"
# Use half of the available threads, gcc is memory hungry
- 'if [ ${CC} = "gcc" ]; then
export THREADS=$((`nproc` / 2));
else
export THREADS=$((`nproc` + 1));
fi'
- echo "THREADS = $THREADS"
- free -mt
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew bundle; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo mkdir -p /usr/local/include/; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo ln -s /System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/ /usr/local/include/GL; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CMAKE_PREFIX_PATH=/usr/local/opt/freetype/:/usr/local/opt/curl/:/usr/local/opt/libogg/:/usr/local/opt/libogg/:/usr/local/opt/libvorbis/:/usr/local/opt/openssl\@1.1/:/usr/local/opt/glew/:/usr/local/opt/fribidi/; fi
script:
- mkdir "build"
- cd "build"
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off
- make VERBOSE=1 -j $THREADS
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then /usr/local/opt/cmake/bin/cmake .. -DFREETYPE_INCLUDE_DIRS=/usr/local/opt/freetype/include/freetype2/ -DUSE_SYSTEM_GLEW=1 -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include/ -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DFREETYPE_LIBRARY=/usr/local/opt/freetype/lib/libfreetype.dylib -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off; fi
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off; fi
- make VERBOSE=1 -j3
notifications:
irc:

8
Brewfile Normal file
View File

@ -0,0 +1,8 @@
brew "libogg"
brew "libvorbis"
brew "openal-soft"
brew "freetype"
brew "curl"
brew "openssl@1.1"
brew "fribidi"
brew "glew"

View File

@ -125,7 +125,7 @@ endif()
if(SERVER_ONLY)
add_definitions(-DSERVER_ONLY)
add_definitions(-DNO_IRR_COMPILE_WITH_X11_)
add_definitions(-DNO_IRR_COMPILE_WITH_X11_ -DNO_IRR_COMPILE_WITH_OPENGL_ -DNO_IRR_COMPILE_WITH_OSX_DEVICE_)
endif()
#if(DISABLE_VPX)
@ -405,16 +405,10 @@ if(APPLE)
add_executable(supertuxkart MACOSX_BUNDLE ${STK_SOURCES})
find_library(IOKIT_LIBRARY IOKit)
find_library(QUICKTIME_LIBRARY QuickTime)
find_library(CARBON_LIBRARY Carbon)
find_library(AUDIOUNIT_LIBRARY AudioUnit)
find_library(COCOA_LIBRARY Cocoa)
target_link_libraries(supertuxkart
${IOKIT_LIBRARY}
${QUICKTIME_LIBRARY}
${CARBON_LIBRARY}
${AUDIOUNIT_LIBRARY}
${COCOA_LIBRARY})
# configure CMake to use a custom Info.plist

View File

@ -195,20 +195,19 @@ Build STK
```bash
mkdir cmake_build
cd cmake_build
CMAKE_PREFIX_PATH=/usr/local/opt/freetype/:/usr/local/opt/curl/:/usr/local/opt/libogg/:/usr/local/opt/libogg/:/usr/local/opt/libvorbis/:/usr/local/opt/openssl\@1.1/:/usr/local/opt/glew/:/usr/local/opt/fribidi/ /usr/local/opt/cmake/bin/cmake .. -DFREETYPE_INCLUDE_DIRS=/usr/local/opt/freetype/include/freetype2/ -DUSE_SYSTEM_GLEW=1 -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include/ -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib
CMAKE_PREFIX_PATH=/usr/local/opt/freetype/:/usr/local/opt/curl/:/usr/local/opt/libogg/:/usr/local/opt/libogg/:/usr/local/opt/libvorbis/:/usr/local/opt/openssl\@1.1/:/usr/local/opt/glew/:/usr/local/opt/fribidi/ /usr/local/opt/cmake/bin/cmake .. -DFREETYPE_INCLUDE_DIRS=/usr/local/opt/freetype/include/freetype2/ -DUSE_SYSTEM_GLEW=1 -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include/ -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DFREETYPE_LIBRARY=/usr/local/opt/freetype/lib/libfreetype.dylib
make
```
#### (Optional) packaging for distribution
By default, the executable that is produced is not ready for distribution. Install https://github.com/auriamg/macdylibbundler
By default, the executable that is produced is not ready for distribution. Install https://github.com/auriamg/macdylibbundler and run:
```bash
dylibbundler -od -b -x ./bin/SuperTuxKart.app/Contents/MacOS/supertuxkart -d ./bin/SuperTuxKart.app/Contents/libs/ -p @executable_path/../libs/
```
then copy the datafiles into /SuperTuxKart.app/Contents/Resources/data
Afterwards, copy the contents of `stk-assets` into `/SuperTuxKart.app/Contents/Resources/data`.
### STK 0.9.3 or earlier

View File

@ -25,6 +25,7 @@
<card contains="Gallium" os="linux" version="<10.3" disable="DriverRecentEnough"/>
<card contains="Gallium" os="linux" version="<11.2" disable="GeometryShader"/>
<card contains="Gallium" os="linux" version="<11.2" disable="TextureCompressionS3TC"/>
<card vendor="nouveau" os="linux" version=">=17.2" disable="TextureBufferObject"/>
<!-- On osx radeon appears to have different version numbers, e.g.
1.32.20 -->
<card contains="Radeon" os="linux" version="<14.300" disable="DriverRecentEnough"/>

View File

@ -40,6 +40,8 @@ crown.png by glitch, from https://openclipart.org/detail/210257/misc-game-crown,
ghost_plus.png by Alayan, based on https://openclipart.org/detail/17847/cartoon-ghost by lemmling, released under CC-O
options_language.png by Alayan, based on http://www.languageicon.org/, released under CC-BY-SA 3+
====
Glass Skin by Auria, under CC-BY-SA 3+

BIN
data/gui/bomb_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -1,69 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header align="center" width="80%" text="SuperTuxKart Help" text_align="center"/>
<spacer height="15" width="10"/>
<header width="80%" height="7%" align="center" text="SuperTuxKart Help" text_align="center"/>
<spacer height="1%" width="100%"/>
<tabs id="category" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="page1" width="128" height="128" icon="gui/track_random.png"
I18N="Tab in help menu" text="General"/>
<icon-button id="page2" width="128" height="128" icon="gui/weapons.png"
I18N="Tab in help menu" text="Weapons"/>
<icon-button id="page3" width="128" height="128" icon="gui/mode_ftl.png"
I18N="Tab in help menu" text="Game Modes"/>
<icon-button id="page4" width="128" height="128" icon="gui/options_input.png"
I18N="Tab in help menu" text="Multi-player"/>
<icon-button id="page5" width="128" height="128" icon="gui/banana.png"
I18N="Tab in help menu" text="Bananas"/>
</tabs>
<div width="100%" height="92%" layout="horizontal-row" >
<box proportion="1" width="100%" layout="vertical-row">
<vertical-tabs id="category" height="100%" width="18%">
<icon-button id="page1" width="128" height="128" icon="gui/track_random.png"
I18N="Tab in help menu" text="General"/>
<icon-button id="page2" width="128" height="128" icon="gui/mode_ftl.png"
I18N="Tab in help menu" text="Game Modes"/>
<icon-button id="page3" width="128" height="128" icon="gui/weapons.png"
I18N="Tab in help menu" text="Powerups"/>
<icon-button id="page4" width="128" height="128" icon="gui/banana.png"
I18N="Tab in help menu" text="Bananas"/>
<icon-button id="page5" width="128" height="128" icon="gui/story_mode_book.png"
I18N="Tab in help menu" text="Story Mode"/>
<icon-button id="page6" width="128" height="128" icon="gui/mass.png"
I18N="Tab in help menu" text="Kart classes"/>
<icon-button id="page7" width="128" height="128" icon="gui/options_input.png"
I18N="Tab in help menu" text="Multi-player"/>
</vertical-tabs>
<spacer width="5" height="15"/>
<button id="startTutorial" text="Start the tutorial" align="center"/>
<spacer width="5" height="15"/>
<spacer width="2%" height="100%"/>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/gift.png"/>
<spacer width="25" height="25"/>
<bubble proportion="6" height="100%" word_wrap="true"
I18N="In the help menu"
text="Collect blue boxes. They will give you weapons or other powerups."/>
<spacer width="25" height="25"/>
<icon align="center" width="64" height="64" icon="gui/banana.png"/>
<spacer width="25" height="25"/>
<bubble proportion="4" height="100%" word_wrap="true"
I18N="In the help menu"
text="Avoid bananas!"/>
</div>
<box width="80%" height="100%" layout="vertical-row">
<div width="100%" proportion="3" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/nitro.png"/>
<spacer width="25" height="25"/>
<bubble proportion="3" height="100%" word_wrap="true"
I18N="In the help menu"
text="Collecting nitro allows you to get speed boosts whenever you wish by pressing the appropriate key. You can see your current level of nitro in the bar at the right of the game screen."/>
<spacer width="5" height="1%"/>
<div width="50%" proportion="2" align="center" layout="horizontal-row">
<icon id="tutorialIcon" width="64" height="64" align="center" icon="gui/tutorial.png"/>
<button id="startTutorial" align="center" text="Start the tutorial"/>
</div>
<spacer width="5" height="1%"/>
<div width="100%" proportion="5" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/gift.png"/>
<spacer width="25" height="25"/>
<bubble proportion="7" height="100%" word_wrap="true"
I18N="In the help menu"
text="Collect blue gift boxes, they will give you powerups."/>
<spacer width="25" height="25"/>
<icon align="center" width="64" height="64" icon="gui/banana.png"/>
<spacer width="25" height="25"/>
<bubble proportion="3" height="100%" word_wrap="true"
I18N="In the help menu"
text="Avoid bananas!"/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/gui_lock.png"/>
<spacer width="25" height="25"/>
<bubble proportion="2" height="100%" word_wrap="true"
I18N="In the help menu"
text="If you see a button with a lock like this one, you need to complete a challenge to unlock it."/>
</div>
<div width="100%" proportion="6" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/nitro.png"/>
<spacer width="25" height="25"/>
<bubble proportion="3" height="100%" word_wrap="true"
I18N="In the help menu"
text="Collecting nitro allows you to get speed boosts whenever you wish by pressing the appropriate key. You can see your current level of nitro in the gauge at the bottom-right of the race screen."/>
</div>
<bubble align="left" word_wrap="true" width="100%" proportion="1"
I18N="in the help menu"
text="The 'skidding' key allows you to skid in sharp turns and get a boost."/>
<div width="100%" proportion="4" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/gui_lock.png"/>
<spacer width="25" height="25"/>
<bubble proportion="2" height="100%" word_wrap="true"
I18N="In the help menu"
text="If you see a button with a lock like this one, you need to complete a challenge to unlock it."/>
</div>
<spacer height="10" width="10"/>
<div width="100%" proportion="6" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/android/drift.png"/>
<spacer width="25" height="25"/>
<bubble proportion="2" height="100%" word_wrap="true"
I18N="In the help menu"
text="The 'skidding' key allows you to skid. Short skids help to take sharp turns. If you skid long enough, you will get a boost. You can't stop turning while skidding, so orient your kart carefully before !"/>
</div>
<label align="center" I18N="in the help screen" text="* Current key bindings can be seen/changed in menu Options"/>
<spacer height="10" width="10"/>
<spacer height="3%" width="10"/>
</box>
<label align="center" word_wrap="true" I18N="in the help screen" text="* Current key bindings can be seen/changed in menu Options"/>
<spacer height="1%" width="10"/>
</box>
</div>
</div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui>

View File

@ -1,77 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header align="center" width="80%" text="SuperTuxKart Help" text_align="center"/>
<spacer height="15" width="10"/>
<tabs id="category" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="page1" width="128" height="128" icon="gui/track_random.png"
I18N="Tab in help menu" text="General"/>
<icon-button id="page2" width="128" height="128" icon="gui/weapons.png"
I18N="Tab in help menu" text="Weapons"/>
<icon-button id="page3" width="128" height="128" icon="gui/mode_ftl.png"
I18N="Tab in help menu" text="Game Modes"/>
<icon-button id="page4" width="128" height="128" icon="gui/options_input.png"
I18N="Tab in help menu" text="Multi-player"/>
<icon-button id="page5" width="128" height="128" icon="gui/banana.png"
I18N="Tab in help menu" text="Bananas"/>
</tabs>
<box proportion="1" width="100%" layout="vertical-row">
<label align="center" I18N="In the help menu" text="To help you win, there are some powerups you can collect:"/>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/bubblegum-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="BubbleGum - protect yourself with a shield, or use while looking back to leave a sticky pink puddle behind you."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/cake-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
text="Cake - thrown at the closest rival, best on short ranges and long straights."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/plunger-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="Plunger - throw straight to pull an opponent back, or throw while looking back to make one lose sight."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/bowling-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
text="Bowling Ball - bounces off walls. If you are looking back, it will be thrown backwards."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/parachute-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="Parachute - slows down all karts in a better position."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/swap-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="Swapper - gift boxes are transformed into bananas and vice versa for a short time."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/rubber_ball-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="Basket Ball - bounces after the leader, and might squash and slow down karts down on the way."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/swatter-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="Swatter - will squash karts close by, slowing them down."/>
</div>
</box>
</div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header width="80%" height="7%" align="center" text="SuperTuxKart Help" text_align="center"/>
<spacer height="1%" width="100%"/>
<div width="100%" height="92%" layout="horizontal-row" >
<vertical-tabs id="category" height="100%" width="18%">
<icon-button id="page1" width="128" height="128" icon="gui/track_random.png"
I18N="Tab in help menu" text="General"/>
<icon-button id="page2" width="128" height="128" icon="gui/mode_ftl.png"
I18N="Tab in help menu" text="Game Modes"/>
<icon-button id="page3" width="128" height="128" icon="gui/weapons.png"
I18N="Tab in help menu" text="Powerups"/>
<icon-button id="page4" width="128" height="128" icon="gui/banana.png"
I18N="Tab in help menu" text="Bananas"/>
<icon-button id="page5" width="128" height="128" icon="gui/story_mode_book.png"
I18N="Tab in help menu" text="Story Mode"/>
<icon-button id="page6" width="128" height="128" icon="gui/mass.png"
I18N="Tab in help menu" text="Kart classes"/>
<icon-button id="page7" width="128" height="128" icon="gui/options_input.png"
I18N="Tab in help menu" text="Multi-player"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<spacer height="1%" width="10"/>
<label align="center" word_wrap="true" text="SuperTuxKart features several game modes:"/>
<spacer height="2%" width="10"/>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_normal.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Regular Race: All blows allowed, so collect powerups and use them smartly!"/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_tt.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Time Trial: Contains no powerups, so only your driving skills matter!"/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_ftl.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Follow the leader: Run for second place, as the last kart will be disqualified every time the counter hits zero. Beware: going in front of the leader will get you eliminated too!"/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_3strikes.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="3 Strikes Battle: Hit others with weapons until they lose all their lives."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_soccer.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Soccer: Use your kart to push the ball into the goal."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_easter.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Egg hunt: Explore tracks to find all hidden eggs."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_ghost.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Ghost replay: Race against ghost replays in time-trial or egg hunt mode, and record your own!"/>
</div>
<bubble proportion="4" width="100%" I18N="In the help menu"
text="* Most of these game modes can also be played in a Grand Prix fashion: instead of playing a single race, you play many in a row. The better you rank, the more points you get. In the end, the player with the most points wins the cup."/>
</box>
</div>
</div>
</stkgui>

View File

@ -1,78 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header align="center" width="80%" text="SuperTuxKart Help" text_align="center"/>
<spacer height="15" width="10"/>
<tabs id="category" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="page1" width="128" height="128" icon="gui/track_random.png"
I18N="Tab in help menu" text="General"/>
<icon-button id="page2" width="128" height="128" icon="gui/weapons.png"
I18N="Tab in help menu" text="Weapons"/>
<icon-button id="page3" width="128" height="128" icon="gui/mode_ftl.png"
I18N="Tab in help menu" text="Game Modes"/>
<icon-button id="page4" width="128" height="128" icon="gui/options_input.png"
I18N="Tab in help menu" text="Multi-player"/>
<icon-button id="page5" width="128" height="128" icon="gui/banana.png"
I18N="Tab in help menu" text="Bananas"/>
</tabs>
<box proportion="1" width="100%" layout="vertical-row">
<label align="center" text="SuperTuxKart features several game modes"/>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_normal.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Regular Race: All blows allowed, so catch weapons and make clever use of them!"/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_tt.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Time Trial: Contains no powerups, so only your driving skills matter! This mode allows you to record the race for replaying."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_ftl.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Follow the leader: Run for second place, as the last kart will be disqualified every time the counter hits zero. Beware: going in front of the leader will get you eliminated too!"/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_3strikes.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="3 Strikes Battle: Hit others with weapons until they lose all their lives."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_soccer.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Soccer: Use your kart to push the ball into the goal."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mode_easter.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Egg hunt: Explore tracks to find all hidden eggs."/>
</div>
<bubble proportion="3" width="100%" I18N="In the help menu"
text="* Most of these game modes can also be played in a Grand Prix fashion: instead of playing a single race, you play many in a row. The better you rank, the more points you get. In the end, the player with the most points wins the cup."/>
</box>
</div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header width="80%" height="7%" align="center" text="SuperTuxKart Help" text_align="center"/>
<spacer height="1%" width="100%"/>
<div width="100%" height="92%" layout="horizontal-row" >
<vertical-tabs id="category" height="100%" width="18%">
<icon-button id="page1" width="128" height="128" icon="gui/track_random.png"
I18N="Tab in help menu" text="General"/>
<icon-button id="page2" width="128" height="128" icon="gui/mode_ftl.png"
I18N="Tab in help menu" text="Game Modes"/>
<icon-button id="page3" width="128" height="128" icon="gui/weapons.png"
I18N="Tab in help menu" text="Powerups"/>
<icon-button id="page4" width="128" height="128" icon="gui/banana.png"
I18N="Tab in help menu" text="Bananas"/>
<icon-button id="page5" width="128" height="128" icon="gui/story_mode_book.png"
I18N="Tab in help menu" text="Story Mode"/>
<icon-button id="page6" width="128" height="128" icon="gui/mass.png"
I18N="Tab in help menu" text="Kart classes"/>
<icon-button id="page7" width="128" height="128" icon="gui/options_input.png"
I18N="Tab in help menu" text="Multi-player"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<spacer height="1%" width="10"/>
<label align="center" word_wrap="true" I18N="In the help menu" text="To help you win, there are some powerups you can collect:"/>
<spacer height="2%" width="10"/>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/bubblegum-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="BubbleGum - protect yourself with a shield, or use while looking back to leave a sticky pink puddle behind you."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/zipper_collect.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="Zipper - will give you a strong speed boost. But beware of not losing control of your kart !"/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/cake-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
text="Cake - thrown at the closest rival, best on short ranges and long straights. It also affects other karts close to the explosion."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/plunger-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="Plunger - throw straight to pull an opponent back, or throw while looking back to make one lose sight."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/bowling-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
text="Bowling Ball - goes straight until it strikes, it can bounce off walls. If you are looking back, it will be thrown backwards."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/parachute-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="Parachute - slows down all karts in a better position."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/swap-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="Swapper - gift boxes are transformed into bananas, nitro cans into bubblegums, and vice versa for a short time."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/rubber_ball-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="Basket Ball - bounces after the leader, and might squash and slow down karts down on the way."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/swatter-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" text="Swatter - will squash karts close by, slowing them down. Can also be used to remove parachutes and bombs."/>
</div>
</box>
</div>
</div>
</stkgui>

View File

@ -1,44 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header align="center" width="80%" text="SuperTuxKart Help" text_align="center"/>
<spacer height="15" width="10"/>
<tabs id="category" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="page1" width="128" height="128" icon="gui/track_random.png"
I18N="Tab in help menu" text="General"/>
<icon-button id="page2" width="128" height="128" icon="gui/weapons.png"
I18N="Tab in help menu" text="Weapons"/>
<icon-button id="page3" width="128" height="128" icon="gui/mode_ftl.png"
I18N="Tab in help menu" text="Game Modes"/>
<icon-button id="page4" width="128" height="128" icon="gui/options_input.png"
I18N="Tab in help menu" text="Multi-player"/>
<icon-button id="page5" width="128" height="128" icon="gui/banana.png"
I18N="Tab in help menu" text="Bananas"/>
</tabs>
<box proportion="1" width="100%" layout="vertical-row">
<label align="center" text="SuperTuxKart can be played in multiplayer mode on the same computer"/>
<label align="center" text="(network play is not yet available)"/>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/options_input.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="First, you will need several input devices (having multiple gamepads or joysticks is the best way to play with several people). Go in the input configuration screen and setup the gamepads. It is also possible to play on keyboard(s), however each player will need a different set of keys, and keep in mind that most keyboards are not appropriate for multiplayer gameplay because they do not support large number of keypresses."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/random_kart.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="When input devices are configured, you are ready to play. Select the 'multiplayer race' icon in the main menu. When it is time to choose a kart, each player can press on the 'fire' key of their gamepad or keyboard to join the game. Each player can use their input device to select their kart. The game continues when everyone selected their kart. Note that the mouse may not be used for this operation."/>
</div>
<spacer width="50" height="25" />
</box>
</div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header width="80%" height="7%" align="center" text="SuperTuxKart Help" text_align="center"/>
<spacer height="1%" width="100%"/>
<div width="100%" height="92%" layout="horizontal-row" >
<vertical-tabs id="category" height="100%" width="18%">
<icon-button id="page1" width="128" height="128" icon="gui/track_random.png"
I18N="Tab in help menu" text="General"/>
<icon-button id="page2" width="128" height="128" icon="gui/mode_ftl.png"
I18N="Tab in help menu" text="Game Modes"/>
<icon-button id="page3" width="128" height="128" icon="gui/weapons.png"
I18N="Tab in help menu" text="Powerups"/>
<icon-button id="page4" width="128" height="128" icon="gui/banana.png"
I18N="Tab in help menu" text="Bananas"/>
<icon-button id="page5" width="128" height="128" icon="gui/story_mode_book.png"
I18N="Tab in help menu" text="Story Mode"/>
<icon-button id="page6" width="128" height="128" icon="gui/mass.png"
I18N="Tab in help menu" text="Kart classes"/>
<icon-button id="page7" width="128" height="128" icon="gui/options_input.png"
I18N="Tab in help menu" text="Multi-player"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<spacer height="1%" width="10"/>
<label align="center" word_wrap="true" text="Hitting a banana can result in one of the following being attached to the kart:"/>
<spacer height="2%" width="10"/>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/anchor-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Anchor - slows down the kart suddenly."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/parachute-icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Parachute - slows down the kart, more progressively than the anchor. The faster you go, the stronger it slows you down."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/bomb_icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Bomb - detonates after some amount of time, throwing the kart up in the air. Bump into another kart to transfer the bomb to it."/>
</div>
</box>
</div>
</div>
</stkgui>

View File

@ -1,49 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header align="center" width="80%" text="SuperTuxKart Help" text_align="center"/>
<spacer height="15" width="10"/>
<tabs id="category" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="page1" width="100" height="128" icon="gui/track_random.png"
I18N="Tab in help menu" text="General"/>
<icon-button id="page2" width="100" height="128" icon="gui/weapons.png"
I18N="Tab in help menu" text="Weapons"/>
<icon-button id="page3" width="100" height="128" icon="gui/mode_ftl.png"
I18N="Tab in help menu" text="Game Modes"/>
<icon-button id="page4" width="100" height="128" icon="gui/options_input.png"
I18N="Tab in help menu" text="Multi-player"/>
<icon-button id="page5" width="100" height="128" icon="gui/banana.png"
I18N="Tab in help menu" text="Bananas"/>
</tabs>
<box proportion="1" width="100%" layout="vertical-row">
<label align="center" text="Hitting a banana can result in one of the following being attached to the kart:"/>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/anchor-icon.png"/>
<spacer width="64" height="64"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Anchor - slows down the kart."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="models/parachute-icon.png"/>
<spacer width="64" height="64"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Parachute - slows down the kart less than the anchor."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="128" height="128" icon="models/bomb-attach-icon.png"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Bomb - detonates after a short amount of time to throw the kart up in the air. Bump into another kart to transfer the bomb to another player."/>
</div>
</box>
</div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header width="80%" height="7%" align="center" text="SuperTuxKart Help" text_align="center"/>
<spacer height="1%" width="100%"/>
<div width="100%" height="92%" layout="horizontal-row" >
<vertical-tabs id="category" height="100%" width="18%">
<icon-button id="page1" width="128" height="128" icon="gui/track_random.png"
I18N="Tab in help menu" text="General"/>
<icon-button id="page2" width="128" height="128" icon="gui/mode_ftl.png"
I18N="Tab in help menu" text="Game Modes"/>
<icon-button id="page3" width="128" height="128" icon="gui/weapons.png"
I18N="Tab in help menu" text="Powerups"/>
<icon-button id="page4" width="128" height="128" icon="gui/banana.png"
I18N="Tab in help menu" text="Bananas"/>
<icon-button id="page5" width="128" height="128" icon="gui/story_mode_book.png"
I18N="Tab in help menu" text="Story Mode"/>
<icon-button id="page6" width="128" height="128" icon="gui/mass.png"
I18N="Tab in help menu" text="Kart classes"/>
<icon-button id="page7" width="128" height="128" icon="gui/options_input.png"
I18N="Tab in help menu" text="Multi-player"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<spacer height="1%" width="10"/>
<label align="center" word_wrap="true" text="The evil Nolok has captured Gnu! Here are a few tips to help you:"/>
<spacer height="2%" width="10"/>
<div width="100%" proportion="5" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/challenge.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="This icon on the minimap shows the available challenges you've not completed. In the top-right of the screen, it also tells you how many points you currently have. Complete as many challenges as possible, and Nolok will accept to race against you. Win to liberate Gnu!"/>
</div>
<div width="100%" proportion="4" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/cup_gold.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="When you complete a challenge, you get a cup. Each cup is worth several points. The higher the difficulty you completed the challenge in, the better the cup and the more points it is worth."/>
</div>
<div width="100%" proportion="3" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mystery_unlock.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="When you get the number of points indicated below this icon, you'll be gifted a surprise. There are several to collect."/>
</div>
</box>
</div>
</div>
</stkgui>

77
data/gui/help6.stkgui Normal file
View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header width="80%" height="7%" align="center" text="SuperTuxKart Help" text_align="center"/>
<spacer height="1%" width="100%"/>
<div width="100%" height="92%" layout="horizontal-row" >
<vertical-tabs id="category" height="100%" width="18%">
<icon-button id="page1" width="128" height="128" icon="gui/track_random.png"
I18N="Tab in help menu" text="General"/>
<icon-button id="page2" width="128" height="128" icon="gui/mode_ftl.png"
I18N="Tab in help menu" text="Game Modes"/>
<icon-button id="page3" width="128" height="128" icon="gui/weapons.png"
I18N="Tab in help menu" text="Powerups"/>
<icon-button id="page4" width="128" height="128" icon="gui/banana.png"
I18N="Tab in help menu" text="Bananas"/>
<icon-button id="page5" width="128" height="128" icon="gui/story_mode_book.png"
I18N="Tab in help menu" text="Story Mode"/>
<icon-button id="page6" width="128" height="128" icon="gui/mass.png"
I18N="Tab in help menu" text="Kart classes"/>
<icon-button id="page7" width="128" height="128" icon="gui/options_input.png"
I18N="Tab in help menu" text="Multi-player"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<spacer height="1%" width="10"/>
<label align="center" word_wrap="true" text="Not all karts drive the same! They belong to classes with several differences:"/>
<spacer height="2%" width="10"/>
<div width="100%" proportion="4" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/mass.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Mass - there are three classes of karts, depending of their mass: light, medium and heavy. Heavier karts are less affected by parachutes and are more resistant to explosions."/>
</div>
<div width="100%" proportion="4" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/power.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Acceleration - especially useful at start, after an accident, or in tracks with a lot of sharp curves. The lighter the kart, the faster it accelerates, especially at low speeds."/>
</div>
<div width="100%" proportion="4" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/speed.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Max speed - the higher it is, the faster the kart can go. Especially useful in tracks with straight lines and gentle curves. Heavier karts have a higher top speed."/>
</div>
<div width="100%" proportion="3" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/nitro.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Nitro consumption - the lower it is, the more speed you can get from a can of nitro. The lighter the kart, the lower its nitro consumption."/>
</div>
<div width="100%" proportion="4" layout="horizontal-row">
<icon align="center" width="128" height="128" icon="gui/slipstream_icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%" word_wrap="true"
I18N="In the help menu"
text="If you follow closely another kart for a few seconds, you'll get a slipstream speed bonus when you overtake it. The lighter your kart, the easier it is."/>
</div>
</box>
</div>
</div>
</stkgui>

69
data/gui/help7.stkgui Normal file
View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header width="80%" height="7%" align="center" text="SuperTuxKart Help" text_align="center"/>
<spacer height="1%" width="100%"/>
<div width="100%" height="92%" layout="horizontal-row" >
<vertical-tabs id="category" height="100%" width="18%">
<icon-button id="page1" width="128" height="128" icon="gui/track_random.png"
I18N="Tab in help menu" text="General"/>
<icon-button id="page2" width="128" height="128" icon="gui/mode_ftl.png"
I18N="Tab in help menu" text="Game Modes"/>
<icon-button id="page3" width="128" height="128" icon="gui/weapons.png"
I18N="Tab in help menu" text="Powerups"/>
<icon-button id="page4" width="128" height="128" icon="gui/banana.png"
I18N="Tab in help menu" text="Bananas"/>
<icon-button id="page5" width="128" height="128" icon="gui/story_mode_book.png"
I18N="Tab in help menu" text="Story Mode"/>
<icon-button id="page6" width="128" height="128" icon="gui/mass.png"
I18N="Tab in help menu" text="Kart classes"/>
<icon-button id="page7" width="128" height="128" icon="gui/options_input.png"
I18N="Tab in help menu" text="Multi-player"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<label align="center" text="SuperTuxKart can be played in multiplayer mode online...:"/>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/networking_icon.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="First, select the 'online' icon in the main menu. Choose either local networking, or global networking (requires internet to be enabled in the options). Then, you can either create your own server with custom options, or search among a list of existing servers to join. Some of them are official servers with ranked races."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/crown.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="Once in a server, a race will begin once its owner (symbolized with the crown) decide so. Official servers auto-start races when there is enough players. Then, you can choose your kart and vote for the next track to race on. An addon kart or track is allowed only if all players connected to the server have it."/>
</div>
<label align="center" text="... or on the same computer:"/>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/options_input.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="First, you will need several input devices. Use the input configuration screen to set them up. Multiple gamepads or joysticks are ideal: on keyboard(s), each player will need a different set of keys, and most keyboards are not appropriate for multiplayer because they don't support multiple simultaneous keypresses."/>
</div>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="gui/random_kart.png"/>
<spacer width="25" height="25"/>
<bubble proportion="1" height="100%"
I18N="In the help menu"
text="When input devices are configured, select the 'multiplayer race' icon in the main menu. Each player can press the 'fire' key of their gamepad or keyboard to join the game, and use their input device to select their kart. The game continues when everyone selected their kart. Note that the mouse may not be used for this operation."/>
</div>
<spacer width="50" height="25" />
</box>
</div>
</div>
</stkgui>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -1,67 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row">
<header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/>
<spacer height="15" width="10"/>
<tabs id="options_choice" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="tab_video" width="128" height="128" icon="gui/options_video.png"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"
I18N="Section in the settings menu" text="Audio"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"/>
</tabs>
<box proportion="1" width="100%" layout="vertical-row">
<spacer height="5" width="10"/>
<!-- ******** Music ******** -->
<label width="100%" I18N="In the audio options screen" text="Music"/>
<div width="75%" height="fit" layout="horizontal-row" >
<label proportion="1" height="100%" text_align="right" I18N="In the audio options screen" text="Enabled"/>
<div proportion="1" height="fit" layout="horizontal-row" >
<spacer width="40" height="100%" />
<!-- FIXME: don't hardcode height -->
<checkbox id="music_enabled"/>
</div>
</div>
<div width="75%" height="fit" layout="horizontal-row" >
<label proportion="1" height="100%" text_align="right" I18N="In the audio options screen" text="Volume"/>
<div proportion="1" height="fit" layout="horizontal-row" >
<spacer width="40" height="100%" />
<gauge id="music_volume" proportion="1" min_value="1" max_value="10"/>
</div>
</div>
<spacer height="15" width="10"/>
<!-- ******** SFX ******** -->
<label width="100%" I18N="In the audio options screen" text="Sound Effects"/>
<div width="75%" height="fit" layout="horizontal-row" >
<label proportion="1" height="100%" text_align="right" I18N="In the audio options screen" text="Enabled"/>
<div proportion="1" height="fit" layout="horizontal-row" >
<spacer width="40" height="100%" />
<!-- FIXME: don't hardcode height -->
<checkbox id="sfx_enabled"/>
</div>
</div>
<div width="75%" height="fit" layout="horizontal-row" >
<label proportion="1" height="100%" text_align="right" I18N="In the audio options screen" text="Volume"/>
<div proportion="1" height="fit" layout="horizontal-row" >
<spacer width="40" height="100%" />
<gauge id="sfx_volume" proportion="1" min_value="1" max_value="10"/>
</div>
</div>
<spacer height="20" width="10"/>
</box>
</div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/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_video" width="128" height="128" icon="gui/options_video.png"
I18N="Section in the settings menu" text="Graphics"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"
I18N="Section in the settings menu" text="Audio"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"
I18N="Section in the settings menu" text="User Interface"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"
I18N="Section in the settings menu" text="Players"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"
I18N="Section in the settings menu" text="Controls"/>
<icon-button id="tab_language" width="128" height="128" icon="gui/options_language.png"
I18N="Section in the settings menu" text="Language"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<spacer width="5" height="1%"/>
<!-- ******** Music ******** -->
<label width="100%" I18N="In the audio options screen" text="Music"/>
<div width="75%" height="fit" layout="horizontal-row" >
<label proportion="1" height="100%" text_align="right" I18N="In the audio options screen" text="Enabled"/>
<div proportion="1" height="fit" layout="horizontal-row" >
<spacer width="40" height="100%" />
<!-- FIXME: don't hardcode height -->
<checkbox id="music_enabled"/>
</div>
</div>
<div width="75%" height="fit" layout="horizontal-row" >
<label proportion="1" height="100%" text_align="right" I18N="In the audio options screen" text="Volume"/>
<div proportion="1" height="fit" layout="horizontal-row" >
<spacer width="40" height="100%" />
<gauge id="music_volume" proportion="1" min_value="1" max_value="10"/>
</div>
</div>
<spacer width="5" height="1%"/>
<!-- ******** SFX ******** -->
<label width="100%" I18N="In the audio options screen" text="Sound Effects"/>
<div width="75%" height="fit" layout="horizontal-row" >
<label proportion="1" height="100%" text_align="right" I18N="In the audio options screen" text="Enabled"/>
<div proportion="1" height="fit" layout="horizontal-row" >
<spacer width="40" height="100%" />
<!-- FIXME: don't hardcode height -->
<checkbox id="sfx_enabled"/>
</div>
</div>
<div width="75%" height="fit" layout="horizontal-row" >
<label proportion="1" height="100%" text_align="right" I18N="In the audio options screen" text="Volume"/>
<div proportion="1" height="fit" layout="horizontal-row" >
<spacer width="40" height="100%" />
<gauge id="sfx_volume" proportion="1" min_value="1" max_value="10"/>
</div>
</div>
<spacer width="5" height="2%"/>
</box>
</div>
</div>
</stkgui>

View File

@ -1,49 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/>
<spacer height="15" width="10"/>
<tabs id="options_choice" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="tab_video" width="128" height="128" icon="gui/options_video.png"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"
I18N="Section in the settings menu" text="Controls"/>
</tabs>
<box proportion="1" width="100%" layout="vertical-row">
<!-- Configuration name -->
<spacer height="6" width="10"/>
<label id="title" width="100%" text_align="center" />
<spacer height="16" width="10"/>
<!-- List of key bindings -->
<box proportion="8" width="75%" align="center" layout="vertical-row" padding="8">
<list id="actions" x="0" y="0" width="100%" height="100%"/>
</box>
<!-- Bottom buttons -->
<spacer width="50" height="20" />
<div proportion="2" width="100%" layout="horizontal-row">
<spacer width="7" height="5"/>
<div height="100%" width="fit" layout="vertical-row">
<button id="delete"
I18N="In the input configuration screen" text="Delete Configuration"/>
<spacer width="50" height="10" />
<button id="back_to_device_list" I18N="In the input configuration screen" text="Back to device list"/>
<spacer width="50" height="10" />
</div>
<spacer width="20" height="10" />
<label id="conflict" proportion="1" text="" word_wrap="true" align="center"/>
</div>
</box>
</div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/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_video" width="128" height="128" icon="gui/options_video.png"
I18N="Section in the settings menu" text="Graphics"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"
I18N="Section in the settings menu" text="Audio"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"
I18N="Section in the settings menu" text="User Interface"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"
I18N="Section in the settings menu" text="Players"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"
I18N="Section in the settings menu" text="Controls"/>
<icon-button id="tab_language" width="128" height="128" icon="gui/options_language.png"
I18N="Section in the settings menu" text="Language"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<!-- Configuration name -->
<spacer height="6" width="10"/>
<label id="title" width="100%" text_align="center" />
<spacer height="16" width="10"/>
<!-- List of key bindings -->
<box proportion="8" width="75%" align="center" layout="vertical-row" padding="8">
<list id="actions" x="0" y="0" width="100%" height="100%"/>
</box>
<!-- Bottom buttons -->
<spacer width="50" height="20" />
<div proportion="2" width="100%" layout="horizontal-row">
<spacer width="7" height="5"/>
<div height="100%" width="fit" layout="vertical-row">
<button id="delete"
I18N="In the input configuration screen" text="Delete Configuration"/>
<spacer width="50" height="10" />
<button id="back_to_device_list" I18N="In the input configuration screen" text="Back to device list"/>
<spacer width="50" height="10" />
</div>
<spacer width="20" height="10" />
<label id="conflict" proportion="1" text="" word_wrap="true" align="center"/>
</div>
</box>
</div>
</div>
</stkgui>

View File

@ -1,39 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/>
<spacer height="15" width="10"/>
<tabs id="options_choice" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="tab_video" width="128" height="128" icon="gui/options_video.png"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"
I18N="Section in the settings menu" text="Controls"/>
</tabs>
<box proportion="1" width="100%" layout="vertical-row">
<label width="100%"
I18N="In the input configuration screen"
text="Press enter or double-click on a device to configure it"
text_align="center" />
<spacer width="5" height="20"/>
<box proportion="5" width="75%" align="center" layout="vertical-row" padding="8">
<list id="devices" x="0" y="0" width="100%" height="100%"/>
</box>
<spacer width="50" height="25" />
<button id="add_device" I18N="In the input configuration screen" text="Add a device" align="center"/>
<label I18N="In the input configuration screen" text="* Which config to use will be inferred from which 'Select' key is pressed to join the game."
proportion="2" word_wrap="true"/>
</box>
</div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/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_video" width="128" height="128" icon="gui/options_video.png"
I18N="Section in the settings menu" text="Graphics"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"
I18N="Section in the settings menu" text="Audio"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"
I18N="Section in the settings menu" text="User Interface"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"
I18N="Section in the settings menu" text="Players"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"
I18N="Section in the settings menu" text="Controls"/>
<icon-button id="tab_language" width="128" height="128" icon="gui/options_language.png"
I18N="Section in the settings menu" text="Language"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<label width="100%"
I18N="In the input configuration screen"
text="Press enter or double-click on a device to configure it"
text_align="center" />
<spacer width="5" height="20"/>
<box proportion="5" width="75%" align="center" layout="vertical-row" padding="8">
<list id="devices" x="0" y="0" width="100%" height="100%"/>
</box>
<spacer width="50" height="25" />
<button id="add_device" I18N="In the input configuration screen" text="Add a device" align="center"/>
<label I18N="In the input configuration screen" text="* Which config to use will be inferred from which 'Select' key is pressed to join the game."
proportion="2" word_wrap="true"/>
</box>
</div>
</div>
</stkgui>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/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_video" width="128" height="128" icon="gui/options_video.png"
I18N="Section in the settings menu" text="Graphics"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"
I18N="Section in the settings menu" text="Audio"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"
I18N="Section in the settings menu" text="User Interface"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"
I18N="Section in the settings menu" text="Players"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"
I18N="Section in the settings menu" text="Controls"/>
<icon-button id="tab_language" width="128" height="128" icon="gui/options_language.png"
I18N="Section in the settings menu" text="Language"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<spacer width="5" height="3%"/>
<!-- ************ LANGUAGE CHOICE ************ -->
<box proportion="1" width="75%" align="center" layout="vertical-row" padding="8">
<list id="language" x="0" y="0" width="100%" height="100%"/>
</box>
<spacer width="5" height="3%"/>
</box>
</div>
</div>
</stkgui>

View File

@ -1,107 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/>
<spacer height="15" width="10"/>
<tabs id="options_choice" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="tab_video" width="128" height="128" icon="gui/options_video.png"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"
I18N="Section in the settings menu" text="User Interface"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"/>
</tabs>
<box proportion="1" width="100%" layout="vertical-row">
<spacer height="5" width="10" />
<!-- ************ SKIN CHOICE ************ -->
<div layout="horizontal-row" width="100%" height="fit">
<label I18N="In the ui settings" text="Skin" align="center"/>
<spacer width="20" height="20"/>
<spinner id="skinchoice" width="30%"/>
</div>
<spacer width="20" height="18" />
<div layout="horizontal-row" width="100%" height="fit">
<div proportion="1" height="fit" layout="horizontal-row">
<checkbox id="showfps"/>
<spacer width="20" height="100%" />
<label height="100%" I18N="In the ui settings" text="Display FPS"/>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="show-login"/>
<spacer width="20" height="100%" />
<label height="100%" I18N="In the ui settings" text="Always show login screen"/>
</div>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" width="100%" height="fit">
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="enable-hw-report"/>
<spacer width="20" height="100%" />
<label height="100%" id="label-hw-report" I18N="In the ui settings"
text="Send anonymous HW statistics"/>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="perPlayerDifficulty"/>
<spacer width="20" height="100%" />
<label height="100%" I18N="In the ui settings" text="Enable per-player handicaps"/>
</div>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" width="100%" height="fit">
<div proportion="1" height="fit" layout="horizontal-row" >
<checkbox id="enable-internet"/>
<spacer width="20" height="100%" />
<label height="100%" I18N="In the ui settings" text="Connect to the Internet"/>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="split_screen_horizontally"/>
<spacer width="20" height="100%" />
<label height="100%" I18N="In the ui settings" text="Multiplayer splits screen horizontally"/>
</div>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" width="100%" height="fit">
<div proportion="1" height="fit" layout="horizontal-row" >
<checkbox id="enable-lobby-chat"/>
<spacer width="20" height="100%" />
<label height="100%" id="label-lobby-chat" I18N="In the ui settings" text="Enable chatting in networking lobby"/>
</div>
</div>
<spacer height="18" width="4"/>
<!-- ************ LANGUAGE CHOICE ************ -->
<box proportion="1" width="75%" align="center" layout="vertical-row" padding="8">
<list id="language" x="0" y="0" width="100%" height="100%"/>
</box>
<spacer height="18" width="4"/>
</box>
</div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/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_video" width="128" height="128" icon="gui/options_video.png"
I18N="Section in the settings menu" text="Graphics"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"
I18N="Section in the settings menu" text="Audio"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"
I18N="Section in the settings menu" text="User Interface"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"
I18N="Section in the settings menu" text="Players"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"
I18N="Section in the settings menu" text="Controls"/>
<icon-button id="tab_language" width="128" height="128" icon="gui/options_language.png"
I18N="Section in the settings menu" text="Language"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<spacer width="5" height="1%"/>
<!-- ************ SKIN CHOICE ************ -->
<div layout="horizontal-row" width="100%" height="fit">
<label I18N="In the ui settings" text="Skin" align="center"/>
<spacer width="2%" height="20"/>
<spinner id="skinchoice" width="30%"/>
</div>
<spacer width="5" height="3%"/>
<div layout="horizontal-row" width="100%" height="fit">
<div proportion="1" height="fit" layout="horizontal-row">
<checkbox id="showfps"/>
<spacer width="1%" height="100%" />
<label height="100%" I18N="In the ui settings" text="Display FPS" word_wrap="true"/>
</div>
</div>
<spacer width="5" height="3%"/>
<div layout="horizontal-row" width="100%" height="fit">
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="split_screen_horizontally"/>
<spacer width="1%" height="100%" />
<label height="100%" I18N="In the ui settings" text="Multiplayer splits screen horizontally" word_wrap="true"/>
</div>
<spacer width="2%" height="5"/>
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="perPlayerDifficulty"/>
<spacer width="2%" height="100%" />
<label height="100%" I18N="In the ui settings" text="Enable per-player handicaps" word_wrap="true"/>
</div>
</div>
<spacer width="5" height="3%"/>
<div layout="horizontal-row" width="100%" height="fit">
<div proportion="1" height="fit" layout="horizontal-row" >
<checkbox id="enable-internet"/>
<spacer width="1%" height="100%" />
<label height="100%" I18N="In the ui settings" text="Connect to the Internet" word_wrap="true"/>
</div>
<spacer width="2%" height="5"/>
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="enable-hw-report"/>
<spacer width="1%" height="100%" />
<label height="100%" id="label-hw-report" I18N="In the ui settings"
text="Send anonymous hardware statistics" word_wrap="true"/>
</div>
</div>
<spacer width="5" height="3%"/>
<div layout="horizontal-row" width="100%" height="fit">
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="show-login"/>
<spacer width="1%" height="100%" />
<label height="100%" I18N="In the ui settings" text="Always show login screen" word_wrap="true"/>
</div>
<spacer width="2%" height="5"/>
<div proportion="1" height="fit" layout="horizontal-row" >
<checkbox id="enable-lobby-chat"/>
<spacer width="1%" height="100%" />
<label height="100%" id="label-lobby-chat" I18N="In the ui settings" text="Enable chatting in networking lobby" word_wrap="true"/>
</div>
</div>
<spacer width="5" height="3%"/>
</box>
</div>
</div>
</stkgui>

View File

@ -1,83 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/>
<spacer height="15" width="10"/>
<tabs id="options_choice" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="tab_video" width="128" height="128" icon="gui/options_video.png"
I18N="Section in the settings menu" text="Graphics"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"/>
</tabs>
<box proportion="1" width="100%" layout="vertical-row">
<spacer height="15" width="10"/>
<!-- ************ GRAPHICAL EFFECTS SETTINGS ************ -->
<div width="75%" height="fit" layout="horizontal-row" id="outer_box" >
<label I18N="In the video settings" text="Graphical Effects Level" align="center"/>
<spacer width="20" height="20"/>
<div layout="vertical-row" proportion="1" height="fit" id="inner_box">
<gauge id="gfx_level" min_value="1" max_value="8" width="300" align="center" />
<spacer height="5" width="10"/>
<button id="custom" text="Custom settings..." I18N="In the video settings" align="center"/>
</div>
</div>
<spacer height="10" width="10"/>
<!-- ************ VSYNC ************ -->
<div width="75%" height="fit" layout="horizontal-row" >
<spacer width="40" height="2" />
<checkbox id="vsync"/>
<spacer width="20" height="2" />
<label height="100%" I18N="In the video settings" text="Vertical Sync (requires restart)"/>
</div>
<spacer height="10" width="10"/>
<!-- ************ RESOLUTION CHOICE ************ -->
<spacer height="10" width="10"/>
<label width="100%" I18N="In the video settings" text="Resolution"/>
<scrollable_ribbon id="resolutions" proportion="1" label_location="each"
width="100%" square_items="false"
align="center" child_width="128" child_height="128" max_height="150" />
<spacer height="10" width="10"/>
<div width="75%" height="fit" layout="horizontal-row" >
<spacer width="40" height="100%" />
<checkbox id="fullscreen"/>
<spacer width="20" height="100%" />
<label height="100%" I18N="In the video settings" text="Fullscreen"/>
</div>
<div width="75%" layout="horizontal-row" height="fit">
<spacer width="40" height="100%" />
<checkbox id="rememberWinpos"/>
<spacer width="20" height="100%" />
<label I18N="In the video settings" text="Remember window location"/>
</div>
<spacer height="10" width="10"/>
<div width="100%" height="fit" layout="horizontal-row" >
<spacer width="40" height="100%" />
<button id="apply_resolution"
I18N="In the video settings" text="Apply new resolution" />
</div>
<spacer height="15" width="4"/>
</box>
</div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/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_video" width="128" height="128" icon="gui/options_video.png"
I18N="Section in the settings menu" text="Graphics"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"
I18N="Section in the settings menu" text="Audio"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"
I18N="Section in the settings menu" text="User Interface"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"
I18N="Section in the settings menu" text="Players"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"
I18N="Section in the settings menu" text="Controls"/>
<icon-button id="tab_language" width="128" height="128" icon="gui/options_language.png"
I18N="Section in the settings menu" text="Language"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<spacer width="5" height="1%"/>
<!-- ************ GRAPHICAL EFFECTS SETTINGS ************ -->
<div width="75%" height="fit" layout="horizontal-row" id="outer_box" >
<label I18N="In the video settings" text="Graphical Effects Level" align="center"/>
<spacer width="20" height="20"/>
<div layout="vertical-row" proportion="1" height="fit" id="inner_box">
<gauge id="gfx_level" min_value="1" max_value="8" width="300" align="center" />
<spacer height="5" width="10"/>
<button id="custom" text="Custom settings..." I18N="In the video settings" align="center"/>
</div>
</div>
<spacer width="5" height="1%"/>
<!-- ************ VSYNC ************ -->
<div width="75%" height="fit" layout="horizontal-row" >
<spacer width="40" height="2" />
<checkbox id="vsync"/>
<spacer width="20" height="2" />
<label height="100%" I18N="In the video settings" text="Vertical Sync (requires restart)"/>
</div>
<spacer width="5" height="1%"/>
<!-- ************ RESOLUTION CHOICE ************ -->
<spacer width="5" height="1%"/>
<label width="100%" I18N="In the video settings" text="Resolution"/>
<scrollable_ribbon id="resolutions" proportion="1" label_location="each"
width="100%" square_items="false"
align="center" child_width="128" child_height="128" max_height="150" />
<spacer width="5" height="1%"/>
<div width="75%" height="fit" layout="horizontal-row" >
<spacer width="40" height="100%" />
<checkbox id="fullscreen"/>
<spacer width="20" height="100%" />
<label height="100%" I18N="In the video settings" text="Fullscreen"/>
</div>
<div width="75%" layout="horizontal-row" height="fit">
<spacer width="40" height="100%" />
<checkbox id="rememberWinpos"/>
<spacer width="20" height="100%" />
<label I18N="In the video settings" text="Remember window location"/>
</div>
<spacer width="5" height="1%"/>
<div width="100%" height="fit" layout="horizontal-row" >
<spacer width="40" height="100%" />
<button id="apply_resolution"
I18N="In the video settings" text="Apply new resolution" />
</div>
<spacer width="5" height="1%"/>
</box>
</div>
</div>
</stkgui>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -1,90 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/>
<spacer height="15" width="10"/>
<tabs id="options_choice" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="tab_video" width="128" height="128" icon="gui/options_video.png"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"
I18N="Section in the settings menu" text="Players"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"/>
</tabs>
<box proportion="1" width="98%" layout="vertical-row">
<spacer height="2%" width="10"/>
<scrollable_ribbon id="players" height="18%" y="10" x="10" width="98%" align="center" label_location="each"
square_items="true" child_width="128" child_height="128" />
<spacer height="2%" width="10"/>
<div width="90%" align="center" layout="vertical-row" proportion="1">
<div width="100%" height="fit" layout="horizontal-row" >
<checkbox width="fit" id="online" I18N="In the user screen" text_align="left"/>
<spacer width="10"/>
<label proportion="1" height="100%" text_align="left" I18N="In the user screen" text="Online"/>
</div>
<div width="100%" height="fit" layout="horizontal-row" >
<checkbox width="fit" id="remember-user" I18N="In the user screen" text_align="left"/>
<spacer width="10"/>
<label proportion="1" id="label_remember" height="100%" text_align="left"
I18N="In the user screen" text="Remember password"/>
</div>
<!-- Disable guest accounts for now
<div width="100%" height="fit" layout="horizontal-row" >
<label width="40%" id="label_guest" height="100%" text_align="left"
I18N="In the user screen" text="Guest login"/>
<checkbox id="guest" I18N="In the user screen" text_align="left"/>
</div>
-->
<div width="100%" height="fit" layout="horizontal-row" >
<label width="40%" id="label_username" height="100%" text_align="left"
I18N="In the user screen" text="Username"/>
<textbox id="username" proportion="2" height="fit" I18N="In the user screen"/>
</div>
<spacer height="5%" width="20"/>
<div width="100%" height="fit" layout="horizontal-row" >
<label id="label_password" width="40%" height="100%" text_align="left"
I18N="In the user screen" text="Password"/>
<textbox id="password" proportion="2" height="fit" I18N="In the user screen"/>
</div>
<spacer height="5%" width="20"/>
<button id="password_reset" width="fit" text="Reset password"/>
<spacer height="5%" width="20"/>
<label id="message" width="100%" text_align="center"/>
</div>
<spacer width="20" height="2%"/>
<div width="90%" align="center" layout="vertical-row" height="18%">
<buttonbar id="options" width="100%" height="100%" align="center">
<icon-button id="ok" width="fit" height="fit" icon="gui/green_check.png"
I18N="In the user screen" text="OK" label_location="bottom"/>
<icon-button id="new_user" width="fit" height="fit" icon="gui/blue_plus.png"
I18N="In the user screen" text="Add user" label_location="bottom"/>
<icon-button id="delete" width="fit" height="fit" icon="gui/remove.png"
I18N="In the user screen" text="Delete" label_location="bottom"/>
<icon-button id="rename" width="fit" height="fit" icon="gui/rename.png"
I18N="In the user screen" text="Rename" label_location="bottom"/>
<icon-button id="default_kart_color" width="fit" height="fit" icon="gui/edit.png"
I18N="In the user screen" text="Default kart color" label_location="bottom"/>
<icon-button id="cancel" width="fit" height="fit" icon="gui/main_quit.png"
I18N="In the user screen" text="Cancel" label_location="bottom"/>
</buttonbar>
</div>
<spacer width="20" height="5%"/>
</box>
<spacer width="20" height="15"/>
</div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/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_video" width="128" height="128" icon="gui/options_video.png"
I18N="Section in the settings menu" text="Graphics"/>
<icon-button id="tab_audio" width="128" height="128" icon="gui/options_audio.png"
I18N="Section in the settings menu" text="Audio"/>
<icon-button id="tab_ui" width="128" height="128" icon="gui/options_ui.png"
I18N="Section in the settings menu" text="User Interface"/>
<icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png"
I18N="Section in the settings menu" text="Players"/>
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"
I18N="Section in the settings menu" text="Controls"/>
<icon-button id="tab_language" width="128" height="128" icon="gui/options_language.png"
I18N="Section in the settings menu" text="Language"/>
</vertical-tabs>
<spacer width="2%" height="100%"/>
<box width="80%" height="100%" layout="vertical-row">
<spacer height="2%" width="10"/>
<scrollable_ribbon id="players" height="18%" y="10" x="10" width="98%" align="center" label_location="each"
square_items="true" child_width="128" child_height="128" />
<spacer height="2%" width="10"/>
<div width="90%" align="center" layout="vertical-row" proportion="1">
<div width="100%" height="fit" layout="horizontal-row" >
<checkbox width="fit" id="online" I18N="In the user screen" text_align="left"/>
<spacer width="10"/>
<label proportion="1" height="100%" text_align="left" I18N="In the user screen" text="Online"/>
</div>
<div width="100%" height="fit" layout="horizontal-row" >
<checkbox width="fit" id="remember-user" I18N="In the user screen" text_align="left"/>
<spacer width="10"/>
<label proportion="1" id="label_remember" height="100%" text_align="left"
I18N="In the user screen" text="Remember password"/>
</div>
<!-- Disable guest accounts for now
<div width="100%" height="fit" layout="horizontal-row" >
<label width="40%" id="label_guest" height="100%" text_align="left"
I18N="In the user screen" text="Guest login"/>
<checkbox id="guest" I18N="In the user screen" text_align="left"/>
</div>
-->
<div width="100%" height="fit" layout="horizontal-row" >
<label width="40%" id="label_username" height="100%" text_align="left"
I18N="In the user screen" text="Username"/>
<textbox id="username" proportion="2" height="fit" I18N="In the user screen"/>
</div>
<spacer height="5%" width="20"/>
<div width="100%" height="fit" layout="horizontal-row" >
<label id="label_password" width="40%" height="100%" text_align="left"
I18N="In the user screen" text="Password"/>
<textbox id="password" proportion="2" height="fit" I18N="In the user screen"/>
</div>
<spacer height="5%" width="20"/>
<button id="password_reset" width="fit" text="Reset password"/>
<spacer height="5%" width="20"/>
<label id="message" width="100%" text_align="center"/>
</div>
<spacer width="20" height="2%"/>
<div width="90%" align="center" layout="vertical-row" height="18%">
<buttonbar id="options" width="100%" height="100%" align="center">
<icon-button id="ok" width="fit" height="fit" icon="gui/green_check.png"
I18N="In the user screen" text="OK" label_location="bottom"/>
<icon-button id="new_user" width="fit" height="fit" icon="gui/blue_plus.png"
I18N="In the user screen" text="Add user" label_location="bottom"/>
<icon-button id="delete" width="fit" height="fit" icon="gui/remove.png"
I18N="In the user screen" text="Delete" label_location="bottom"/>
<icon-button id="rename" width="fit" height="fit" icon="gui/rename.png"
I18N="In the user screen" text="Rename" label_location="bottom"/>
<icon-button id="default_kart_color" width="fit" height="fit" icon="gui/edit.png"
I18N="In the user screen" text="Default kart color" label_location="bottom"/>
<icon-button id="cancel" width="fit" height="fit" icon="gui/main_quit.png"
I18N="In the user screen" text="Cancel" label_location="bottom"/>
</buttonbar>
</div>
<spacer width="20" height="5%"/>
</box>
</div>
</div>
</stkgui>

View File

@ -1,236 +1,236 @@
aa=ʿAfár af
af=Afrikaans
af_ZA=0
am=ኣማርኛ
ar=العربية
ar_AR=0
ar_OM=0
ar_SA=0
ar_SY=0
ar_TN=0
as=অসমীয়া
ast=Asturianu
ay=Aymar aru
az=Azərbaycanca
az_IR=0
be=Беларуская мова
bg=български
bg_BG=0
bn=বাংলা
bn_BD=0
bn_IN=0
bo=བོད་སྐད་
br=Brezhoneg
bs=Bosanski
bs_BA=0
bs_BS=0
ca_ES=0
ca=0
cmn=0
co=Corsu
cs=Čeština
cs_CZ=Čeština (Česká Republika)
cy=Welsh
cy_GB=Welsh (Great Britain)
cz=Unknown language
da=Dansk
da_DK=Dansk (Danmark)
de=Deutsch
de_AT=Deutsch (Österreich)
de_CH=Deutsch (Schweiz)
de_DE=Deutsch (Deutschland)
dk=Unknown language
dz=རྫོང་ཁ
el=ελληνικά
el_GR=0
en=English
en_AU=English (Australia)
en_CA=English (Canada)
en_GB=English (Great Britain)
en_US=English (United States)
en_ZA=English (South Africa)
en_US=English
eo=Esperanto
es=Español
es_AR=0
es_CL=0
es_CO=0
es_CR=0
es_DO=0
es_EC=0
es_ES=0
es_GT=0
es_HN=0
es_LA=0
es_MX=0
es_NI=0
es_PA=0
es_PE=0
es_PR=0
es_SV=0
es_UY=0
es_VE=0
et=Eesti keel
et_EE=0
et_ET=0
eu=Euskara
eu_ES=0
fa=فارسى
fa_AF=0
fa_IR=0
fi=Suomi
fi_FI=0
fo=Føroyskt
fo_FO=0
fr=Français
fr_CA=Français (Canada)
fr_CH=Français (Suisse)
fr_FR=Français (France)
fr_LU=Français (Luxembourg)
fy=Frysk
ga=Gaeilge
gd=Gàidhlig
gl=Galego
gl_ES=0
gn=Avañe'ẽ
gu=ગુજરાતી
gv=Gaelg
ha=حَوْسَ
he=עברית
he_IL=0
hi=हिन्दी
hr=Hrvatski
hr_HR=0
hu=Magyar
hu_HU=0
hy=Հայերեն
ia=Interlingua
id=Bahasa Indonesia
id_ID=0
is=Íslenska
is_IS=0
it=Italiano
it_CH=0
it_IT=0
iu=ᐃᓄᒃᑎᑐᑦ/inuktitut
ja=日本語
ja_JP=0
ka=ქართული
kk=Қазақша
kl=Kalaallisut
km=ភាសាខ្មែរ
km_KH=0
kn=ಕನ್ನಡ
ko=한국어
ko_KR=0
krl=Karjalan kieli
ku=Kurdî
kw=Kernowek
ky=кыргызча
la=Latina
lo=ລາວ
lt=Lietuvių
lt=0
lv=Latviešu
lv_LV=0
jbo=La .lojban.
mg=Malagasy
mi=Māori
mk=Македонски
mk_MK=0
ml=മലയാളം
mn=Монгол
mn_MN=Монгол
mr=मराठी
ms=Bahasa Melayu
ms_MY=0
mt=Malti
my=မြန်မာဘာသာ
my_MM=0
nb=0
nb_NO=0
ne=0
nl=Nederlands
nl_BE=0
nl_NL=0
nn=Norsk nynorsk
nn_NO=0
no=Norsk bokmål
no_NO=0
no_NY=0
nr=0
oc=Occitan
om=Oromoo
or=ଓଡ଼ିଆ
os=0
pa=ਪੰਜਾਬੀ
pl=Polski
pl_PL=0
pms=Piemontèis
ps=پښتو
pt=Português
pt_BR=0
pt_PT=0
qu=Runa Simi
rm=Rumantsch
ro=Română
ro_RO=0
ru=Русский
ru_RU=0
rw=Kinyarwanda
sa=0
sc=Sardu
sco=0
sd=0
se=Sámegiella
se_NO=0
si=0
sk=Slovenčina
sk_SK=0
sl=Slovenščina
sl_SI=0
sl_SL=0
sm=0
so=0
sp=0
sq=Shqip
sq_AL=0
sr=Српски
sr_YU=0
ss=0
st=0
sv=Svenska
sv_SE=0
sv_SV=0
sw=0
ta=தமிழ்
te=0
tg=0
th=ไทย
th_TH=0
ti=0
tk=0
tl=0
to=0
tr=Türkçe
tr_TR=0
ts=0
tt=Татарча
ug=0
uk=Українська
uk_UA=0
ur=اردو
ur_PK=0
uz=0
vi=Tiếng Việt
vi_VN=0
wa=0
wo=0
xh=0
yi=ייִדיש
yo=0
zh=中文
zh_CN=中文(简体)
zh_HK=中文(香港)
zh_TW=中文(繁體)
zu=0
aa=ʿAfár af;
af=Afrikaans;
af_ZA=0;
am=ኣማርኛ;
ar=العربية;
ar_AR=0;
ar_OM=0;
ar_SA=0;
ar_SY=0;
ar_TN=0;
as=অসমীয়া;
ast=Asturianu;
ay=Aymar aru;
az=Azərbaycanca;
az_IR=0;
be=Беларуская мова;
bg=български;
bg_BG=0;
bn=বাংলা;
bn_BD=0;
bn_IN=0;
bo=བོད་སྐད་;
br=Brezhoneg;
bs=Bosanski;
bs_BA=0;
bs_BS=0;
ca_ES=0;
ca=0;
cmn=0;
co=Corsu;
cs=Čeština;
cs_CZ=Čeština (Česká Republika);
cy=Welsh;
cy_GB=Welsh (Great Britain);
cz=Unknown language;
da=Dansk;
da_DK=Dansk (Danmark);
de=Deutsch;
de_AT=Deutsch (Österreich);
de_CH=Deutsch (Schweiz);
de_DE=Deutsch (Deutschland);
dk=Unknown language;
dz=རྫོང་ཁ;
el=ελληνικά;
el_GR=0;
en=English;
en_AU=English (Australia);
en_CA=English (Canada);
en_GB=English (Great Britain);
en_US=English (United States);
en_ZA=English (South Africa);
en_US=English;
eo=Esperanto;
es=Español;
es_AR=0;
es_CL=0;
es_CO=0;
es_CR=0;
es_DO=0;
es_EC=0;
es_ES=0;
es_GT=0;
es_HN=0;
es_LA=0;
es_MX=0;
es_NI=0;
es_PA=0;
es_PE=0;
es_PR=0;
es_SV=0;
es_UY=0;
es_VE=0;
et=Eesti keel;
et_EE=0;
et_ET=0;
eu=Euskara;
eu_ES=0;
fa=فارسى;
fa_AF=0;
fa_IR=0;
fi=Suomi;
fi_FI=0;
fo=Føroyskt;
fo_FO=0;
fr=Français;
fr_CA=Français (Canada);
fr_CH=Français (Suisse);
fr_FR=Français (France);
fr_LU=Français (Luxembourg);
fy=Frysk;
ga=Gaeilge;
gd=Gàidhlig;
gl=Galego;
gl_ES=0;
gn=Avañe'ẽ;
gu=ગુજરાતી;
gv=Gaelg;
ha=حَوْسَ;
he=עברית;
he_IL=0;
hi=हिन्दी;
hr=Hrvatski;
hr_HR=0;
hu=Magyar;
hu_HU=0;
hy=Հայերեն;
ia=Interlingua;
id=Bahasa Indonesia;
id_ID=0;
is=Íslenska;
is_IS=0;
it=Italiano;
it_CH=0;
it_IT=0;
iu=ᐃᓄᒃᑎᑐᑦ/inuktitut;
ja=日本語;
ja_JP=0;
ka=ქართული;
kk=Қазақша;
kl=Kalaallisut;
km=ភាសាខ្មែរ;
km_KH=0;
kn=ಕನ್ನಡ;
ko=한국어;
ko_KR=0;
krl=Karjalan kieli;
ku=Kurdî;
kw=Kernowek;
ky=кыргызча;
la=Latina;
lo=ລາວ;
lt=Lietuvių;
lt=0;
lv=Latviešu;
lv_LV=0;
jbo=La .lojban.;
mg=Malagasy;
mi=Māori;
mk=Македонски;
mk_MK=0;
ml=മലയാളം;
mn=Монгол;
mn_MN=Монгол;
mr=मराठी;
ms=Bahasa Melayu;
ms_MY=0;
mt=Malti;
my=မြန်မာဘာသာ;
my_MM=0;
nb=0;
nb_NO=0;
ne=0;
nl=Nederlands;
nl_BE=0;
nl_NL=0;
nn=Norsk nynorsk;
nn_NO=0;
no=Norsk bokmål;
no_NO=0;
no_NY=0;
nr=0;
oc=Occitan;
om=Oromoo;
or=ଓଡ଼ିଆ;
os=0;
pa=ਪੰਜਾਬੀ;
pl=Polski;
pl_PL=0;
pms=Piemontèis;
ps=پښتو;
pt=Português;
pt_BR=0;
pt_PT=0;
qu=Runa Simi;
rm=Rumantsch;
ro=Română;
ro_RO=0;
ru=Русский;
ru_RU=0;
rw=Kinyarwanda;
sa=0;
sc=Sardu;
sco=0;
sd=0;
se=Sámegiella;
se_NO=0;
si=0;
sk=Slovenčina;
sk_SK=0;
sl=Slovenščina;
sl_SI=0;
sl_SL=0;
sm=0;
so=0;
sp=0;
sq=Shqip;
sq_AL=0;
sr=Српски;
sr_YU=0;
ss=0;
st=0;
sv=Svenska;
sv_SE=0;
sv_SV=0;
sw=0;
ta=தமிழ்;
te=0;
tg=0;
th=ไทย;
th_TH=0;
ti=0;
tk=0;
tl=0;
to=0;
tr=Türkçe;
tr_TR=0;
ts=0;
tt=Татарча;
ug=0;
uk=Українська;
uk_UA=0;
ur=اردو;
ur_PK=0;
uz=0;
vi=Tiếng Việt;
vi_VN=0;
wa=0;
wo=0;
xh=0;
yi=ייִדיש;
yo=0;
zh=中文;
zh_CN=中文(简体);
zh_HK=中文(香港);
zh_TW=中文(繁體);
zu=0;

View File

@ -1,4 +1,4 @@
#ifdef GL_ES
#ifdef TBO_DISABLED
uniform sampler2D skinning_tex;
#else
uniform samplerBuffer skinning_tex;
@ -56,7 +56,7 @@ void main()
vec4 skinned_tangent = vec4(0.0);
int skinning_offset = i_misc_data.x;
#ifdef GL_ES
#ifdef TBO_DISABLED
mat4 joint_matrix =
i_weight[0] * mat4(
texelFetch(skinning_tex, ivec2(0, clamp(i_joint[0] + skinning_offset, 0, MAX_BONES)), 0),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -91,6 +91,11 @@
#endif
#endif
// Disable macOS/OSX device
#ifdef NO_IRR_COMPILE_WITH_OSX_DEVICE_
#undef _IRR_COMPILE_WITH_OSX_DEVICE_
#endif
#if defined(ANDROID)
#define _IRR_ANDROID_PLATFORM_
#define _IRR_POSIX_API_

View File

@ -56,6 +56,7 @@ void CentralVideoSettings::init()
hasInstancedArrays = false;
hasBGRA = false;
hasColorBufferFloat = false;
hasTextureBufferObject = false;
m_need_vertex_id_workaround = false;
// Call to glGetIntegerv should not be made if --no-graphics is used
@ -157,6 +158,12 @@ void CentralVideoSettings::init()
hasGS = true;
Log::info("GLDriver", "Geometry Shaders Present");
}
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_TEXTURE_BUFFER_OBJECT) &&
m_glsl == true)
{
hasTextureBufferObject = true;
Log::info("GLDriver", "ARB Texture Buffer Object Present");
}
if (hasGLExtension("GL_ARB_texture_swizzle"))
{
hasTextureSwizzle = true;
@ -216,7 +223,7 @@ void CentralVideoSettings::init()
hasUBO = true;
Log::info("GLDriver", "ARB Uniform Buffer Object Present");
}
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_TEXTURE_FORMAT_BGRA8888) &&
(hasGLExtension("GL_IMG_texture_format_BGRA8888") ||
hasGLExtension("GL_EXT_texture_format_BGRA8888")))
@ -449,4 +456,9 @@ bool CentralVideoSettings::isARBInstancedArraysUsable() const
(m_gl_major_version > 3 || (m_gl_major_version == 3 && m_gl_minor_version >= 2));
}
bool CentralVideoSettings::isARBTextureBufferObjectUsable() const
{
return hasTextureBufferObject;
}
#endif // !SERVER_ONLY

View File

@ -48,6 +48,7 @@ private:
bool hasInstancedArrays;
bool hasBGRA;
bool hasColorBufferFloat;
bool hasTextureBufferObject;
bool m_need_vertex_id_workaround;
public:
static bool m_supports_sp;
@ -81,6 +82,7 @@ public:
bool isARBInstancedArraysUsable() const;
bool isEXTTextureFormatBGRA8888Usable() const;
bool isEXTColorBufferFloatUsable() const;
bool isARBTextureBufferObjectUsable() const;
// Are all required extensions available for feature support
bool supportsComputeShadersFiltering() const;

View File

@ -44,7 +44,7 @@ namespace GraphicsRestrictions
/** The list of names used in the XML file for the graphics
* restriction types. They must be in the same order as the types. */
std::array<std::string, 30> m_names_of_restrictions =
std::array<std::string, 31> m_names_of_restrictions =
{
{
"UniformBufferObject",
@ -76,7 +76,8 @@ namespace GraphicsRestrictions
"ForceLegacyDevice",
"VertexIdWorking",
"HardwareSkinning",
"NpotTextures"
"NpotTextures",
"TextureBufferObject"
}
};
} // namespace Private

View File

@ -64,6 +64,7 @@ namespace GraphicsRestrictions
GR_VERTEX_ID_WORKING,
GR_HARDWARE_SKINNING,
GR_NPOT_TEXTURES,
GR_TEXTURE_BUFFER_OBJECT,
GR_COUNT /** MUST be last entry. */
} ;

View File

@ -171,6 +171,8 @@ ShaderFilesManager::SharedShader ShaderFilesManager::loadShader
code << "//" << full_path << "\n";
if (!CVS->isARBUniformBufferObjectUsable())
code << "#define UBO_DISABLED\n";
if (!CVS->isARBTextureBufferObjectUsable())
code << "#define TBO_DISABLED\n";
if (CVS->needsVertexIdWorkaround())
code << "#define Needs_Vertex_Id_Workaround\n";
if (CVS->isDeferredEnabled())

View File

@ -218,7 +218,7 @@ void Skybox::generateSpecularCubemap()
}
glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
if (!CVS->isDeferredEnabled())
if (!CVS->isDeferredEnabled() || !CVS->isARBTextureBufferObjectUsable())
return;
#if !defined(USE_GLES2)

View File

@ -237,43 +237,47 @@ void resizeSkinning(unsigned number)
const irr::core::matrix4 m;
g_skinning_size = number;
#ifdef USE_GLES2
glBindTexture(GL_TEXTURE_2D, g_skinning_tex);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, 4, number, 0, GL_RGBA,
GL_FLOAT, NULL);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 4, 1, GL_RGBA, GL_FLOAT,
m.pointer());
glBindTexture(GL_TEXTURE_2D, 0);
static std::vector<std::array<float, 16> >
tmp_buf(stk_config->m_max_skinning_bones);
g_joint_ptr = tmp_buf.data();
#else
glBindBuffer(GL_TEXTURE_BUFFER, g_skinning_buf);
if (CVS->isARBBufferStorageUsable())
if (!CVS->isARBTextureBufferObjectUsable())
{
glBufferStorage(GL_TEXTURE_BUFFER, number << 6, NULL,
GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT);
g_joint_ptr = (std::array<float, 16>*)glMapBufferRange(
GL_TEXTURE_BUFFER, 0, 64,
GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT);
memcpy(g_joint_ptr, m.pointer(), 64);
glUnmapBuffer(GL_TEXTURE_BUFFER);
g_joint_ptr = (std::array<float, 16>*)glMapBufferRange(
GL_TEXTURE_BUFFER, 64, (number - 1) << 6,
GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT);
glBindTexture(GL_TEXTURE_2D, g_skinning_tex);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, 4, number, 0, GL_RGBA,
GL_FLOAT, NULL);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 4, 1, GL_RGBA, GL_FLOAT,
m.pointer());
glBindTexture(GL_TEXTURE_2D, 0);
static std::vector<std::array<float, 16> >
tmp_buf(stk_config->m_max_skinning_bones);
g_joint_ptr = tmp_buf.data();
}
else
{
glBufferData(GL_TEXTURE_BUFFER, number << 6, NULL, GL_DYNAMIC_DRAW);
glBufferSubData(GL_TEXTURE_BUFFER, 0, 64, m.pointer());
}
glBindTexture(GL_TEXTURE_BUFFER, g_skinning_tex);
glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32F, g_skinning_buf);
glBindTexture(GL_TEXTURE_BUFFER, 0);
#ifndef USE_GLES2
glBindBuffer(GL_TEXTURE_BUFFER, g_skinning_buf);
if (CVS->isARBBufferStorageUsable())
{
glBufferStorage(GL_TEXTURE_BUFFER, number << 6, NULL,
GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT);
g_joint_ptr = (std::array<float, 16>*)glMapBufferRange(
GL_TEXTURE_BUFFER, 0, 64,
GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT);
memcpy(g_joint_ptr, m.pointer(), 64);
glUnmapBuffer(GL_TEXTURE_BUFFER);
g_joint_ptr = (std::array<float, 16>*)glMapBufferRange(
GL_TEXTURE_BUFFER, 64, (number - 1) << 6,
GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT);
}
else
{
glBufferData(GL_TEXTURE_BUFFER, number << 6, NULL, GL_DYNAMIC_DRAW);
glBufferSubData(GL_TEXTURE_BUFFER, 0, 64, m.pointer());
}
glBindTexture(GL_TEXTURE_BUFFER, g_skinning_tex);
glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32F, g_skinning_buf);
glBindTexture(GL_TEXTURE_BUFFER, 0);
#endif
}
} // resizeSkinning
@ -283,30 +287,35 @@ void initSkinning()
static_assert(sizeof(std::array<float, 16>) == 64, "No padding");
int max_size = 0;
#ifdef USE_GLES2
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_size);
if (stk_config->m_max_skinning_bones > (unsigned)max_size)
if (!CVS->isARBTextureBufferObjectUsable())
{
Log::warn("SharedGPUObjects", "Too many bones for skinning, max: %d",
max_size);
stk_config->m_max_skinning_bones = max_size;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_size);
if (stk_config->m_max_skinning_bones > (unsigned)max_size)
{
Log::warn("SharedGPUObjects", "Too many bones for skinning, max: %d",
max_size);
stk_config->m_max_skinning_bones = max_size;
}
Log::info("SharedGPUObjects", "Hardware Skinning enabled, method: %u"
" (max bones) * 16 RGBA float texture",
stk_config->m_max_skinning_bones);
}
Log::info("SharedGPUObjects", "Hardware Skinning enabled, method: %u"
" (max bones) * 16 RGBA float texture",
stk_config->m_max_skinning_bones);
#else
glGetIntegerv(GL_MAX_TEXTURE_BUFFER_SIZE, &max_size);
if (stk_config->m_max_skinning_bones << 6 > (unsigned)max_size)
else
{
Log::warn("SharedGPUObjects", "Too many bones for skinning, max: %d",
max_size >> 6);
stk_config->m_max_skinning_bones = max_size >> 6;
}
Log::info("SharedGPUObjects", "Hardware Skinning enabled, method: TBO, "
"max bones: %u", stk_config->m_max_skinning_bones);
#ifndef USE_GLES2
glGetIntegerv(GL_MAX_TEXTURE_BUFFER_SIZE, &max_size);
if (stk_config->m_max_skinning_bones << 6 > (unsigned)max_size)
{
Log::warn("SharedGPUObjects", "Too many bones for skinning, max: %d",
max_size >> 6);
stk_config->m_max_skinning_bones = max_size >> 6;
}
Log::info("SharedGPUObjects", "Hardware Skinning enabled, method: TBO, "
"max bones: %u", stk_config->m_max_skinning_bones);
#endif
}
// Reserve 1 identity matrix for non-weighted vertices
@ -314,7 +323,10 @@ void initSkinning()
const irr::core::matrix4 m;
glGenTextures(1, &g_skinning_tex);
#ifndef USE_GLES2
glGenBuffers(1, &g_skinning_buf);
if (CVS->isARBTextureBufferObjectUsable())
{
glGenBuffers(1, &g_skinning_buf);
}
#endif
resizeSkinning(stk_config->m_max_skinning_bones);
@ -581,7 +593,8 @@ void destroy()
SPTextureManager::destroy();
#ifndef USE_GLES2
if (CVS->isARBBufferStorageUsable())
if (CVS->isARBTextureBufferObjectUsable() &&
CVS->isARBBufferStorageUsable())
{
glBindBuffer(GL_TEXTURE_BUFFER, g_skinning_buf);
glUnmapBuffer(GL_TEXTURE_BUFFER);
@ -1160,7 +1173,8 @@ void uploadSkinningMatrices()
unsigned buffer_offset = 0;
#ifndef USE_GLES2
if (!CVS->isARBBufferStorageUsable())
if (CVS->isARBTextureBufferObjectUsable() &&
!CVS->isARBBufferStorageUsable())
{
glBindBuffer(GL_TEXTURE_BUFFER, g_skinning_buf);
g_joint_ptr = (std::array<float, 16>*)
@ -1178,13 +1192,17 @@ void uploadSkinningMatrices()
buffer_offset += g_skinning_mesh[i]->getTotalJoints();
}
#ifdef USE_GLES2
glBindTexture(GL_TEXTURE_2D, g_skinning_tex);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 1, 4, buffer_offset, GL_RGBA,
GL_FLOAT, g_joint_ptr);
glBindTexture(GL_TEXTURE_2D, 0);
#else
if (!CVS->isARBBufferStorageUsable())
if (!CVS->isARBTextureBufferObjectUsable())
{
glBindTexture(GL_TEXTURE_2D, g_skinning_tex);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 1, 4, buffer_offset, GL_RGBA,
GL_FLOAT, g_joint_ptr);
glBindTexture(GL_TEXTURE_2D, 0);
}
#ifndef USE_GLES2
if (CVS->isARBTextureBufferObjectUsable() &&
!CVS->isARBBufferStorageUsable())
{
glUnmapBuffer(GL_TEXTURE_BUFFER);
glBindBuffer(GL_TEXTURE_BUFFER, 0);

View File

@ -28,17 +28,39 @@
namespace SP
{
const std::map<std::string, std::pair<unsigned, SamplerType> >
g_prefilled_names =
{
#ifdef USE_GLES2
{ "skinning_tex", { 0, ST_NEAREST_CLAMPED } }
#else
{ "skinning_tex", { 0, ST_TEXTURE_BUFFER } }
#endif
};
std::map<std::string, std::pair<unsigned, SamplerType> >
SPShader::m_prefilled_names;
bool SPShader::m_sp_shader_debug = false;
SPShader::SPShader(const std::string& name,
const std::function<void(SPShader*)>& init_func,
bool transparent_shader, int drawing_priority,
bool use_alpha_channel, bool use_tangents,
const std::array<bool, 6>& srgb)
: m_name(name), m_init_function(init_func),
m_drawing_priority(drawing_priority),
m_transparent_shader(transparent_shader),
m_use_alpha_channel(use_alpha_channel),
m_use_tangents(use_tangents), m_srgb(srgb)
{
#ifndef SERVER_ONLY
if (CVS->isARBTextureBufferObjectUsable())
{
#ifndef USE_GLES2
m_prefilled_names["skinning_tex"] = std::make_pair<unsigned,
SamplerType>(0, ST_TEXTURE_BUFFER);
#endif
}
else
{
m_prefilled_names["skinning_tex"] = std::make_pair<unsigned,
SamplerType>(0, ST_NEAREST_CLAMPED);
}
#endif
memset(m_program, 0, 12);
m_init_function(this);
}
// ----------------------------------------------------------------------------
void SPShader::addShaderFile(const std::string& name, GLint shader_type,
RenderPass rp)
@ -104,7 +126,7 @@ void SPShader::addAllTextures(RenderPass rp)
{
#ifndef SERVER_ONLY
// Built-in prefilled shaders first
for (auto &p : g_prefilled_names)
for (auto &p : m_prefilled_names)
{
const char* s = p.first.c_str();
GLuint loc = glGetUniformLocation(m_program[rp], s);
@ -175,8 +197,8 @@ void SPShader::bindPrefilledTextures(RenderPass rp) const
for (auto& p : m_prefilled_samplers[rp])
{
glActiveTexture(GL_TEXTURE0 + std::get<0>(p));
auto it = g_prefilled_names.find(std::get<1>(p));
if (it != g_prefilled_names.end())
auto it = m_prefilled_names.find(std::get<1>(p));
if (it != m_prefilled_names.end())
{
glBindTexture(std::get<3>(p), sp_prefilled_tex[it->second.first]);
glBindSampler(std::get<0>(p), getSampler(std::get<2>(p)));

View File

@ -113,22 +113,15 @@ private:
public:
// ------------------------------------------------------------------------
static bool m_sp_shader_debug;
static std::map<std::string, std::pair<unsigned, SamplerType> >
m_prefilled_names;
// ------------------------------------------------------------------------
SPShader(const std::string& name,
const std::function<void(SPShader*)>& init_func,
bool transparent_shader = false, int drawing_priority = 0,
bool use_alpha_channel = false, bool use_tangents = false,
const std::array<bool, 6>& srgb =
{{ true, true, false, false, false, false }})
: m_name(name), m_init_function(init_func),
m_drawing_priority(drawing_priority),
m_transparent_shader(transparent_shader),
m_use_alpha_channel(use_alpha_channel),
m_use_tangents(use_tangents), m_srgb(srgb)
{
memset(m_program, 0, 12);
m_init_function(this);
}
{{ true, true, false, false, false, false }});
// ------------------------------------------------------------------------
~SPShader()
{

View File

@ -496,7 +496,8 @@ void EventHandler::navigate(const NavigationDirection nav, const int playerID)
} // navigate
/* This function use simple heuristic to find the closest widget
/**
* This function use simple heuristic to find the closest widget
* in the requested direction,
* It prioritize widgets close vertically to widget close horizontally,
* as it is expected behavior in any direction.
@ -536,6 +537,22 @@ int EventHandler::findIDClosestWidget(const NavigationDirection nav, const int p
(playerID != PLAYER_ID_GAME_MASTER && !w_test->m_supports_multiplayer))
continue;
// Ignore empty ribbon widgets and lists
if (w_test->m_type == GUIEngine::WTYPE_RIBBON)
{
RibbonWidget* ribbon = dynamic_cast<RibbonWidget*>(w_test);
assert(ribbon != NULL);
if (ribbon->getActiveChildrenNumber(playerID) == 0)
continue;
}
else if (w_test->m_type == WTYPE_LIST)
{
ListWidget* list = (ListWidget*) w_test;
assert(list != NULL);
if (list->getItemCount() == 0)
continue;
}
// if a dialog is shown, restrict to items in the dialog
if (ScreenKeyboard::isActive())
{

View File

@ -593,31 +593,12 @@ EventPropagation RibbonWidget::moveToNextItem(const bool horizontally, const boo
// Do nothing and do not block navigating out of the widget
if (result == EVENT_BLOCK) return result;
if (reverse)
m_selection[playerID]--;
else
m_selection[playerID]++;
int old_selection = m_selection[playerID];
selectNextActiveWidget(horizontally, reverse, playerID, old_selection);
if (m_selection[playerID] >= int(m_active_children.size()) || m_selection[playerID] < 0)
{
// In vertical tabs, don't loop when reaching the top or bottom
if (!horizontally)
{
if (reverse)
m_selection[playerID]++;
else
m_selection[playerID]--;
if (m_selection[playerID] == old_selection && !horizontally)
return EVENT_BLOCK;
return EVENT_BLOCK;
}
bool left = (m_selection[playerID] < 0);
if (m_listener != NULL) m_listener->onRibbonWidgetScroll(left ? -1 : 1);
bool select_zero = (m_event_handler && left) || (!m_event_handler && !left);
m_selection[playerID] = select_zero ? 0 : m_active_children.size()-1;
}
updateSelection();
if (m_ribbon_type == RIBBON_COMBO || m_ribbon_type == RIBBON_TABS ||
@ -666,6 +647,52 @@ EventPropagation RibbonWidget::propagationType(const bool horizontally)
return result;
}
/**
* Move to the next child widget in the requested direction.
* If it is inactive, move again, until it finds an activated child or test all childs
*/
void RibbonWidget::selectNextActiveWidget(const bool horizontally, const bool reverse,
const int playerID, const int old_selection)
{
int loop_counter = 0;
do
{
if (reverse)
m_selection[playerID]--;
else
m_selection[playerID]++;
if (m_selection[playerID] >= int(m_active_children.size()) || m_selection[playerID] < 0)
{
// In vertical tabs, don't loop when reaching the top or bottom
if (!horizontally)
{
if (reverse)
m_selection[playerID] = old_selection;
else
m_selection[playerID] = old_selection;
return;
}
bool left = (m_selection[playerID] < 0);
if (m_listener != NULL) m_listener->onRibbonWidgetScroll(left ? -1 : 1);
bool select_zero = (m_event_handler && left) || (!m_event_handler && !left);
m_selection[playerID] = select_zero ? 0 : m_active_children.size()-1;
}
loop_counter++;
if (loop_counter > m_active_children.size())
{
Log::warn("RibbonWidget", "All the buttons of the focused ribbon"
" are deactivated !");
break;
}
} while (!m_active_children.get(m_selection[playerID])->isActivated());
}
// ----------------------------------------------------------------------------
EventPropagation RibbonWidget::focused(const int playerID)

View File

@ -77,11 +77,13 @@ namespace GUIEngine
/** Callbacks */
virtual EventPropagation rightPressed(const int playerID=0) OVERRIDE;
virtual EventPropagation leftPressed(const int playerID=0) OVERRIDE;
virtual EventPropagation upPressed(const int playerID=0) OVERRIDE;
virtual EventPropagation downPressed(const int playerID=0) OVERRIDE;
virtual EventPropagation leftPressed (const int playerID=0) OVERRIDE;
virtual EventPropagation upPressed (const int playerID=0) OVERRIDE;
virtual EventPropagation downPressed (const int playerID=0) OVERRIDE;
EventPropagation moveToNextItem(const bool horizontally, const bool reverse, const int playerID);
EventPropagation propagationType(const bool horizontally);
void selectNextActiveWidget(const bool horizontally, const bool reverse,
const int playerID, const int old_selection);
virtual EventPropagation mouseHovered(Widget* child,
const int playerID) OVERRIDE;
virtual EventPropagation transmitEvent(Widget* w,

View File

@ -398,6 +398,10 @@ void MultitouchDevice::handleControls(MultitouchButton* button)
{
updateAxisY(button->axis_y);
}
else if (button->type == MultitouchButtonType::BUTTON_ESCAPE)
{
StateManager::get()->escapePressed();
}
else
{
if (button->action != PA_BEFORE_FIRST)

View File

@ -47,7 +47,7 @@ RubberBand::RubberBand(Plunger *plunger, AbstractKart *kart)
{
m_attached_state = RB_TO_PLUNGER;
#ifndef SERVER_ONLY
if (ProfileWorld::isNoGraphics())
if (ProfileWorld::isNoGraphics() || !CVS->isGLSL())
{
return;
}

View File

@ -49,6 +49,19 @@
MainLoop* main_loop = 0;
#ifdef WIN32
LRESULT CALLBACK separateProcessProc(_In_ HWND hwnd, _In_ UINT uMsg,
_In_ WPARAM wParam, _In_ LPARAM lParam)
{
if (uMsg == WM_DESTROY)
{
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hwnd, uMsg, wParam, lParam);
};
#endif
// ----------------------------------------------------------------------------
MainLoop::MainLoop(unsigned parent_pid)
: m_abort(false), m_ticks_adjustment(0), m_parent_pid(parent_pid)
@ -64,15 +77,7 @@ MainLoop::MainLoop(unsigned parent_pid)
class_name += StringUtils::toString(GetCurrentProcessId());
WNDCLASSEX wx = {};
wx.cbSize = sizeof(WNDCLASSEX);
wx.lpfnWndProc = [](HWND h, UINT m, WPARAM w, LPARAM l)->LRESULT
{
if (m == WM_DESTROY)
{
PostQuitMessage(0);
return 0;
}
return DefWindowProc(h, m, w, l);
};
wx.lpfnWndProc = separateProcessProc;
wx.hInstance = GetModuleHandle(0);
wx.lpszClassName = &class_name[0];
if (RegisterClassEx(&wx))

View File

@ -281,7 +281,8 @@ void EditGPScreen::setModified(const bool modified)
LabelWidget* header = getWidget<LabelWidget>("title");
assert(header != NULL);
//I18N: Indicate that the grand prix is modified and not saved
header->setText(modified ? _(L"%s (+)", m_gp->getName()) : L"", true);
header->setText(modified ? _(L"%s (+)", m_gp->getName())
: m_gp->getName(), true);
enableButtons();
} // setModified

View File

@ -32,10 +32,15 @@
#include "states_screens/help_screen_3.hpp"
#include "states_screens/help_screen_4.hpp"
#include "states_screens/help_screen_5.hpp"
#include "states_screens/help_screen_6.hpp"
#include "states_screens/help_screen_7.hpp"
#include "states_screens/state_manager.hpp"
using namespace GUIEngine;
// FIXME : it's hugely repetitive to have one class per help screen when
// THEY ALL DO THE SAME THING
// (the specialized test of this first screen is a tiny exception)
// -----------------------------------------------------------------------------
HelpScreen1::HelpScreen1() : Screen("help1.stkgui")
@ -102,6 +107,10 @@ void HelpScreen1::eventCallback(Widget* widget, const std::string& name, const i
screen = HelpScreen4::getInstance();
else if (selection == "page5")
screen = HelpScreen5::getInstance();
else if (selection == "page6")
screen = HelpScreen6::getInstance();
else if (selection == "page7")
screen = HelpScreen7::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}
@ -122,7 +131,11 @@ void HelpScreen1::init()
tutorial->setActive(StateManager::get()->getGameState() !=
GUIEngine::INGAME_MENU);
if (w != NULL) w->select( "page1", PLAYER_ID_GAME_MASTER );
if (w != NULL)
{
w->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
w->select( "page1", PLAYER_ID_GAME_MASTER );
}
} //init
// -----------------------------------------------------------------------------

View File

@ -23,6 +23,8 @@
#include "states_screens/help_screen_3.hpp"
#include "states_screens/help_screen_4.hpp"
#include "states_screens/help_screen_5.hpp"
#include "states_screens/help_screen_6.hpp"
#include "states_screens/help_screen_7.hpp"
#include "states_screens/state_manager.hpp"
using namespace GUIEngine;
@ -58,6 +60,10 @@ void HelpScreen2::eventCallback(Widget* widget, const std::string& name, const i
screen = HelpScreen4::getInstance();
else if (selection == "page5")
screen = HelpScreen5::getInstance();
else if (selection == "page6")
screen = HelpScreen6::getInstance();
else if (selection == "page7")
screen = HelpScreen7::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}
@ -74,7 +80,11 @@ void HelpScreen2::init()
Screen::init();
RibbonWidget* w = this->getWidget<RibbonWidget>("category");
if (w != NULL) w->select( "page2", PLAYER_ID_GAME_MASTER );
if (w != NULL)
{
w->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
w->select( "page2", PLAYER_ID_GAME_MASTER );
}
} // init
// -----------------------------------------------------------------------------

View File

@ -24,6 +24,8 @@
#include "states_screens/help_screen_2.hpp"
#include "states_screens/help_screen_4.hpp"
#include "states_screens/help_screen_5.hpp"
#include "states_screens/help_screen_6.hpp"
#include "states_screens/help_screen_7.hpp"
#include "states_screens/state_manager.hpp"
using namespace GUIEngine;
@ -60,6 +62,10 @@ void HelpScreen3::eventCallback(Widget* widget, const std::string& name, const i
screen = HelpScreen4::getInstance();
else if (selection == "page5")
screen = HelpScreen5::getInstance();
else if (selection == "page6")
screen = HelpScreen6::getInstance();
else if (selection == "page7")
screen = HelpScreen7::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}
@ -76,7 +82,11 @@ void HelpScreen3::init()
Screen::init();
RibbonWidget* w = this->getWidget<RibbonWidget>("category");
if (w != NULL) w->select( "page3", PLAYER_ID_GAME_MASTER );
if (w != NULL)
{
w->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
w->select( "page3", PLAYER_ID_GAME_MASTER );
}
} // init
// -----------------------------------------------------------------------------

View File

@ -24,6 +24,8 @@
#include "states_screens/help_screen_2.hpp"
#include "states_screens/help_screen_3.hpp"
#include "states_screens/help_screen_5.hpp"
#include "states_screens/help_screen_6.hpp"
#include "states_screens/help_screen_7.hpp"
#include "states_screens/state_manager.hpp"
using namespace GUIEngine;
@ -60,6 +62,10 @@ void HelpScreen4::eventCallback(Widget* widget, const std::string& name, const i
// screen = HelpScreen4::getInstance();
else if (selection == "page5")
screen = HelpScreen5::getInstance();
else if (selection == "page6")
screen = HelpScreen6::getInstance();
else if (selection == "page7")
screen = HelpScreen7::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}
@ -76,7 +82,11 @@ void HelpScreen4::init()
Screen::init();
RibbonWidget* w = this->getWidget<RibbonWidget>("category");
if (w != NULL) w->select( "page4", PLAYER_ID_GAME_MASTER );
if (w != NULL)
{
w->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
w->select( "page4", PLAYER_ID_GAME_MASTER );
}
} // init
// -----------------------------------------------------------------------------

View File

@ -23,6 +23,8 @@
#include "states_screens/help_screen_2.hpp"
#include "states_screens/help_screen_3.hpp"
#include "states_screens/help_screen_4.hpp"
#include "states_screens/help_screen_6.hpp"
#include "states_screens/help_screen_7.hpp"
#include "states_screens/state_manager.hpp"
using namespace GUIEngine;
@ -59,6 +61,10 @@ void HelpScreen5::eventCallback(Widget* widget, const std::string& name, const i
screen = HelpScreen4::getInstance();
//else if (selection == "page5")
// screen = HelpScreen5::getInstance();
else if (selection == "page6")
screen = HelpScreen6::getInstance();
else if (selection == "page7")
screen = HelpScreen7::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}
@ -75,7 +81,11 @@ void HelpScreen5::init()
Screen::init();
RibbonWidget* w = this->getWidget<RibbonWidget>("category");
if (w != NULL) w->select( "page5", PLAYER_ID_GAME_MASTER );
if (w != NULL)
{
w->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
w->select( "page5", PLAYER_ID_GAME_MASTER );
}
} // init
// -----------------------------------------------------------------------------

View File

@ -0,0 +1,91 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2016 C. Michael Murphey
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 3
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "states_screens/help_screen_6.hpp"
#include "guiengine/widget.hpp"
#include "guiengine/widgets/ribbon_widget.hpp"
#include "states_screens/help_screen_1.hpp"
#include "states_screens/help_screen_2.hpp"
#include "states_screens/help_screen_3.hpp"
#include "states_screens/help_screen_4.hpp"
#include "states_screens/help_screen_5.hpp"
#include "states_screens/help_screen_7.hpp"
#include "states_screens/state_manager.hpp"
using namespace GUIEngine;
// -----------------------------------------------------------------------------
HelpScreen6::HelpScreen6() : Screen("help6.stkgui")
{
} // HelpScreen6
// -----------------------------------------------------------------------------
void HelpScreen6::loadedFromFile()
{
} // loadedFromFile
// -----------------------------------------------------------------------------
void HelpScreen6::eventCallback(Widget* widget, const std::string& name, const int playerID)
{
if (name == "category")
{
std::string selection = ((RibbonWidget*)widget)->getSelectionIDString(PLAYER_ID_GAME_MASTER);
Screen *screen = NULL;
if (selection == "page1")
screen = HelpScreen1::getInstance();
else if (selection == "page2")
screen = HelpScreen2::getInstance();
else if (selection == "page3")
screen = HelpScreen3::getInstance();
else if (selection == "page4")
screen = HelpScreen4::getInstance();
else if (selection == "page5")
screen = HelpScreen5::getInstance();
//else if (selection == "page6")
// screen = HelpScreen6::getInstance();
else if (selection == "page7")
screen = HelpScreen7::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}
else if (name == "back")
{
StateManager::get()->escapePressed();
}
} // eventCallback
// -----------------------------------------------------------------------------
void HelpScreen6::init()
{
Screen::init();
RibbonWidget* w = this->getWidget<RibbonWidget>("category");
if (w != NULL)
{
w->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
w->select( "page6", PLAYER_ID_GAME_MASTER );
}
} // init
// -----------------------------------------------------------------------------

View File

@ -0,0 +1,49 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2016 C. Michael Murphey
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 3
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef HEADER_HELP_SCREEN_6_HPP
#define HEADER_HELP_SCREEN_6_HPP
#include "guiengine/screen.hpp"
namespace GUIEngine { class Widget; }
/**
* \brief Help screen, part 6
* \ingroup states_screens
*/
class HelpScreen6 : public GUIEngine::Screen, public GUIEngine::ScreenSingleton<HelpScreen6>
{
friend class GUIEngine::ScreenSingleton<HelpScreen6>;
HelpScreen6();
public:
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void loadedFromFile() OVERRIDE;
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name,
const int playerID) OVERRIDE;
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void init() OVERRIDE;
};
#endif

View File

@ -0,0 +1,91 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2016 C. Michael Murphey
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 3
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "states_screens/help_screen_7.hpp"
#include "guiengine/widget.hpp"
#include "guiengine/widgets/ribbon_widget.hpp"
#include "states_screens/help_screen_1.hpp"
#include "states_screens/help_screen_2.hpp"
#include "states_screens/help_screen_3.hpp"
#include "states_screens/help_screen_4.hpp"
#include "states_screens/help_screen_5.hpp"
#include "states_screens/help_screen_6.hpp"
#include "states_screens/state_manager.hpp"
using namespace GUIEngine;
// -----------------------------------------------------------------------------
HelpScreen7::HelpScreen7() : Screen("help7.stkgui")
{
} // HelpScreen7
// -----------------------------------------------------------------------------
void HelpScreen7::loadedFromFile()
{
} // loadedFromFile
// -----------------------------------------------------------------------------
void HelpScreen7::eventCallback(Widget* widget, const std::string& name, const int playerID)
{
if (name == "category")
{
std::string selection = ((RibbonWidget*)widget)->getSelectionIDString(PLAYER_ID_GAME_MASTER);
Screen *screen = NULL;
if (selection == "page1")
screen = HelpScreen1::getInstance();
else if (selection == "page2")
screen = HelpScreen2::getInstance();
else if (selection == "page3")
screen = HelpScreen3::getInstance();
else if (selection == "page4")
screen = HelpScreen4::getInstance();
else if (selection == "page5")
screen = HelpScreen5::getInstance();
else if (selection == "page6")
screen = HelpScreen6::getInstance();
//else if (selection == "page7")
// screen = HelpScreen7::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}
else if (name == "back")
{
StateManager::get()->escapePressed();
}
} // eventCallback
// -----------------------------------------------------------------------------
void HelpScreen7::init()
{
Screen::init();
RibbonWidget* w = this->getWidget<RibbonWidget>("category");
if (w != NULL)
{
w->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
w->select( "page7", PLAYER_ID_GAME_MASTER );
}
} // init
// -----------------------------------------------------------------------------

View File

@ -0,0 +1,49 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2016 C. Michael Murphey
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 3
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef HEADER_HELP_SCREEN_7_HPP
#define HEADER_HELP_SCREEN_7_HPP
#include "guiengine/screen.hpp"
namespace GUIEngine { class Widget; }
/**
* \brief Help screen, part 7
* \ingroup states_screens
*/
class HelpScreen7 : public GUIEngine::Screen, public GUIEngine::ScreenSingleton<HelpScreen7>
{
friend class GUIEngine::ScreenSingleton<HelpScreen7>;
HelpScreen7();
public:
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void loadedFromFile() OVERRIDE;
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name,
const int playerID) OVERRIDE;
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void init() OVERRIDE;
};
#endif

View File

@ -28,6 +28,7 @@
#include "guiengine/widget.hpp"
#include "io/file_manager.hpp"
#include "states_screens/options_screen_input.hpp"
#include "states_screens/options_screen_language.hpp"
#include "states_screens/options_screen_ui.hpp"
#include "states_screens/options_screen_video.hpp"
#include "states_screens/state_manager.hpp"
@ -58,13 +59,9 @@ void OptionsScreenAudio::init()
Screen::init();
RibbonWidget* ribbon = this->getWidget<RibbonWidget>("options_choice");
assert(ribbon != NULL);
ribbon->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
ribbon->select( "tab_audio", PLAYER_ID_GAME_MASTER );
ribbon->getRibbonChildren()[0].setTooltip( _("Graphics") );
ribbon->getRibbonChildren()[2].setTooltip( _("User Interface") );
ribbon->getRibbonChildren()[3].setTooltip( _("Players") );
ribbon->getRibbonChildren()[4].setTooltip( _("Controls") );
// ---- sfx volume
SpinnerWidget* gauge = this->getWidget<SpinnerWidget>("sfx_volume");
assert(gauge != NULL);
@ -115,6 +112,8 @@ void OptionsScreenAudio::eventCallback(Widget* widget, const std::string& name,
screen = OptionsScreenInput::getInstance();
else if (selection == "tab_ui")
screen = OptionsScreenUI::getInstance();
else if (selection == "tab_language")
screen = OptionsScreenLanguage::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}

View File

@ -33,6 +33,7 @@
#include "states_screens/dialogs/press_a_key_dialog.hpp"
#include "states_screens/options_screen_audio.hpp"
#include "states_screens/options_screen_input.hpp"
#include "states_screens/options_screen_language.hpp"
#include "states_screens/options_screen_video.hpp"
#include "states_screens/options_screen_ui.hpp"
#include "states_screens/state_manager.hpp"
@ -62,8 +63,7 @@ void OptionsScreenDevice::loadedFromFile()
void OptionsScreenDevice::beforeAddingWidget()
{
GUIEngine::ListWidget* w_list =
getWidget<GUIEngine::ListWidget>("actions");
ListWidget* w_list = getWidget<GUIEngine::ListWidget>("actions");
assert(w_list != NULL);
w_list->clearColumns();
w_list->addColumn(_("Action"), 1);
@ -78,14 +78,9 @@ void OptionsScreenDevice::init()
Screen::init();
RibbonWidget* tabBar = getWidget<RibbonWidget>("options_choice");
assert(tabBar != NULL);
// Focus is set to the actions list later in the init
tabBar->select( "tab_controls", PLAYER_ID_GAME_MASTER );
tabBar->getRibbonChildren()[0].setTooltip( _("Graphics") );
tabBar->getRibbonChildren()[1].setTooltip( _("Audio") );
tabBar->getRibbonChildren()[2].setTooltip( _("User Interface") );
tabBar->getRibbonChildren()[3].setTooltip( _("Players") );
ButtonWidget* delete_button = getWidget<ButtonWidget>("delete");
if (!m_config->isKeyboard())
{
@ -129,13 +124,12 @@ void OptionsScreenDevice::init()
LabelWidget* label = getWidget<LabelWidget>("title");
label->setText( m_config->getName().c_str(), false );
GUIEngine::ListWidget* actions =
getWidget<GUIEngine::ListWidget>("actions");
assert( actions != NULL );
// ---- create list skeleton (right number of items, right internal names)
// their actualy contents will be adapted as needed after
ListWidget* actions = getWidget<GUIEngine::ListWidget>("actions");
assert( actions != NULL );
//I18N: Key binding section
addListItemSubheader(actions, "game_keys_section", _("Game Keys"));
addListItem(actions, PA_STEER_LEFT);
@ -161,6 +155,10 @@ void OptionsScreenDevice::init()
updateInputButtons();
// Focus the list and select its first item
actions->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
actions->setSelectionID(0);
// Disable deletion keyboard configurations
bool in_game = StateManager::get()->getGameState() == GUIEngine::INGAME_MENU;
@ -506,14 +504,16 @@ void OptionsScreenDevice::eventCallback(Widget* widget,
Screen *screen = NULL;
if (selection == "tab_audio")
screen = OptionsScreenAudio::getInstance();
//else if (selection == "tab_video")
// screen = OptionsScreenVideo::getInstance();
else if (selection == "tab_video")
screen = OptionsScreenVideo::getInstance();
else if (selection == "tab_players")
screen = TabbedUserScreen::getInstance();
//else if (selection == "tab_controls")
// screen = OptionsScreenInput::getInstance();
else if (selection == "tab_ui")
screen = OptionsScreenUI::getInstance();
else if (selection == "tab_language")
screen = OptionsScreenLanguage::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}

View File

@ -30,6 +30,7 @@
#include "io/file_manager.hpp"
#include "states_screens/options_screen_device.hpp"
#include "states_screens/options_screen_audio.hpp"
#include "states_screens/options_screen_language.hpp"
#include "states_screens/options_screen_video.hpp"
#include "states_screens/options_screen_ui.hpp"
#include "states_screens/dialogs/add_device_dialog.hpp"
@ -154,13 +155,8 @@ void OptionsScreenInput::init()
Screen::init();
RibbonWidget* tabBar = this->getWidget<RibbonWidget>("options_choice");
assert(tabBar != NULL);
tabBar->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
tabBar->select( "tab_controls", PLAYER_ID_GAME_MASTER );
tabBar->getRibbonChildren()[0].setTooltip( _("Graphics") );
tabBar->getRibbonChildren()[1].setTooltip( _("Audio") );
tabBar->getRibbonChildren()[2].setTooltip( _("User Interface") );
tabBar->getRibbonChildren()[3].setTooltip( _("Players") );
/*
DynamicRibbonWidget* devices = this->getWidget<DynamicRibbonWidget>("devices");
assert( devices != NULL );
@ -222,6 +218,8 @@ void OptionsScreenInput::eventCallback(Widget* widget, const std::string& name,
// screen = OptionsScreenInput::getInstance();
else if (selection == "tab_ui")
screen = OptionsScreenUI::getInstance();
else if (selection == "tab_language")
screen = OptionsScreenLanguage::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}

View File

@ -0,0 +1,213 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2009-2015 Marianne Gagnon
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 3
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "states_screens/options_screen_language.hpp"
#include "addons/news_manager.hpp"
#include "audio/sfx_manager.hpp"
#include "audio/sfx_base.hpp"
#include "config/hardware_stats.hpp"
#include "config/player_manager.hpp"
#include "config/user_config.hpp"
#include "font/bold_face.hpp"
#include "font/font_manager.hpp"
#include "font/regular_face.hpp"
#include "graphics/irr_driver.hpp"
#include "guiengine/scalable_font.hpp"
#include "guiengine/screen.hpp"
#include "guiengine/widgets/button_widget.hpp"
#include "guiengine/widgets/check_box_widget.hpp"
#include "guiengine/widgets/dynamic_ribbon_widget.hpp"
#include "guiengine/widgets/label_widget.hpp"
#include "guiengine/widgets/list_widget.hpp"
#include "guiengine/widgets/spinner_widget.hpp"
#include "guiengine/widget.hpp"
#include "io/file_manager.hpp"
#include "online/request_manager.hpp"
#include "states_screens/main_menu_screen.hpp"
#include "states_screens/options_screen_audio.hpp"
#include "states_screens/options_screen_input.hpp"
#include "states_screens/options_screen_ui.hpp"
#include "states_screens/options_screen_video.hpp"
#include "states_screens/state_manager.hpp"
#include "states_screens/user_screen.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <algorithm>
#include <iostream>
#include <sstream>
using namespace GUIEngine;
using namespace Online;
// -----------------------------------------------------------------------------
OptionsScreenLanguage::OptionsScreenLanguage() : Screen("options_language.stkgui")
{
m_inited = false;
} // OptionsScreenLanguage
// -----------------------------------------------------------------------------
void OptionsScreenLanguage::loadedFromFile()
{
m_inited = false;
} // loadedFromFile
// -----------------------------------------------------------------------------
void OptionsScreenLanguage::init()
{
Screen::init();
RibbonWidget* ribbon = getWidget<RibbonWidget>("options_choice");
assert(ribbon != NULL);
ribbon->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
ribbon->select( "tab_language", PLAYER_ID_GAME_MASTER );
// --- language
ListWidget* list_widget = getWidget<ListWidget>("language");
// I18N: in the language choice, to select the same language as the OS
list_widget->addItem("system", _("System Language"));
const std::vector<std::string>* lang_list = translations->getLanguageList();
const int amount = (int)lang_list->size();
// The names need to be sorted alphabetically. Store the 2-letter
// language names in a mapping, to be able to get them from the
// user visible full name.
std::vector<core::stringw> nice_lang_list;
std::map<core::stringw, std::string> nice_name_2_id;
for (int n=0; n<amount; n++)
{
std::string code_name = (*lang_list)[n];
std::string s_name = translations->getLocalizedName(code_name) +
" (" + tinygettext::Language::from_name(code_name).get_language() + ")";
core::stringw nice_name = translations->fribidize(StringUtils::utf8ToWide(s_name));
nice_lang_list.push_back(nice_name);
nice_name_2_id[nice_name] = code_name;
}
std::sort(nice_lang_list.begin(), nice_lang_list.end());
for(unsigned int i=0; i<nice_lang_list.size(); i++)
{
list_widget->addItem(nice_name_2_id[nice_lang_list[i]],
nice_lang_list[i]);
}
list_widget->setSelectionID( list_widget->getItemID(UserConfigParams::m_language) );
// Forbid changing language while in-game, since this crashes (changing the language involves
// tearing down and rebuilding the menu stack. not good when in-game)
list_widget->setActive(StateManager::get()->getGameState() != GUIEngine::INGAME_MENU);
} // init
// -----------------------------------------------------------------------------
void OptionsScreenLanguage::eventCallback(Widget* widget, const std::string& name, const int playerID)
{
#ifndef SERVER_ONLY
if (name == "options_choice")
{
std::string selection = ((RibbonWidget*)widget)->getSelectionIDString(PLAYER_ID_GAME_MASTER);
Screen *screen = NULL;
if (selection == "tab_audio")
screen = OptionsScreenAudio::getInstance();
else if (selection == "tab_video")
screen = OptionsScreenVideo::getInstance();
else if (selection == "tab_players")
screen = TabbedUserScreen::getInstance();
else if (selection == "tab_controls")
screen = OptionsScreenInput::getInstance();
else if (selection == "tab_ui")
screen = OptionsScreenUI::getInstance();
//else if (selection == "tab_language")
// screen = OptionsScreenLanguage::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}
else if(name == "back")
{
StateManager::get()->escapePressed();
}
else if (name == "language")
{
ListWidget* list_widget = getWidget<ListWidget>("language");
std::string selection = list_widget->getSelectionInternalName();
delete translations;
if (selection == "system")
{
#ifdef WIN32
_putenv("LANGUAGE=");
#else
unsetenv("LANGUAGE");
#endif
}
else
{
#ifdef WIN32
std::string s=std::string("LANGUAGE=")+selection.c_str();
_putenv(s.c_str());
#else
setenv("LANGUAGE", selection.c_str(), 1);
#endif
}
translations = new Translations();
// Reload fonts for new translation
GUIEngine::getStateManager()->hardResetAndGoToScreen<MainMenuScreen>();
font_manager->getFont<BoldFace>()->reset();
font_manager->getFont<RegularFace>()->reset();
GUIEngine::getFont()->updateRTL();
GUIEngine::getTitleFont()->updateRTL();
GUIEngine::getSmallFont()->updateRTL();
GUIEngine::getLargeFont()->updateRTL();
GUIEngine::getOutlineFont()->updateRTL();
UserConfigParams::m_language = selection.c_str();
user_config->saveConfig();
OptionsScreenLanguage::getInstance()->push();
}
#endif
} // eventCallback
// -----------------------------------------------------------------------------
void OptionsScreenLanguage::tearDown()
{
Screen::tearDown();
// save changes when leaving screen
user_config->saveConfig();
} // tearDown
// -----------------------------------------------------------------------------
void OptionsScreenLanguage::unloaded()
{
m_inited = false;
} // unloaded
// -----------------------------------------------------------------------------

View File

@ -0,0 +1,59 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2009-2015 Marianne Gagnon
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 3
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef __HEADER_OPTIONS_SCREEN_LANGUAGE_HPP__
#define __HEADER_OPTIONS_SCREEN_LANGUAGE_HPP__
#include <string>
#include "guiengine/screen.hpp"
namespace GUIEngine { class Widget; }
struct Input;
/**
* \brief Graphics options screen
* \ingroup states_screens
*/
class OptionsScreenLanguage : public GUIEngine::Screen, public GUIEngine::ScreenSingleton<OptionsScreenLanguage>
{
OptionsScreenLanguage();
bool m_inited;
public:
friend class GUIEngine::ScreenSingleton<OptionsScreenLanguage>;
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void loadedFromFile() OVERRIDE;
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name,
const int playerID) OVERRIDE;
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void init() OVERRIDE;
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void tearDown() OVERRIDE;
/** \brief implement optional callback from parent class GUIEngine::Screen */
virtual void unloaded() OVERRIDE;
};
#endif

View File

@ -41,6 +41,7 @@
#include "states_screens/main_menu_screen.hpp"
#include "states_screens/options_screen_audio.hpp"
#include "states_screens/options_screen_input.hpp"
#include "states_screens/options_screen_language.hpp"
#include "states_screens/options_screen_video.hpp"
#include "states_screens/state_manager.hpp"
#include "states_screens/user_screen.hpp"
@ -116,13 +117,9 @@ void OptionsScreenUI::init()
Screen::init();
RibbonWidget* ribbon = getWidget<RibbonWidget>("options_choice");
assert(ribbon != NULL);
ribbon->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
ribbon->select( "tab_ui", PLAYER_ID_GAME_MASTER );
ribbon->getRibbonChildren()[0].setTooltip( _("Graphics") );
ribbon->getRibbonChildren()[1].setTooltip( _("Audio") );
ribbon->getRibbonChildren()[3].setTooltip( _("Players") );
ribbon->getRibbonChildren()[4].setTooltip( _("Controls") );
GUIEngine::SpinnerWidget* skinSelector = getWidget<GUIEngine::SpinnerWidget>("skinchoice");
assert( skinSelector != NULL );
@ -195,44 +192,6 @@ void OptionsScreenUI::init()
GUIEngine::reloadSkin();
irr_driver->setMaxTextureSize();
}
// --- language
ListWidget* list_widget = getWidget<ListWidget>("language");
// I18N: in the language choice, to select the same language as the OS
list_widget->addItem("system", _("System Language"));
const std::vector<std::string>* lang_list = translations->getLanguageList();
const int amount = (int)lang_list->size();
// The names need to be sorted alphabetically. Store the 2-letter
// language names in a mapping, to be able to get them from the
// user visible full name.
std::vector<core::stringw> nice_lang_list;
std::map<core::stringw, std::string> nice_name_2_id;
for (int n=0; n<amount; n++)
{
std::string code_name = (*lang_list)[n];
std::string s_name = translations->getLocalizedName(code_name) +
" (" + tinygettext::Language::from_name(code_name).get_language() + ")";
core::stringw nice_name = translations->fribidize(StringUtils::utf8ToWide(s_name));
nice_lang_list.push_back(nice_name);
nice_name_2_id[nice_name] = code_name;
}
std::sort(nice_lang_list.begin(), nice_lang_list.end());
for(unsigned int i=0; i<nice_lang_list.size(); i++)
{
list_widget->addItem(nice_name_2_id[nice_lang_list[i]],
nice_lang_list[i]);
}
list_widget->setSelectionID( list_widget->getItemID(UserConfigParams::m_language) );
// Forbid changing language while in-game, since this crashes (changing the language involves
// tearing down and rebuilding the menu stack. not good when in-game)
list_widget->setActive(StateManager::get()->getGameState() != GUIEngine::INGAME_MENU);
} // init
// -----------------------------------------------------------------------------
@ -255,6 +214,8 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con
screen = OptionsScreenInput::getInstance();
//else if (selection == "tab_ui")
// screen = OptionsScreenUI::getInstance();
else if (selection == "tab_language")
screen = OptionsScreenLanguage::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}
@ -345,49 +306,6 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con
assert( difficulty != NULL );
UserConfigParams::m_per_player_difficulty = difficulty->getState();
}
else if (name == "language")
{
ListWidget* list_widget = getWidget<ListWidget>("language");
std::string selection = list_widget->getSelectionInternalName();
delete translations;
if (selection == "system")
{
#ifdef WIN32
_putenv("LANGUAGE=");
#else
unsetenv("LANGUAGE");
#endif
}
else
{
#ifdef WIN32
std::string s=std::string("LANGUAGE=")+selection.c_str();
_putenv(s.c_str());
#else
setenv("LANGUAGE", selection.c_str(), 1);
#endif
}
translations = new Translations();
// Reload fonts for new translation
GUIEngine::getStateManager()->hardResetAndGoToScreen<MainMenuScreen>();
font_manager->getFont<BoldFace>()->reset();
font_manager->getFont<RegularFace>()->reset();
GUIEngine::getFont()->updateRTL();
GUIEngine::getTitleFont()->updateRTL();
GUIEngine::getSmallFont()->updateRTL();
GUIEngine::getLargeFont()->updateRTL();
GUIEngine::getOutlineFont()->updateRTL();
UserConfigParams::m_language = selection.c_str();
user_config->saveConfig();
OptionsScreenUI::getInstance()->push();
}
#endif
} // eventCallback

View File

@ -32,6 +32,7 @@
#include "states_screens/dialogs/custom_video_settings.hpp"
#include "states_screens/options_screen_audio.hpp"
#include "states_screens/options_screen_input.hpp"
#include "states_screens/options_screen_language.hpp"
#include "states_screens/options_screen_ui.hpp"
#include "states_screens/state_manager.hpp"
#include "states_screens/user_screen.hpp"
@ -200,13 +201,9 @@ void OptionsScreenVideo::init()
m_prev_img_quality = getImageQuality();
RibbonWidget* ribbon = getWidget<RibbonWidget>("options_choice");
assert(ribbon != NULL);
ribbon->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
ribbon->select( "tab_video", PLAYER_ID_GAME_MASTER );
ribbon->getRibbonChildren()[1].setTooltip( _("Audio") );
ribbon->getRibbonChildren()[2].setTooltip( _("User Interface") );
ribbon->getRibbonChildren()[3].setTooltip( _("Players") );
ribbon->getRibbonChildren()[4].setTooltip( _("Controls") );
GUIEngine::ButtonWidget* applyBtn =
getWidget<GUIEngine::ButtonWidget>("apply_resolution");
assert( applyBtn != NULL );
@ -500,6 +497,8 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
screen = OptionsScreenInput::getInstance();
else if (selection == "tab_ui")
screen = OptionsScreenUI::getInstance();
else if (selection == "tab_language")
screen = OptionsScreenLanguage::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}

View File

@ -35,6 +35,7 @@
#include "states_screens/main_menu_screen.hpp"
#include "states_screens/options_screen_audio.hpp"
#include "states_screens/options_screen_input.hpp"
#include "states_screens/options_screen_language.hpp"
#include "states_screens/options_screen_ui.hpp"
#include "states_screens/options_screen_video.hpp"
#include "states_screens/register_screen.hpp"
@ -707,11 +708,8 @@ void TabbedUserScreen::init()
{
RibbonWidget* tab_bar = getWidget<RibbonWidget>("options_choice");
assert(tab_bar != NULL);
tab_bar->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
tab_bar->select("tab_players", PLAYER_ID_GAME_MASTER);
tab_bar->getRibbonChildren()[0].setTooltip( _("Graphics") );
tab_bar->getRibbonChildren()[1].setTooltip( _("Audio") );
tab_bar->getRibbonChildren()[2].setTooltip( _("User Interface") );
tab_bar->getRibbonChildren()[4].setTooltip( _("Controls") );
BaseUserScreen::init();
} // init
@ -737,6 +735,8 @@ void TabbedUserScreen::eventCallback(GUIEngine::Widget* widget,
screen = OptionsScreenInput::getInstance();
else if (selection == "tab_ui")
screen = OptionsScreenUI::getInstance();
else if (selection == "tab_language")
screen = OptionsScreenLanguage::getInstance();
if(screen)
StateManager::get()->replaceTopMostScreen(screen);
}

View File

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

View File

@ -962,6 +962,21 @@ namespace StringUtils
return result;
} //decode64
// ------------------------------------------------------------------------
std::string removeWhitespaces(const std::string& input)
{
std::string out;
for (char ch : input)
{
if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r')
continue;
out += ch;
}
return out;
}
} // namespace StringUtils

View File

@ -246,6 +246,7 @@ namespace StringUtils
std::string findAndReplace(const std::string& source, const std::string& find, const std::string& replace);
std::string base64(const std::vector<uint8_t>& input);
std::vector<uint8_t> decode64(std::string input);
std::string removeWhitespaces(const std::string& input);
} // namespace StringUtils

View File

@ -185,13 +185,15 @@ Translations::Translations() //: m_dictionary_manager("UTF-16")
{
std::set<Language> languages = m_dictionary_manager.get_languages();
// English is always there but won't be found on file system
// English is always there but may be not found on file system
g_language_list.push_back("en");
std::set<Language>::iterator it;
for (it = languages.begin(); it != languages.end(); it++)
for (const Language& language : languages)
{
g_language_list.push_back((*it).str());
if (language.str() == "en")
continue;
g_language_list.push_back(language.str());
}
}
@ -206,8 +208,9 @@ Translations::Translations() //: m_dictionary_manager("UTF-16")
}
else
{
for (std::string line; std::getline(*in, line); )
for (std::string line; std::getline(*in, line, ';'); )
{
line = StringUtils::removeWhitespaces(line);
std::size_t pos = line.find("=");
std::string name = line.substr(0, pos);
std::string localized_name = line.substr(pos + 1);