Skip to content

Commit 149512d

Browse files
committed
Merge https://github.com/supertuxkart/stk-code into command-manager-prototype
2 parents 7226423 + 84dff44 commit 149512d

File tree

395 files changed

+2363
-566
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

395 files changed

+2363
-566
lines changed

data/gui/screens/options/options_ui.stkgui

+10-2
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,20 @@
3434

3535
<!-- ************ SKIN CHOICE ************ -->
3636
<div width="100%" height="fit" layout="horizontal-row">
37-
<spinner id="skinchoice" width="10f" align="center" />
37+
<spinner id="base_skinchoice" width="10f" align="center" />
3838
<label height="100%" x="0" y="0" I18N="In the ui settings" text="Skin"/>
3939
</div>
4040

4141
<spacer width="5" height="2%"/>
4242

43+
<div width="100%" height="fit" layout="horizontal-row">
44+
<spinner id="variant_skinchoice" width="10f" align="center" />
45+
<label height="100%" x="0" y="0" I18N="In the ui settings" text="Skin variant"/>
46+
</div>
47+
48+
<spacer width="5" height="2%"/>
49+
50+
<!-- ************ MISC. CHOICE ************ -->
4351
<div width="100%" height="fit" layout="horizontal-row">
4452
<spinner id="minimap" width="10f" align="center" />
4553
<label height="100%" x="0" y="0" I18N="In the ui settings" text="Minimap"/>
@@ -54,7 +62,7 @@
5462

5563
<spacer width="5" height="2%"/>
5664

57-
<!-- ************ GRAPHICAL EFFECTS SETTINGS ************ -->
65+
<!-- ************ EXTRA UI ELEMENTS SETTINGS ************ -->
5866
<div width="100%" height="fit" layout="horizontal-row">
5967
<spinner id="camera_preset" width="10f" align="center" />
6068
<label height="100%" x="0" y="0" I18N="In the ui settings" text="Camera"/>

data/shaders/sp_skinning.vert

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#ifdef TBO_DISABLED
1+
#ifdef SKINNING_TBO_DISABLED
22
uniform sampler2D skinning_tex;
33
#else
44
uniform samplerBuffer skinning_tex;
@@ -58,7 +58,7 @@ void main()
5858
vec4 skinned_tangent = vec4(0.0);
5959
int skinning_offset = i_misc_data.x;
6060

61-
#ifdef TBO_DISABLED
61+
#ifdef SKINNING_TBO_DISABLED
6262
mat4 joint_matrix =
6363
i_weight[0] * mat4(
6464
texelFetch(skinning_tex, ivec2(0, clamp(i_joint[0] + skinning_offset, 0, MAX_BONES)), 0),

data/shaders/sp_skinning_shadow.vert

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
uniform int layer;
22

3-
#ifdef GL_ES
3+
#ifdef SKINNING_TBO_DISABLED
44
uniform sampler2D skinning_tex;
55
#else
66
uniform samplerBuffer skinning_tex;
@@ -25,7 +25,7 @@ void main()
2525
vec4 skinned_position = vec4(0.0);
2626
int skinning_offset = i_misc_data.x;
2727

28-
#ifdef GL_ES
28+
#ifdef SKINNING_TBO_DISABLED
2929
mat4 joint_matrix =
3030
i_weight[0] * mat4(
3131
texelFetch(skinning_tex, ivec2(0, clamp(i_joint[0] + skinning_offset, 0, MAX_BONES)), 0),

data/skins/SKIN_MAKING.md

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Making a skin
2+
3+
To make your own skin, the easiest way is to start with the files from a standard skin
4+
and modifying them as needed.
5+
6+
There are two types of images : some will be simply stretched as a whole, others will
7+
have non-stretchable borders (you cannot choose which one you must use, it's hardcoded
8+
for each element type; though, as you will see below, for all "advanced stretching" images
9+
you can easily fake "simple stretch")
10+
11+
All elements will have at least 2 properties :
12+
type="X" sets what you're skinning with this entry
13+
image="skinDirectory/imageName.png" sets which image is used for this element
14+
15+
Most elements also support states :
16+
state="neutral"
17+
state="focused"
18+
state="down"
19+
You can thus give different looks for different states. Not all widgets support all states,
20+
see entries and comments below to know what's supported.
21+
Note that checkboxes are an exception and have the following styles :
22+
"neutral+unchecked"
23+
"neutral+checked"
24+
"focused+unchecked"
25+
"focused+checked"
26+
"deactivated+unchecked"
27+
"deactivated+checked"
28+
29+
"Advanced stretching" images are split this way :
30+
31+
+----+--------------------+----+
32+
| | | |
33+
+----+--------------------+----+
34+
| | | |
35+
| | | |
36+
| | | |
37+
+----+--------------------+----+
38+
| | | |
39+
+----+--------------------+----+
40+
41+
The center border will be stretched in all directions. The 4 corners will not stretch at all.
42+
Horizontal borders will stretch horizontally, verticallt borders will stretch vertically.
43+
Use properties left_border="X" right_border="X" top_border="X" bottom_border="X" to specify
44+
the size of each border in pixels (setting all borders to '0' makes the whole image scaled).
45+
46+
In some cases, you may not want vertical stretching to occur (like if the left and right sides
47+
of the image must not be stretched vertically, e.g. for the spinner). In this case, pass
48+
parameter preserve_h_aspect_ratios="true" to make the left and right areas stretch by keeping
49+
their aspect ratio.
50+
51+
Some components may fill the full inner area with stuff; others will only take a smaller
52+
area at the center. To adjust for this, there are properties "hborder_out_portion" and "vborder_out_portion"
53+
that take a float from 0 to 1, representing the percentage of each border that goes out of the widget's
54+
area (this might include stuff like shadows, etc.). The 'h' one is for horizontal borders,
55+
the 'v' one is for vertical borders.
56+
57+
Finnally : the image is split, as shown above, into 9 areas. In some cases, you may not want
58+
all areas to be rendered. Then you can pass parameter areas="body+left+right+top+bottom"
59+
and explicitely specify which parts you want to see. The 4 corner areas are only visible
60+
when the border that intersect at this corner are enabled.
61+
62+
When there is a common="y" with image tag, the image will be loaded only from data/skins/common in stk-code.
63+
64+
Any information not specified in the stkskin.xml file of a theme will be inherited from the specified
65+
base theme, if any. To specify a base theme, add base_theme="themename" to the `<skin>` tag.
66+
67+
To use an icon theme, place the replacement icons (PNG or SVG) into [skin folder]/data/gui/icons
68+
STK will prefer these icons first, if not found it will fallback to icons from the base theme(s).
69+
70+
For TTF specify the list like the following, for normal and digit ttf it will be added at the beginning of the
71+
font list in STK, so those TTF will be used first, and any missing characters will be rendered from the base
72+
theme font list. For color emoji ttf it will replace the base theme color emoji directly. You are not required
73+
to specify all types of ttf.
74+
75+
```
76+
<advanced normal_ttf="xxx.ttf yyy.ttf"
77+
digit_ttf="zzz.ttf"
78+
color_emoji_ttf="www.ttf"/>
79+
```
6.68 KB
Loading
156 KB
Loading
File renamed without changes.

data/skins/cartoon-coal/bubble.png

48.5 KB
Loading

data/skins/cartoon-coal/button.png

6.44 KB
Loading
5.85 KB
Loading

data/skins/cartoon-coal/checkbox.png

1.7 KB
Loading
2.42 KB
Loading
Loading
1.57 KB
Loading
File renamed without changes.
3.17 KB
Loading

data/skins/cartoon-coal/error.png

5.82 KB
Loading
Loading
Loading

data/skins/cartoon-coal/friend.png

5.63 KB
Loading
333 Bytes
Loading

data/skins/cartoon-coal/generic.png

3.57 KB
Loading
Loading
1.24 KB
Loading
4.83 KB
Loading
4.58 KB
Loading

data/skins/cartoon-coal/licenses.txt

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: SuperTuxKart
3+
Upstream-Contact:
4+
Marianne Gagnon <[email protected]>
5+
Jean-Manuel Clémençon <[email protected]>
6+
Source: https://supertuxkart.net
7+
8+
Files:
9+
glass_iconhighlight_focus.png
10+
bubble.png
11+
Copyright: ???
12+
License: CC-BY-SA 3.0
13+
Comment: From peach skin
14+
15+
Files:
16+
src/Inter-UI-Black.ttf
17+
Copyright: Copyright 2018 The Inter UI project authors
18+
License: OFL 1.1 (SIL Open Font License, Version 1.1)
19+
Comment: Specifically using version 2.5 of the font, later versions have a different look
20+
21+
Files:
22+
src/NotoSans*
23+
Copyright: Copyright 2015-2016 Google Inc. All Rights Reserved.
24+
License: This Font Software is licensed under the SIL Open Font License, Version 1.1. This Font Software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the SIL Open Font License for the specific language, permissions and limitations governing your use of this Font Software.
25+
Comment: Bold/Black versions of the language-specific fonts used in the other skins
26+
27+
Files: *
28+
Copyright: Copyright 2018-2020 LCP and QwertyChouskie
29+
License: CC-BY-SA 4.0
30+
Comment: Original style, most icons, and some elements by LCP, skin finished by QwertyChouskie
4.75 KB
Loading
4.54 KB
Loading

data/skins/cartoon-coal/rsection.png

350 Bytes
Loading
250 Bytes
Loading
656 Bytes
Loading
217 Bytes
Loading

data/skins/cartoon-coal/section.png

366 Bytes
Loading

data/skins/cartoon-coal/select.png

175 Bytes
Loading

data/skins/cartoon-coal/spinner.png

4.02 KB
Loading
4.02 KB
Loading
200 Bytes
Loading
3.9 KB
Loading

0 commit comments

Comments
 (0)