mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge branch 'master' of http://github.com/oy/teeworlds
Conflicts: data/languages/russian.txt readme.txt src/game/variables.h
This commit is contained in:
commit
1d9190fd5b
|
@ -4,9 +4,24 @@
|
||||||
%d of %d servers, %d players
|
%d of %d servers, %d players
|
||||||
== %d od %d server(a), %d igrač(a)
|
== %d od %d server(a), %d igrač(a)
|
||||||
|
|
||||||
|
%d%% loaded
|
||||||
|
== Učitano %d%%
|
||||||
|
|
||||||
%ds left
|
%ds left
|
||||||
== Još %ds
|
== Još %ds
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
== Preostalo: %i min.
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
== Preostalo: %i min.
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
== Preostalo: %i sek.
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
== Preostalo: %i sek.
|
||||||
|
|
||||||
Abort
|
Abort
|
||||||
== Prekini
|
== Prekini
|
||||||
|
|
||||||
|
@ -22,12 +37,21 @@ Alpha
|
||||||
Always show name plates
|
Always show name plates
|
||||||
== Uvijek prikaži imena igrača
|
== Uvijek prikaži imena igrača
|
||||||
|
|
||||||
|
Are you sure that you want to delete the demo?
|
||||||
|
== Jeste li sigurni da želite obrisati demo-snimak?
|
||||||
|
|
||||||
Are you sure that you want to quit?
|
Are you sure that you want to quit?
|
||||||
== Jeste li sigurni da želite izići?
|
== Jeste li sigurni da želite izići?
|
||||||
|
|
||||||
As this is the first time you launch the game, please enter your nick name below. It's recommended that you check the settings to adjust them to your liking before joining a server.
|
As this is the first time you launch the game, please enter your nick name below. It's recommended that you check the settings to adjust them to your liking before joining a server.
|
||||||
== Pošto prvi put pokrećete igru, molimo da ispod unesete Vaš nadimak (nick). Preporučujemo da provjerite postavke i podesite ih prema Vašem ukusu prije nego se konektujete na server.
|
== Pošto prvi put pokrećete igru, molimo da ispod unesete Vaš nadimak (nick). Preporučujemo da provjerite postavke i podesite ih prema Vašem ukusu prije nego se konektujete na server.
|
||||||
|
|
||||||
|
Automatically record demos
|
||||||
|
== Automatski demo-snimci
|
||||||
|
|
||||||
|
Automatically take game over screenshot
|
||||||
|
== Automatski screenshot po završetku igre
|
||||||
|
|
||||||
Blue team
|
Blue team
|
||||||
== Plavi tim
|
== Plavi tim
|
||||||
|
|
||||||
|
@ -76,6 +100,9 @@ Custom colors
|
||||||
Delete
|
Delete
|
||||||
== Obriši
|
== Obriši
|
||||||
|
|
||||||
|
Delete demo
|
||||||
|
== Brisanje demo-snimka
|
||||||
|
|
||||||
Demos
|
Demos
|
||||||
== Demo
|
== Demo
|
||||||
|
|
||||||
|
@ -127,6 +154,9 @@ Filter
|
||||||
Fire
|
Fire
|
||||||
== Pucanje
|
== Pucanje
|
||||||
|
|
||||||
|
Folder
|
||||||
|
== Direktorij
|
||||||
|
|
||||||
Force vote
|
Force vote
|
||||||
== Obavezno glasanje
|
== Obavezno glasanje
|
||||||
|
|
||||||
|
@ -181,6 +211,9 @@ Info
|
||||||
Internet
|
Internet
|
||||||
== Internet
|
== Internet
|
||||||
|
|
||||||
|
Invalid Demo
|
||||||
|
== Neispravan demo-snimak
|
||||||
|
|
||||||
Join blue
|
Join blue
|
||||||
== U plavi tim
|
== U plavi tim
|
||||||
|
|
||||||
|
@ -214,6 +247,12 @@ MOTD
|
||||||
Map
|
Map
|
||||||
== Mapa
|
== Mapa
|
||||||
|
|
||||||
|
Max Screenshots
|
||||||
|
== Maksimalan broj screenshot-a
|
||||||
|
|
||||||
|
Max demos
|
||||||
|
== Maximalan broj demo-snimaka
|
||||||
|
|
||||||
Maximum ping:
|
Maximum ping:
|
||||||
== Maksimalan ping:
|
== Maksimalan ping:
|
||||||
|
|
||||||
|
@ -262,6 +301,12 @@ No servers match your filter criteria
|
||||||
Ok
|
Ok
|
||||||
== OK
|
== OK
|
||||||
|
|
||||||
|
Open
|
||||||
|
== Otvori
|
||||||
|
|
||||||
|
Parent Folder
|
||||||
|
== Prethodni direktorij
|
||||||
|
|
||||||
Password
|
Password
|
||||||
== Lozinka
|
== Lozinka
|
||||||
|
|
||||||
|
@ -275,7 +320,7 @@ Pistol
|
||||||
== Pištolj
|
== Pištolj
|
||||||
|
|
||||||
Play
|
Play
|
||||||
== Pokreni
|
== Pogledaj
|
||||||
|
|
||||||
Player
|
Player
|
||||||
== Igrač
|
== Igrač
|
||||||
|
@ -298,6 +343,9 @@ Quick search:
|
||||||
Quit
|
Quit
|
||||||
== Izlaz
|
== Izlaz
|
||||||
|
|
||||||
|
Record demo
|
||||||
|
== Snimi demo
|
||||||
|
|
||||||
Red team
|
Red team
|
||||||
== Crveni tim
|
== Crveni tim
|
||||||
|
|
||||||
|
@ -415,6 +463,9 @@ The server is running a non-standard tuning on a pure game type.
|
||||||
Time limit
|
Time limit
|
||||||
== Max. vremena
|
== Max. vremena
|
||||||
|
|
||||||
|
Time limit: %d min
|
||||||
|
== Max. vremena: %d min.
|
||||||
|
|
||||||
Try again
|
Try again
|
||||||
== Pokušaj ponovo
|
== Pokušaj ponovo
|
||||||
|
|
||||||
|
@ -462,9 +513,6 @@ Your skin
|
||||||
|
|
||||||
##### needs translation #####
|
##### needs translation #####
|
||||||
|
|
||||||
%d%% loaded
|
|
||||||
==
|
|
||||||
|
|
||||||
%s Right click for context menu.
|
%s Right click for context menu.
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -504,18 +552,9 @@ Append
|
||||||
Append map
|
Append map
|
||||||
==
|
==
|
||||||
|
|
||||||
Are you sure that you want to delete the demo?
|
|
||||||
==
|
|
||||||
|
|
||||||
Aspect ratio
|
Aspect ratio
|
||||||
==
|
==
|
||||||
|
|
||||||
Automatically record demos
|
|
||||||
==
|
|
||||||
|
|
||||||
Automatically take game over screenshot
|
|
||||||
==
|
|
||||||
|
|
||||||
Blue value of the envelope
|
Blue value of the envelope
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -582,9 +621,6 @@ Decrease
|
||||||
Decrease animation speed
|
Decrease animation speed
|
||||||
==
|
==
|
||||||
|
|
||||||
Delete demo
|
|
||||||
==
|
|
||||||
|
|
||||||
Delete group
|
Delete group
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -642,9 +678,6 @@ File: %s
|
||||||
Filename:
|
Filename:
|
||||||
==
|
==
|
||||||
|
|
||||||
Folder
|
|
||||||
==
|
|
||||||
|
|
||||||
Green value of the envelope
|
Green value of the envelope
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -669,9 +702,6 @@ Increase
|
||||||
Increase animation speed
|
Increase animation speed
|
||||||
==
|
==
|
||||||
|
|
||||||
Invalid Demo
|
|
||||||
==
|
|
||||||
|
|
||||||
Layers
|
Layers
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -702,10 +732,7 @@ Make collision
|
||||||
Make external
|
Make external
|
||||||
==
|
==
|
||||||
|
|
||||||
Max Screenshots
|
Name plates size
|
||||||
==
|
|
||||||
|
|
||||||
Max demos
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Name:
|
Name:
|
||||||
|
@ -726,9 +753,6 @@ None
|
||||||
Normal animation speed
|
Normal animation speed
|
||||||
==
|
==
|
||||||
|
|
||||||
Open
|
|
||||||
==
|
|
||||||
|
|
||||||
Opens a map and adds everything from that map to the current one
|
Opens a map and adds everything from that map to the current one
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -744,9 +768,6 @@ Para X
|
||||||
Para Y
|
Para Y
|
||||||
==
|
==
|
||||||
|
|
||||||
Parent Folder
|
|
||||||
==
|
|
||||||
|
|
||||||
Pos X
|
Pos X
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -780,9 +801,6 @@ REC
|
||||||
Reason:
|
Reason:
|
||||||
==
|
==
|
||||||
|
|
||||||
Record demo
|
|
||||||
==
|
|
||||||
|
|
||||||
Red value of the envelope
|
Red value of the envelope
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -867,9 +885,6 @@ Switch curve type
|
||||||
Tiles
|
Tiles
|
||||||
==
|
==
|
||||||
|
|
||||||
Time limit: %d min
|
|
||||||
==
|
|
||||||
|
|
||||||
Toggle group visibility
|
Toggle group visibility
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -945,23 +960,8 @@ ZO
|
||||||
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
||||||
==
|
==
|
||||||
|
|
||||||
left
|
|
||||||
==
|
|
||||||
|
|
||||||
minute
|
|
||||||
==
|
|
||||||
|
|
||||||
minutes
|
|
||||||
==
|
|
||||||
|
|
||||||
no limit
|
no limit
|
||||||
==
|
==
|
||||||
|
|
||||||
second
|
|
||||||
==
|
|
||||||
|
|
||||||
seconds
|
|
||||||
==
|
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
||||||
|
|
|
@ -441,6 +441,18 @@ Your skin
|
||||||
%ds left
|
%ds left
|
||||||
==
|
==
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
==
|
||||||
|
|
||||||
%s Right click for context menu.
|
%s Right click for context menu.
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -696,6 +708,9 @@ Max Screenshots
|
||||||
Max demos
|
Max demos
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Name plates size
|
||||||
|
==
|
||||||
|
|
||||||
Name:
|
Name:
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -945,23 +960,8 @@ ZO
|
||||||
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
||||||
==
|
==
|
||||||
|
|
||||||
left
|
|
||||||
==
|
|
||||||
|
|
||||||
minute
|
|
||||||
==
|
|
||||||
|
|
||||||
minutes
|
|
||||||
==
|
|
||||||
|
|
||||||
no limit
|
no limit
|
||||||
==
|
==
|
||||||
|
|
||||||
second
|
|
||||||
==
|
|
||||||
|
|
||||||
seconds
|
|
||||||
==
|
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
##### translated strings #####
|
##### translated strings #####
|
||||||
|
|
||||||
%d of %d servers, %d players
|
%d of %d servers, %d players
|
||||||
|
@ -417,9 +418,6 @@ Layers
|
||||||
Left
|
Left
|
||||||
== Links
|
== Links
|
||||||
|
|
||||||
left
|
|
||||||
== nog
|
|
||||||
|
|
||||||
Left mouse button to move. Hold shift to move pivot. Hold ctrl to rotate.
|
Left mouse button to move. Hold shift to move pivot. Hold ctrl to rotate.
|
||||||
== Linkermuisknop om te bewegen. Houd shift ingedrukt om te roteren. Houd ctrl ingedrukt om te draaien.
|
== Linkermuisknop om te bewegen. Houd shift ingedrukt om te roteren. Houd ctrl ingedrukt om te draaien.
|
||||||
|
|
||||||
|
@ -457,21 +455,15 @@ Make external
|
||||||
Map
|
Map
|
||||||
== Kaart
|
== Kaart
|
||||||
|
|
||||||
Max demos
|
|
||||||
== Maximaal aantal demo's
|
|
||||||
|
|
||||||
Max Screenshots
|
Max Screenshots
|
||||||
== Maximaal aantal schermafbeeldingen
|
== Maximaal aantal schermafbeeldingen
|
||||||
|
|
||||||
|
Max demos
|
||||||
|
== Maximaal aantal demo's
|
||||||
|
|
||||||
Maximum ping:
|
Maximum ping:
|
||||||
== Hoogste ping:
|
== Hoogste ping:
|
||||||
|
|
||||||
minute
|
|
||||||
== minuut
|
|
||||||
|
|
||||||
minutes
|
|
||||||
== minuten
|
|
||||||
|
|
||||||
Miscellaneous
|
Miscellaneous
|
||||||
== Diverse
|
== Diverse
|
||||||
|
|
||||||
|
@ -517,9 +509,6 @@ Nickname
|
||||||
No
|
No
|
||||||
== Nee
|
== Nee
|
||||||
|
|
||||||
no limit
|
|
||||||
== ongelimiteerd
|
|
||||||
|
|
||||||
No password
|
No password
|
||||||
== Geen wachtwoord
|
== Geen wachtwoord
|
||||||
|
|
||||||
|
@ -733,12 +722,6 @@ Scoreboard
|
||||||
Screenshot
|
Screenshot
|
||||||
== Schermafbeelding
|
== Schermafbeelding
|
||||||
|
|
||||||
second
|
|
||||||
== seconde
|
|
||||||
|
|
||||||
seconds
|
|
||||||
== seconden
|
|
||||||
|
|
||||||
Select group. Right click for properties.
|
Select group. Right click for properties.
|
||||||
== Kies een groep. Rechtermuisknop voor eigenschappen.
|
== Kies een groep. Rechtermuisknop voor eigenschappen.
|
||||||
|
|
||||||
|
@ -961,8 +944,26 @@ ZO
|
||||||
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
||||||
== [ctrl+p] Test grenzen. Deze grenzen laten zien wat een speler maximaal kan zien.
|
== [ctrl+p] Test grenzen. Deze grenzen laten zien wat een speler maximaal kan zien.
|
||||||
|
|
||||||
|
no limit
|
||||||
|
== ongelimiteerd
|
||||||
|
|
||||||
##### needs translation #####
|
##### needs translation #####
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
==
|
||||||
|
|
||||||
|
Name plates size
|
||||||
|
==
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -465,6 +465,18 @@ Your skin
|
||||||
%d%% loaded
|
%d%% loaded
|
||||||
==
|
==
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
==
|
||||||
|
|
||||||
%s Right click for context menu.
|
%s Right click for context menu.
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -708,6 +720,9 @@ Max Screenshots
|
||||||
Max demos
|
Max demos
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Name plates size
|
||||||
|
==
|
||||||
|
|
||||||
Name:
|
Name:
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -945,23 +960,8 @@ ZO
|
||||||
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
||||||
==
|
==
|
||||||
|
|
||||||
left
|
|
||||||
==
|
|
||||||
|
|
||||||
minute
|
|
||||||
==
|
|
||||||
|
|
||||||
minutes
|
|
||||||
==
|
|
||||||
|
|
||||||
no limit
|
no limit
|
||||||
==
|
==
|
||||||
|
|
||||||
second
|
|
||||||
==
|
|
||||||
|
|
||||||
seconds
|
|
||||||
==
|
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,18 @@
|
||||||
%ds left
|
%ds left
|
||||||
== %ds a quitté
|
== %ds a quitté
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
== %i minute restante
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
== %i minutes restantes
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
== %i seconde restante
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
== %i secondes restantes
|
||||||
|
|
||||||
Abort
|
Abort
|
||||||
== Annuler
|
== Annuler
|
||||||
|
|
||||||
|
@ -55,6 +67,12 @@ Are you sure that you want to quit?
|
||||||
As this is the first time you launch the game, please enter your nick name below. It's recommended that you check the settings to adjust them to your liking before joining a server.
|
As this is the first time you launch the game, please enter your nick name below. It's recommended that you check the settings to adjust them to your liking before joining a server.
|
||||||
== Comme c'est la première fois que vous lancez le jeu, veuillez entrer votre pseudonyme ci-dessous. Vous devriez vérifier les réglages et les ajuster avant de rejoindre un serveur.
|
== Comme c'est la première fois que vous lancez le jeu, veuillez entrer votre pseudonyme ci-dessous. Vous devriez vérifier les réglages et les ajuster avant de rejoindre un serveur.
|
||||||
|
|
||||||
|
Automatically record demos
|
||||||
|
== Enregistrer automatiquement une démo
|
||||||
|
|
||||||
|
Automatically take game over screenshot
|
||||||
|
== Faire automatiquement une capture d'écran à la fin de la partie
|
||||||
|
|
||||||
Blue team
|
Blue team
|
||||||
== Équipe bleue
|
== Équipe bleue
|
||||||
|
|
||||||
|
@ -67,6 +85,12 @@ Body
|
||||||
Border
|
Border
|
||||||
== Bordure
|
== Bordure
|
||||||
|
|
||||||
|
CCW
|
||||||
|
== SAH
|
||||||
|
|
||||||
|
CW
|
||||||
|
== SH
|
||||||
|
|
||||||
Call vote
|
Call vote
|
||||||
== Voter
|
== Voter
|
||||||
|
|
||||||
|
@ -214,6 +238,9 @@ Feet
|
||||||
File
|
File
|
||||||
== Fichier
|
== Fichier
|
||||||
|
|
||||||
|
File: %s
|
||||||
|
== Fichier : %s
|
||||||
|
|
||||||
Filename:
|
Filename:
|
||||||
== Nom du fichier:
|
== Nom du fichier:
|
||||||
|
|
||||||
|
@ -259,6 +286,9 @@ Grenade
|
||||||
Group
|
Group
|
||||||
== Groupe
|
== Groupe
|
||||||
|
|
||||||
|
HD
|
||||||
|
== HD
|
||||||
|
|
||||||
Hammer
|
Hammer
|
||||||
== Maillet
|
== Maillet
|
||||||
|
|
||||||
|
@ -357,6 +387,12 @@ Make external
|
||||||
Map
|
Map
|
||||||
== Carte
|
== Carte
|
||||||
|
|
||||||
|
Max Screenshots
|
||||||
|
== Nombre max de captures d'écran
|
||||||
|
|
||||||
|
Max demos
|
||||||
|
== Nombre max de démos
|
||||||
|
|
||||||
Maximum ping:
|
Maximum ping:
|
||||||
== Ping maximum:
|
== Ping maximum:
|
||||||
|
|
||||||
|
@ -723,6 +759,9 @@ ZO
|
||||||
[NumPad-] Zoom out
|
[NumPad-] Zoom out
|
||||||
== [ClavierNum-] Dézoomer
|
== [ClavierNum-] Dézoomer
|
||||||
|
|
||||||
|
no limit
|
||||||
|
== pas de limite
|
||||||
|
|
||||||
##### needs translation #####
|
##### needs translation #####
|
||||||
|
|
||||||
%s Right click for context menu.
|
%s Right click for context menu.
|
||||||
|
@ -746,21 +785,9 @@ Alpha value of the envelope
|
||||||
Aspect ratio
|
Aspect ratio
|
||||||
==
|
==
|
||||||
|
|
||||||
Automatically record demos
|
|
||||||
==
|
|
||||||
|
|
||||||
Automatically take game over screenshot
|
|
||||||
==
|
|
||||||
|
|
||||||
Blue value of the envelope
|
Blue value of the envelope
|
||||||
==
|
==
|
||||||
|
|
||||||
CCW
|
|
||||||
==
|
|
||||||
|
|
||||||
CW
|
|
||||||
==
|
|
||||||
|
|
||||||
Clip H
|
Clip H
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -806,9 +833,6 @@ Enable/disable layer for saving
|
||||||
Envelopes
|
Envelopes
|
||||||
==
|
==
|
||||||
|
|
||||||
File: %s
|
|
||||||
==
|
|
||||||
|
|
||||||
Green value of the envelope
|
Green value of the envelope
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -824,10 +848,7 @@ Left mouse button to move. Hold shift to move the texture.
|
||||||
Left mouse to drag. Hold ctrl to be more precise. Hold shift to alter time point aswell. Right click to delete.
|
Left mouse to drag. Hold ctrl to be more precise. Hold shift to alter time point aswell. Right click to delete.
|
||||||
==
|
==
|
||||||
|
|
||||||
Max Screenshots
|
Name plates size
|
||||||
==
|
|
||||||
|
|
||||||
Max demos
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Next Envelope
|
Next Envelope
|
||||||
|
@ -947,24 +968,6 @@ Y-axis of the envelope
|
||||||
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
||||||
==
|
==
|
||||||
|
|
||||||
left
|
|
||||||
==
|
|
||||||
|
|
||||||
minute
|
|
||||||
==
|
|
||||||
|
|
||||||
minutes
|
|
||||||
==
|
|
||||||
|
|
||||||
no limit
|
|
||||||
==
|
|
||||||
|
|
||||||
second
|
|
||||||
==
|
|
||||||
|
|
||||||
seconds
|
|
||||||
==
|
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -943,26 +943,26 @@ ZO
|
||||||
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
||||||
== [Strg+P] Schaltet Testrahmen um. Diese Rahmen zeigen, wie viel der Spieler höchstens sehen kann.
|
== [Strg+P] Schaltet Testrahmen um. Diese Rahmen zeigen, wie viel der Spieler höchstens sehen kann.
|
||||||
|
|
||||||
left
|
|
||||||
== noch
|
|
||||||
|
|
||||||
minute
|
|
||||||
== Minute
|
|
||||||
|
|
||||||
minutes
|
|
||||||
== Minuten
|
|
||||||
|
|
||||||
no limit
|
no limit
|
||||||
== Keine Begrenzung
|
== Keine Begrenzung
|
||||||
|
|
||||||
second
|
|
||||||
== Sekunde
|
|
||||||
|
|
||||||
seconds
|
|
||||||
== Sekunden
|
|
||||||
|
|
||||||
##### needs translation #####
|
##### needs translation #####
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
==
|
||||||
|
|
||||||
|
Name plates size
|
||||||
|
==
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
||||||
Loading DDRace Client
|
Loading DDRace Client
|
||||||
|
|
|
@ -435,6 +435,18 @@ You must restart the game for all settings to take effect.
|
||||||
%ds left
|
%ds left
|
||||||
==
|
==
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
==
|
||||||
|
|
||||||
%s Right click for context menu.
|
%s Right click for context menu.
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -693,6 +705,9 @@ Max Screenshots
|
||||||
Max demos
|
Max demos
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Name plates size
|
||||||
|
==
|
||||||
|
|
||||||
Name:
|
Name:
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -945,23 +960,8 @@ ZO
|
||||||
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
||||||
==
|
==
|
||||||
|
|
||||||
left
|
|
||||||
==
|
|
||||||
|
|
||||||
minute
|
|
||||||
==
|
|
||||||
|
|
||||||
minutes
|
|
||||||
==
|
|
||||||
|
|
||||||
no limit
|
no limit
|
||||||
==
|
==
|
||||||
|
|
||||||
second
|
|
||||||
==
|
|
||||||
|
|
||||||
seconds
|
|
||||||
==
|
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
||||||
|
|
|
@ -783,6 +783,18 @@ ZO
|
||||||
%d%% loaded
|
%d%% loaded
|
||||||
==
|
==
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
==
|
||||||
|
|
||||||
Alpha value of the envelope
|
Alpha value of the envelope
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -864,6 +876,9 @@ Max Screenshots
|
||||||
Max demos
|
Max demos
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Name plates size
|
||||||
|
==
|
||||||
|
|
||||||
New folder
|
New folder
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -945,23 +960,8 @@ Y-axis of the envelope
|
||||||
[HOME] Restore map focus
|
[HOME] Restore map focus
|
||||||
==
|
==
|
||||||
|
|
||||||
left
|
|
||||||
==
|
|
||||||
|
|
||||||
minute
|
|
||||||
==
|
|
||||||
|
|
||||||
minutes
|
|
||||||
==
|
|
||||||
|
|
||||||
no limit
|
no limit
|
||||||
==
|
==
|
||||||
|
|
||||||
second
|
|
||||||
==
|
|
||||||
|
|
||||||
seconds
|
|
||||||
==
|
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
||||||
|
|
|
@ -462,6 +462,18 @@ Your skin
|
||||||
%d%% loaded
|
%d%% loaded
|
||||||
==
|
==
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
==
|
||||||
|
|
||||||
%s Right click for context menu.
|
%s Right click for context menu.
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -708,6 +720,9 @@ Max Screenshots
|
||||||
Max demos
|
Max demos
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Name plates size
|
||||||
|
==
|
||||||
|
|
||||||
Name:
|
Name:
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -945,23 +960,8 @@ ZO
|
||||||
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
||||||
==
|
==
|
||||||
|
|
||||||
left
|
|
||||||
==
|
|
||||||
|
|
||||||
minute
|
|
||||||
==
|
|
||||||
|
|
||||||
minutes
|
|
||||||
==
|
|
||||||
|
|
||||||
no limit
|
no limit
|
||||||
==
|
==
|
||||||
|
|
||||||
second
|
|
||||||
==
|
|
||||||
|
|
||||||
seconds
|
|
||||||
==
|
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
||||||
|
|
|
@ -795,6 +795,18 @@ ZO
|
||||||
|
|
||||||
##### needs translation #####
|
##### needs translation #####
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
==
|
||||||
|
|
||||||
Alpha value of the envelope
|
Alpha value of the envelope
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -870,6 +882,9 @@ Max Screenshots
|
||||||
Max demos
|
Max demos
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Name plates size
|
||||||
|
==
|
||||||
|
|
||||||
New folder
|
New folder
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -945,24 +960,9 @@ Y-axis of the envelope
|
||||||
[HOME] Restore map focus
|
[HOME] Restore map focus
|
||||||
==
|
==
|
||||||
|
|
||||||
left
|
|
||||||
==
|
|
||||||
|
|
||||||
minute
|
|
||||||
==
|
|
||||||
|
|
||||||
minutes
|
|
||||||
==
|
|
||||||
|
|
||||||
no limit
|
no limit
|
||||||
==
|
==
|
||||||
|
|
||||||
second
|
|
||||||
==
|
|
||||||
|
|
||||||
seconds
|
|
||||||
==
|
|
||||||
|
|
||||||
==
|
==
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
|
@ -465,6 +465,18 @@ Your skin
|
||||||
%d%% loaded
|
%d%% loaded
|
||||||
==
|
==
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
==
|
||||||
|
|
||||||
%s Right click for context menu.
|
%s Right click for context menu.
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -708,6 +720,9 @@ Max Screenshots
|
||||||
Max demos
|
Max demos
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Name plates size
|
||||||
|
==
|
||||||
|
|
||||||
Name:
|
Name:
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -945,23 +960,8 @@ ZO
|
||||||
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
||||||
==
|
==
|
||||||
|
|
||||||
left
|
|
||||||
==
|
|
||||||
|
|
||||||
minute
|
|
||||||
==
|
|
||||||
|
|
||||||
minutes
|
|
||||||
==
|
|
||||||
|
|
||||||
no limit
|
no limit
|
||||||
==
|
==
|
||||||
|
|
||||||
second
|
|
||||||
==
|
|
||||||
|
|
||||||
seconds
|
|
||||||
==
|
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
||||||
|
|
|
@ -435,6 +435,18 @@ You must restart the game for all settings to take effect.
|
||||||
%ds left
|
%ds left
|
||||||
==
|
==
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
==
|
||||||
|
|
||||||
%s Right click for context menu.
|
%s Right click for context menu.
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -693,6 +705,9 @@ Max Screenshots
|
||||||
Max demos
|
Max demos
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Name plates size
|
||||||
|
==
|
||||||
|
|
||||||
Name:
|
Name:
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -945,23 +960,8 @@ ZO
|
||||||
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.
|
||||||
==
|
==
|
||||||
|
|
||||||
left
|
|
||||||
==
|
|
||||||
|
|
||||||
minute
|
|
||||||
==
|
|
||||||
|
|
||||||
minutes
|
|
||||||
==
|
|
||||||
|
|
||||||
no limit
|
no limit
|
||||||
==
|
==
|
||||||
|
|
||||||
second
|
|
||||||
==
|
|
||||||
|
|
||||||
seconds
|
|
||||||
==
|
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
||||||
|
|
|
@ -849,6 +849,18 @@ ZO
|
||||||
|
|
||||||
##### needs translation #####
|
##### needs translation #####
|
||||||
|
|
||||||
|
%i minute left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i minutes left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i second left
|
||||||
|
==
|
||||||
|
|
||||||
|
%i seconds left
|
||||||
|
==
|
||||||
|
|
||||||
Alpha value of the envelope
|
Alpha value of the envelope
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -900,6 +912,9 @@ Max Screenshots
|
||||||
Max demos
|
Max demos
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Name plates size
|
||||||
|
==
|
||||||
|
|
||||||
Para X
|
Para X
|
||||||
==
|
==
|
||||||
|
|
||||||
|
@ -945,23 +960,8 @@ Y-axis of the envelope
|
||||||
[HOME] Restore map focus
|
[HOME] Restore map focus
|
||||||
==
|
==
|
||||||
|
|
||||||
left
|
|
||||||
==
|
|
||||||
|
|
||||||
minute
|
|
||||||
==
|
|
||||||
|
|
||||||
minutes
|
|
||||||
==
|
|
||||||
|
|
||||||
no limit
|
no limit
|
||||||
==
|
==
|
||||||
|
|
||||||
second
|
|
||||||
==
|
|
||||||
|
|
||||||
seconds
|
|
||||||
==
|
|
||||||
|
|
||||||
##### old translations #####
|
##### old translations #####
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Copyright (C) 2007-2010 Magnus Auvinen
|
Copyright (C) 2007-2011 Magnus Auvinen
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -3,7 +3,7 @@ This is a mod (DDRace) and it's for the game Teeworlds and it's being maintained
|
||||||
DDRace has been rebuilt from scratch by btd based on DDRace-Beta to Teeworlds Trunk 0.5, GreYFoX@GTi helped re-adding features once it was Trunk, you can track this in the commit log.
|
DDRace has been rebuilt from scratch by btd based on DDRace-Beta to Teeworlds Trunk 0.5, GreYFoX@GTi helped re-adding features once it was Trunk, you can track this in the commit log.
|
||||||
|
|
||||||
Teeworlds README is as follows:
|
Teeworlds README is as follows:
|
||||||
Copyright (c) 2010 Magnus Auvinen
|
Copyright (c) 2011 Magnus Auvinen
|
||||||
|
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
|
|
|
@ -539,7 +539,7 @@ void CServerBrowser::Refresh(int Type)
|
||||||
|
|
||||||
void CServerBrowser::RequestImpl(const NETADDR &Addr, CServerEntry *pEntry) const
|
void CServerBrowser::RequestImpl(const NETADDR &Addr, CServerEntry *pEntry) const
|
||||||
{
|
{
|
||||||
//unsigned char buffer[sizeof(SERVERBROWSE_GETINFO)+1];
|
unsigned char Buffer[sizeof(SERVERBROWSE_GETINFO)+1];
|
||||||
CNetChunk Packet;
|
CNetChunk Packet;
|
||||||
|
|
||||||
if(g_Config.m_Debug)
|
if(g_Config.m_Debug)
|
||||||
|
@ -551,19 +551,15 @@ void CServerBrowser::RequestImpl(const NETADDR &Addr, CServerEntry *pEntry) cons
|
||||||
m_pConsole->Print(IConsole::OUTPUT_LEVEL_DEBUG, "client_srvbrowse", aBuf);
|
m_pConsole->Print(IConsole::OUTPUT_LEVEL_DEBUG, "client_srvbrowse", aBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*mem_copy(buffer, SERVERBROWSE_GETINFO, sizeof(SERVERBROWSE_GETINFO));
|
mem_copy(Buffer, SERVERBROWSE_GETINFO, sizeof(SERVERBROWSE_GETINFO));
|
||||||
buffer[sizeof(SERVERBROWSE_GETINFO)] = current_token;*/
|
Buffer[sizeof(SERVERBROWSE_GETINFO)] = m_CurrentToken;
|
||||||
|
|
||||||
Packet.m_ClientID = -1;
|
Packet.m_ClientID = -1;
|
||||||
Packet.m_Address = Addr;
|
Packet.m_Address = Addr;
|
||||||
Packet.m_Flags = NETSENDFLAG_CONNLESS;
|
Packet.m_Flags = NETSENDFLAG_CONNLESS;
|
||||||
/*p.data_size = sizeof(buffer);
|
Packet.m_DataSize = sizeof(Buffer);
|
||||||
p.data = buffer;
|
Packet.m_pData = Buffer;
|
||||||
netclient_send(net, &p);*/
|
|
||||||
|
|
||||||
// send old request style aswell
|
|
||||||
Packet.m_DataSize = sizeof(SERVERBROWSE_OLD_GETINFO);
|
|
||||||
Packet.m_pData = SERVERBROWSE_OLD_GETINFO;
|
|
||||||
m_pNetClient->Send(&Packet);
|
m_pNetClient->Send(&Packet);
|
||||||
|
|
||||||
if(pEntry)
|
if(pEntry)
|
||||||
|
|
|
@ -353,9 +353,12 @@ class CTextRender : public IEngineTextRender
|
||||||
UploadGlyph(pSizeData, 1, SlotId, Chr, ms_aGlyphDataOutlined);
|
UploadGlyph(pSizeData, 1, SlotId, Chr, ms_aGlyphDataOutlined);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
for(int i = OutlineThickness; i > 0; i-=2)
|
||||||
{
|
{
|
||||||
Grow(ms_aGlyphData, ms_aGlyphDataOutlined, SlotW, SlotH);
|
Grow(ms_aGlyphData, ms_aGlyphDataOutlined, SlotW, SlotH);
|
||||||
Grow(ms_aGlyphDataOutlined, ms_aGlyphData, SlotW, SlotH);
|
Grow(ms_aGlyphDataOutlined, ms_aGlyphData, SlotW, SlotH);
|
||||||
|
}
|
||||||
UploadGlyph(pSizeData, 1, SlotId, Chr, ms_aGlyphData);
|
UploadGlyph(pSizeData, 1, SlotId, Chr, ms_aGlyphData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,6 @@ CMenus::CMenus()
|
||||||
m_NeedSendinfo = false;
|
m_NeedSendinfo = false;
|
||||||
m_MenuActive = true;
|
m_MenuActive = true;
|
||||||
m_UseMouseButtons = true;
|
m_UseMouseButtons = true;
|
||||||
m_DemolistDelEntry = false;
|
|
||||||
|
|
||||||
m_EscapePressed = false;
|
m_EscapePressed = false;
|
||||||
m_EnterPressed = false;
|
m_EnterPressed = false;
|
||||||
|
@ -164,6 +163,8 @@ int CMenus::DoEditBox(void *pID, const CUIRect *pRect, char *pStr, unsigned StrS
|
||||||
static bool s_DoScroll = false;
|
static bool s_DoScroll = false;
|
||||||
static float s_ScrollStart = 0.0f;
|
static float s_ScrollStart = 0.0f;
|
||||||
|
|
||||||
|
FontSize *= UI()->Scale();
|
||||||
|
|
||||||
if(UI()->LastActiveItem() == pID)
|
if(UI()->LastActiveItem() == pID)
|
||||||
{
|
{
|
||||||
int Len = str_length(pStr);
|
int Len = str_length(pStr);
|
||||||
|
@ -259,11 +260,11 @@ int CMenus::DoEditBox(void *pID, const CUIRect *pRect, char *pStr, unsigned StrS
|
||||||
// check if the text has to be moved
|
// check if the text has to be moved
|
||||||
if(UI()->LastActiveItem() == pID && !JustGotActive && (UpdateOffset || m_NumInputEvents))
|
if(UI()->LastActiveItem() == pID && !JustGotActive && (UpdateOffset || m_NumInputEvents))
|
||||||
{
|
{
|
||||||
float w = TextRender()->TextWidth(0, FontSize, pDisplayStr, s_AtIndex)*UI()->Scale();
|
float w = TextRender()->TextWidth(0, FontSize, pDisplayStr, s_AtIndex);
|
||||||
if(w-*Offset > Textbox.w)
|
if(w-*Offset > Textbox.w)
|
||||||
{
|
{
|
||||||
// move to the left
|
// move to the left
|
||||||
float wt = TextRender()->TextWidth(0, FontSize, pDisplayStr, -1)*UI()->Scale();
|
float wt = TextRender()->TextWidth(0, FontSize, pDisplayStr, -1);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
*Offset += min(wt-*Offset-Textbox.w, Textbox.w/3);
|
*Offset += min(wt-*Offset-Textbox.w, Textbox.w/3);
|
||||||
|
@ -281,7 +282,7 @@ int CMenus::DoEditBox(void *pID, const CUIRect *pRect, char *pStr, unsigned StrS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UI()->ClipEnable(pRect);
|
UI()->ClipEnable(pRect);
|
||||||
Textbox.x -= *Offset*UI()->Scale();
|
Textbox.x -= *Offset;
|
||||||
|
|
||||||
UI()->DoLabel(&Textbox, pDisplayStr, FontSize, -1);
|
UI()->DoLabel(&Textbox, pDisplayStr, FontSize, -1);
|
||||||
|
|
||||||
|
@ -291,7 +292,7 @@ int CMenus::DoEditBox(void *pID, const CUIRect *pRect, char *pStr, unsigned StrS
|
||||||
float w = TextRender()->TextWidth(0, FontSize, pDisplayStr, s_AtIndex);
|
float w = TextRender()->TextWidth(0, FontSize, pDisplayStr, s_AtIndex);
|
||||||
Textbox = *pRect;
|
Textbox = *pRect;
|
||||||
Textbox.VSplitLeft(2.0f, 0, &Textbox);
|
Textbox.VSplitLeft(2.0f, 0, &Textbox);
|
||||||
Textbox.x += (w-*Offset-TextRender()->TextWidth(0, FontSize, "|", -1)/2)*UI()->Scale();
|
Textbox.x += (w-*Offset-TextRender()->TextWidth(0, FontSize, "|", -1)/2);
|
||||||
|
|
||||||
if((2*time_get()/time_freq()) % 2) // make it blink
|
if((2*time_get()/time_freq()) % 2) // make it blink
|
||||||
UI()->DoLabel(&Textbox, "|", FontSize, -1);
|
UI()->DoLabel(&Textbox, "|", FontSize, -1);
|
||||||
|
@ -868,23 +869,23 @@ int CMenus::Render()
|
||||||
|
|
||||||
CUIRect Box, Part;
|
CUIRect Box, Part;
|
||||||
Box = Screen;
|
Box = Screen;
|
||||||
Box.VMargin(150.0f, &Box);
|
Box.VMargin(150.0f/UI()->Scale(), &Box);
|
||||||
Box.HMargin(150.0f, &Box);
|
Box.HMargin(150.0f/UI()->Scale(), &Box);
|
||||||
|
|
||||||
// render the box
|
// render the box
|
||||||
RenderTools()->DrawUIRect(&Box, vec4(0,0,0,0.5f), CUI::CORNER_ALL, 15.0f);
|
RenderTools()->DrawUIRect(&Box, vec4(0,0,0,0.5f), CUI::CORNER_ALL, 15.0f);
|
||||||
|
|
||||||
Box.HSplitTop(20.f, &Part, &Box);
|
Box.HSplitTop(20.f/UI()->Scale(), &Part, &Box);
|
||||||
Box.HSplitTop(24.f, &Part, &Box);
|
Box.HSplitTop(24.f/UI()->Scale(), &Part, &Box);
|
||||||
UI()->DoLabel(&Part, pTitle, 24.f, 0);
|
UI()->DoLabelScaled(&Part, pTitle, 24.f, 0);
|
||||||
Box.HSplitTop(20.f, &Part, &Box);
|
Box.HSplitTop(20.f/UI()->Scale(), &Part, &Box);
|
||||||
Box.HSplitTop(24.f, &Part, &Box);
|
Box.HSplitTop(24.f/UI()->Scale(), &Part, &Box);
|
||||||
Part.VMargin(20.f, &Part);
|
Part.VMargin(20.f/UI()->Scale(), &Part);
|
||||||
|
|
||||||
if(ExtraAlign == -1)
|
if(ExtraAlign == -1)
|
||||||
UI()->DoLabel(&Part, pExtraText, 20.f, -1, (int)Part.w);
|
UI()->DoLabelScaled(&Part, pExtraText, 20.f, -1, (int)Part.w);
|
||||||
else
|
else
|
||||||
UI()->DoLabel(&Part, pExtraText, 20.f, 0, -1);
|
UI()->DoLabelScaled(&Part, pExtraText, 20.f, 0, -1);
|
||||||
|
|
||||||
if(m_Popup == POPUP_QUIT)
|
if(m_Popup == POPUP_QUIT)
|
||||||
{
|
{
|
||||||
|
@ -985,13 +986,13 @@ int CMenus::Render()
|
||||||
if(TimeLeft >= 60)
|
if(TimeLeft >= 60)
|
||||||
{
|
{
|
||||||
TimeLeft /= 60;
|
TimeLeft /= 60;
|
||||||
pTimeLeftString = TimeLeft == 1 ? Localize("minute") : Localize("minutes");
|
pTimeLeftString = TimeLeft == 1 ? Localize("%i minute left") : Localize("%i minutes left");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pTimeLeftString = TimeLeft == 1 ? Localize("second") : Localize("seconds");
|
pTimeLeftString = TimeLeft == 1 ? Localize("%i second left") : Localize("%i seconds left");
|
||||||
Box.HSplitTop(20.f, 0, &Box);
|
Box.HSplitTop(20.f, 0, &Box);
|
||||||
Box.HSplitTop(24.f, &Part, &Box);
|
Box.HSplitTop(24.f, &Part, &Box);
|
||||||
str_format(aBuf, sizeof(aBuf), "%i %s %s", TimeLeft, pTimeLeftString, Localize("left"));
|
str_format(aBuf, sizeof(aBuf), pTimeLeftString, TimeLeft);
|
||||||
UI()->DoLabel(&Part, aBuf, 20.f, 0, -1);
|
UI()->DoLabel(&Part, aBuf, 20.f, 0, -1);
|
||||||
|
|
||||||
// progress bar
|
// progress bar
|
||||||
|
@ -1040,7 +1041,19 @@ int CMenus::Render()
|
||||||
if(DoButton_Menu(&s_ButtonTryAgain, Localize("Yes"), 0, &Yes) || m_EnterPressed)
|
if(DoButton_Menu(&s_ButtonTryAgain, Localize("Yes"), 0, &Yes) || m_EnterPressed)
|
||||||
{
|
{
|
||||||
m_Popup = POPUP_NONE;
|
m_Popup = POPUP_NONE;
|
||||||
m_DemolistDelEntry = true;
|
// delete demo
|
||||||
|
if(m_DemolistSelectedIndex >= 0 && !m_DemolistSelectedIsDir)
|
||||||
|
{
|
||||||
|
char aBuf[512];
|
||||||
|
str_format(aBuf, sizeof(aBuf), "%s/%s", m_aCurrentDemoFolder, m_lDemos[m_DemolistSelectedIndex].m_aFilename);
|
||||||
|
if(Storage()->RemoveFile(aBuf, m_lDemos[m_DemolistSelectedIndex].m_StorageType))
|
||||||
|
{
|
||||||
|
DemolistPopulate();
|
||||||
|
DemolistOnUpdate(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
PopupMessage(Localize("Error"), Localize("Unable to delete the demo"), Localize("Ok"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(m_Popup == POPUP_FIRST_LAUNCH)
|
else if(m_Popup == POPUP_FIRST_LAUNCH)
|
||||||
|
|
|
@ -81,7 +81,7 @@ class CMenus : public CComponent
|
||||||
void UiDoListboxStart(void *pId, const CUIRect *pRect, float RowHeight, const char *pTitle, const char *pBottomText, int NumItems,
|
void UiDoListboxStart(void *pId, const CUIRect *pRect, float RowHeight, const char *pTitle, const char *pBottomText, int NumItems,
|
||||||
int ItemsPerRow, int SelectedIndex, float ScrollValue);
|
int ItemsPerRow, int SelectedIndex, float ScrollValue);
|
||||||
CListboxItem UiDoListboxNextItem(void *pID, bool Selected = false);
|
CListboxItem UiDoListboxNextItem(void *pID, bool Selected = false);
|
||||||
static CListboxItem UiDoListboxNextRow();
|
CListboxItem UiDoListboxNextRow();
|
||||||
int UiDoListboxEnd(float *pScrollValue, bool *pItemActivated);
|
int UiDoListboxEnd(float *pScrollValue, bool *pItemActivated);
|
||||||
|
|
||||||
//static void demolist_listdir_callback(const char *name, int is_dir, void *user);
|
//static void demolist_listdir_callback(const char *name, int is_dir, void *user);
|
||||||
|
@ -181,7 +181,6 @@ class CMenus : public CComponent
|
||||||
|
|
||||||
sorted_array<CDemoItem> m_lDemos;
|
sorted_array<CDemoItem> m_lDemos;
|
||||||
char m_aCurrentDemoFolder[256];
|
char m_aCurrentDemoFolder[256];
|
||||||
bool m_DemolistDelEntry;
|
|
||||||
int m_DemolistSelectedIndex;
|
int m_DemolistSelectedIndex;
|
||||||
bool m_DemolistSelectedIsDir;
|
bool m_DemolistSelectedIsDir;
|
||||||
int m_DemolistStorageType;
|
int m_DemolistStorageType;
|
||||||
|
|
|
@ -130,11 +130,11 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
|
||||||
MsgBox.y += View.h/3;
|
MsgBox.y += View.h/3;
|
||||||
|
|
||||||
if(m_ActivePage == PAGE_INTERNET && ServerBrowser()->IsRefreshingMasters())
|
if(m_ActivePage == PAGE_INTERNET && ServerBrowser()->IsRefreshingMasters())
|
||||||
UI()->DoLabel(&MsgBox, Localize("Refreshing master servers"), 16.0f, 0);
|
UI()->DoLabelScaled(&MsgBox, Localize("Refreshing master servers"), 16.0f, 0);
|
||||||
else if(!ServerBrowser()->NumServers())
|
else if(!ServerBrowser()->NumServers())
|
||||||
UI()->DoLabel(&MsgBox, Localize("No servers found"), 16.0f, 0);
|
UI()->DoLabelScaled(&MsgBox, Localize("No servers found"), 16.0f, 0);
|
||||||
else if(ServerBrowser()->NumServers() && !NumServers)
|
else if(ServerBrowser()->NumServers() && !NumServers)
|
||||||
UI()->DoLabel(&MsgBox, Localize("No servers match your filter criteria"), 16.0f, 0);
|
UI()->DoLabelScaled(&MsgBox, Localize("No servers match your filter criteria"), 16.0f, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Num = (int)(View.h/s_aCols[0].m_Rect.h) + 1;
|
int Num = (int)(View.h/s_aCols[0].m_Rect.h) + 1;
|
||||||
|
@ -323,7 +323,7 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
|
||||||
else if(Id == COL_MAP)
|
else if(Id == COL_MAP)
|
||||||
{
|
{
|
||||||
CTextCursor Cursor;
|
CTextCursor Cursor;
|
||||||
TextRender()->SetCursor(&Cursor, Button.x, Button.y, 12.0f, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
|
TextRender()->SetCursor(&Cursor, Button.x, Button.y, 12.0f * UI()->Scale(), TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
|
||||||
Cursor.m_LineWidth = Button.w;
|
Cursor.m_LineWidth = Button.w;
|
||||||
TextRender()->TextEx(&Cursor, pItem->m_aMap, -1);
|
TextRender()->TextEx(&Cursor, pItem->m_aMap, -1);
|
||||||
}
|
}
|
||||||
|
@ -332,25 +332,23 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
|
||||||
str_format(aTemp, sizeof(aTemp), "%i/%i", pItem->m_NumPlayers, pItem->m_MaxPlayers);
|
str_format(aTemp, sizeof(aTemp), "%i/%i", pItem->m_NumPlayers, pItem->m_MaxPlayers);
|
||||||
if(g_Config.m_BrFilterString[0] && (pItem->m_QuickSearchHit&IServerBrowser::QUICK_PLAYERNAME))
|
if(g_Config.m_BrFilterString[0] && (pItem->m_QuickSearchHit&IServerBrowser::QUICK_PLAYERNAME))
|
||||||
TextRender()->TextColor(0.4f,0.4f,1.0f,1);
|
TextRender()->TextColor(0.4f,0.4f,1.0f,1);
|
||||||
UI()->DoLabel(&Button, aTemp, 12.0f, 1);
|
UI()->DoLabelScaled(&Button, aTemp, 12.0f, 1);
|
||||||
TextRender()->TextColor(1,1,1,1);
|
TextRender()->TextColor(1,1,1,1);
|
||||||
}
|
}
|
||||||
else if(Id == COL_PING)
|
else if(Id == COL_PING)
|
||||||
{
|
{
|
||||||
str_format(aTemp, sizeof(aTemp), "%i", pItem->m_Latency);
|
str_format(aTemp, sizeof(aTemp), "%i", pItem->m_Latency);
|
||||||
UI()->DoLabel(&Button, aTemp, 12.0f, 1);
|
UI()->DoLabelScaled(&Button, aTemp, 12.0f, 1);
|
||||||
}
|
}
|
||||||
else if(Id == COL_VERSION)
|
else if(Id == COL_VERSION)
|
||||||
{
|
{
|
||||||
const char *pVersion = pItem->m_aVersion;
|
const char *pVersion = pItem->m_aVersion;
|
||||||
if(str_comp(pVersion, "0.3 e2d7973c6647a13c") == 0) // TODO: remove me later on
|
UI()->DoLabelScaled(&Button, pVersion, 12.0f, 1);
|
||||||
pVersion = "0.3.0";
|
|
||||||
UI()->DoLabel(&Button, pVersion, 12.0f, 1);
|
|
||||||
}
|
}
|
||||||
else if(Id == COL_GAMETYPE)
|
else if(Id == COL_GAMETYPE)
|
||||||
{
|
{
|
||||||
CTextCursor Cursor;
|
CTextCursor Cursor;
|
||||||
TextRender()->SetCursor(&Cursor, Button.x, Button.y, 12.0f, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
|
TextRender()->SetCursor(&Cursor, Button.x, Button.y, 12.0f*UI()->Scale(), TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
|
||||||
Cursor.m_LineWidth = Button.w;
|
Cursor.m_LineWidth = Button.w;
|
||||||
TextRender()->TextEx(&Cursor, pItem->m_aGameType, -1);
|
TextRender()->TextEx(&Cursor, pItem->m_aGameType, -1);
|
||||||
}
|
}
|
||||||
|
@ -376,7 +374,7 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
|
||||||
CUIRect QuickSearch, Button;
|
CUIRect QuickSearch, Button;
|
||||||
Status.VSplitLeft(260.0f, &QuickSearch, &Status);
|
Status.VSplitLeft(260.0f, &QuickSearch, &Status);
|
||||||
const char *pLabel = Localize("Quick search:");
|
const char *pLabel = Localize("Quick search:");
|
||||||
UI()->DoLabel(&QuickSearch, pLabel, 12.0f, -1);
|
UI()->DoLabelScaled(&QuickSearch, pLabel, 12.0f, -1);
|
||||||
float w = TextRender()->TextWidth(0, 12.0f, pLabel, -1);
|
float w = TextRender()->TextWidth(0, 12.0f, pLabel, -1);
|
||||||
QuickSearch.VSplitLeft(w, 0, &QuickSearch);
|
QuickSearch.VSplitLeft(w, 0, &QuickSearch);
|
||||||
QuickSearch.VSplitLeft(5.0f, 0, &QuickSearch);
|
QuickSearch.VSplitLeft(5.0f, 0, &QuickSearch);
|
||||||
|
@ -402,7 +400,7 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
|
||||||
else
|
else
|
||||||
str_format(aBuf, sizeof(aBuf), Localize("%d of %d servers, %d players"), ServerBrowser()->NumSortedServers(), ServerBrowser()->NumServers(), NumPlayers);
|
str_format(aBuf, sizeof(aBuf), Localize("%d of %d servers, %d players"), ServerBrowser()->NumSortedServers(), ServerBrowser()->NumServers(), NumPlayers);
|
||||||
Status.VSplitRight(TextRender()->TextWidth(0, 14.0f, aBuf, -1), 0, &Status);
|
Status.VSplitRight(TextRender()->TextWidth(0, 14.0f, aBuf, -1), 0, &Status);
|
||||||
UI()->DoLabel(&Status, aBuf, 14.0f, -1);
|
UI()->DoLabelScaled(&Status, aBuf, 14.0f, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenus::RenderServerbrowserFilters(CUIRect View)
|
void CMenus::RenderServerbrowserFilters(CUIRect View)
|
||||||
|
@ -448,7 +446,7 @@ void CMenus::RenderServerbrowserFilters(CUIRect View)
|
||||||
View.HSplitTop(5.0f, 0, &View);
|
View.HSplitTop(5.0f, 0, &View);
|
||||||
|
|
||||||
View.HSplitTop(19.0f, &Button, &View);
|
View.HSplitTop(19.0f, &Button, &View);
|
||||||
UI()->DoLabel(&Button, Localize("Game types:"), 12.0f, -1);
|
UI()->DoLabelScaled(&Button, Localize("Game types:"), 12.0f, -1);
|
||||||
Button.VSplitLeft(95.0f, 0, &Button);
|
Button.VSplitLeft(95.0f, 0, &Button);
|
||||||
View.HSplitTop(3.0f, 0, &View);
|
View.HSplitTop(3.0f, 0, &View);
|
||||||
static float Offset = 0.0f;
|
static float Offset = 0.0f;
|
||||||
|
@ -460,7 +458,7 @@ void CMenus::RenderServerbrowserFilters(CUIRect View)
|
||||||
Button.VSplitRight(50.0f, &Button, &EditBox);
|
Button.VSplitRight(50.0f, &Button, &EditBox);
|
||||||
EditBox.VSplitRight(5.0f, &EditBox, 0);
|
EditBox.VSplitRight(5.0f, &EditBox, 0);
|
||||||
|
|
||||||
UI()->DoLabel(&Button, Localize("Maximum ping:"), 12.0f, -1);
|
UI()->DoLabelScaled(&Button, Localize("Maximum ping:"), 12.0f, -1);
|
||||||
|
|
||||||
char aBuf[5];
|
char aBuf[5];
|
||||||
str_format(aBuf, sizeof(aBuf), "%d", g_Config.m_BrFilterPing);
|
str_format(aBuf, sizeof(aBuf), "%d", g_Config.m_BrFilterPing);
|
||||||
|
@ -505,7 +503,7 @@ void CMenus::RenderServerbrowserServerDetail(CUIRect View)
|
||||||
RenderTools()->DrawUIRect(&ServerHeader, vec4(1,1,1,0.25f), CUI::CORNER_T, 4.0f);
|
RenderTools()->DrawUIRect(&ServerHeader, vec4(1,1,1,0.25f), CUI::CORNER_T, 4.0f);
|
||||||
RenderTools()->DrawUIRect(&ServerDetails, vec4(0,0,0,0.15f), CUI::CORNER_B, 4.0f);
|
RenderTools()->DrawUIRect(&ServerDetails, vec4(0,0,0,0.15f), CUI::CORNER_B, 4.0f);
|
||||||
ServerHeader.VSplitLeft(8.0f, 0x0, &ServerHeader);
|
ServerHeader.VSplitLeft(8.0f, 0x0, &ServerHeader);
|
||||||
UI()->DoLabel(&ServerHeader, Localize("Server details"), FontSize+2.0f, -1);
|
UI()->DoLabelScaled(&ServerHeader, Localize("Server details"), FontSize+2.0f, -1);
|
||||||
|
|
||||||
ServerDetails.VSplitLeft(5.0f, 0x0, &ServerDetails);
|
ServerDetails.VSplitLeft(5.0f, 0x0, &ServerDetails);
|
||||||
|
|
||||||
|
@ -543,19 +541,19 @@ void CMenus::RenderServerbrowserServerDetail(CUIRect View)
|
||||||
for (unsigned int i = 0; i < sizeof(s_aLabels) / sizeof(s_aLabels[0]); i++)
|
for (unsigned int i = 0; i < sizeof(s_aLabels) / sizeof(s_aLabels[0]); i++)
|
||||||
{
|
{
|
||||||
LeftColumn.HSplitTop(15.0f, &Row, &LeftColumn);
|
LeftColumn.HSplitTop(15.0f, &Row, &LeftColumn);
|
||||||
UI()->DoLabel(&Row, s_aLabels[i], FontSize, -1);
|
UI()->DoLabelScaled(&Row, s_aLabels[i], FontSize, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
RightColumn.HSplitTop(15.0f, &Row, &RightColumn);
|
RightColumn.HSplitTop(15.0f, &Row, &RightColumn);
|
||||||
UI()->DoLabel(&Row, pSelectedServer->m_aVersion, FontSize, -1);
|
UI()->DoLabelScaled(&Row, pSelectedServer->m_aVersion, FontSize, -1);
|
||||||
|
|
||||||
RightColumn.HSplitTop(15.0f, &Row, &RightColumn);
|
RightColumn.HSplitTop(15.0f, &Row, &RightColumn);
|
||||||
UI()->DoLabel(&Row, pSelectedServer->m_aGameType, FontSize, -1);
|
UI()->DoLabelScaled(&Row, pSelectedServer->m_aGameType, FontSize, -1);
|
||||||
|
|
||||||
char aTemp[16];
|
char aTemp[16];
|
||||||
str_format(aTemp, sizeof(aTemp), "%d", pSelectedServer->m_Latency);
|
str_format(aTemp, sizeof(aTemp), "%d", pSelectedServer->m_Latency);
|
||||||
RightColumn.HSplitTop(15.0f, &Row, &RightColumn);
|
RightColumn.HSplitTop(15.0f, &Row, &RightColumn);
|
||||||
UI()->DoLabel(&Row, aTemp, FontSize, -1);
|
UI()->DoLabelScaled(&Row, aTemp, FontSize, -1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -566,7 +564,7 @@ void CMenus::RenderServerbrowserServerDetail(CUIRect View)
|
||||||
RenderTools()->DrawUIRect(&ServerHeader, vec4(1,1,1,0.25f), CUI::CORNER_T, 4.0f);
|
RenderTools()->DrawUIRect(&ServerHeader, vec4(1,1,1,0.25f), CUI::CORNER_T, 4.0f);
|
||||||
RenderTools()->DrawUIRect(&ServerScoreBoard, vec4(0,0,0,0.15f), CUI::CORNER_B, 4.0f);
|
RenderTools()->DrawUIRect(&ServerScoreBoard, vec4(0,0,0,0.15f), CUI::CORNER_B, 4.0f);
|
||||||
ServerHeader.VSplitLeft(8.0f, 0x0, &ServerHeader);
|
ServerHeader.VSplitLeft(8.0f, 0x0, &ServerHeader);
|
||||||
UI()->DoLabel(&ServerHeader, Localize("Scoreboard"), FontSize+2.0f, -1);
|
UI()->DoLabelScaled(&ServerHeader, Localize("Scoreboard"), FontSize+2.0f, -1);
|
||||||
|
|
||||||
ServerScoreBoard.VSplitLeft(5.0f, 0x0, &ServerScoreBoard);
|
ServerScoreBoard.VSplitLeft(5.0f, 0x0, &ServerScoreBoard);
|
||||||
|
|
||||||
|
@ -581,7 +579,7 @@ void CMenus::RenderServerbrowserServerDetail(CUIRect View)
|
||||||
ServerScoreBoard.HSplitTop(16.0f, &Row, &ServerScoreBoard);
|
ServerScoreBoard.HSplitTop(16.0f, &Row, &ServerScoreBoard);
|
||||||
|
|
||||||
str_format(aTemp, sizeof(aTemp), "%d", pSelectedServer->m_aPlayers[i].m_Score);
|
str_format(aTemp, sizeof(aTemp), "%d", pSelectedServer->m_aPlayers[i].m_Score);
|
||||||
UI()->DoLabel(&Row, aTemp, FontSize, -1);
|
UI()->DoLabelScaled(&Row, aTemp, FontSize, -1);
|
||||||
|
|
||||||
Row.VSplitLeft(25.0f, 0x0, &Row);
|
Row.VSplitLeft(25.0f, 0x0, &Row);
|
||||||
|
|
||||||
|
@ -700,7 +698,7 @@ void CMenus::RenderServerbrowser(CUIRect MainView)
|
||||||
str_format(aBuf, sizeof(aBuf), Localize("Teeworlds %s is out! Download it at www.teeworlds.com!"), Client()->LatestVersion());
|
str_format(aBuf, sizeof(aBuf), Localize("Teeworlds %s is out! Download it at www.teeworlds.com!"), Client()->LatestVersion());
|
||||||
else
|
else
|
||||||
str_format(aBuf, sizeof(aBuf), Localize("Current version: %s"), GAME_VERSION);
|
str_format(aBuf, sizeof(aBuf), Localize("Current version: %s"), GAME_VERSION);
|
||||||
UI()->DoLabel(&StatusToolBox, aBuf, 14.0f, -1);
|
UI()->DoLabelScaled(&StatusToolBox, aBuf, 14.0f, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// do the button box
|
// do the button box
|
||||||
|
@ -727,7 +725,7 @@ void CMenus::RenderServerbrowser(CUIRect MainView)
|
||||||
static float Offset = 0.0f;
|
static float Offset = 0.0f;
|
||||||
DoEditBox(&g_Config.m_UiServerAddress, &Button, g_Config.m_UiServerAddress, sizeof(g_Config.m_UiServerAddress), 14.0f, &Offset);
|
DoEditBox(&g_Config.m_UiServerAddress, &Button, g_Config.m_UiServerAddress, sizeof(g_Config.m_UiServerAddress), 14.0f, &Offset);
|
||||||
ButtonBox.HSplitBottom(20.0f, &ButtonBox, &Button);
|
ButtonBox.HSplitBottom(20.0f, &ButtonBox, &Button);
|
||||||
UI()->DoLabel(&Button, Localize("Host address"), 14.0f, -1);
|
UI()->DoLabelScaled(&Button, Localize("Host address"), 14.0f, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -304,7 +304,7 @@ CMenus::CListboxItem CMenus::UiDoListboxNextRow()
|
||||||
if(gs_ListBoxItemIndex%gs_ListBoxItemsPerRow == 0)
|
if(gs_ListBoxItemIndex%gs_ListBoxItemsPerRow == 0)
|
||||||
gs_ListBoxView.HSplitTop(gs_ListBoxRowHeight /*-2.0f*/, &s_RowView, &gs_ListBoxView);
|
gs_ListBoxView.HSplitTop(gs_ListBoxRowHeight /*-2.0f*/, &s_RowView, &gs_ListBoxView);
|
||||||
|
|
||||||
s_RowView.VSplitLeft(s_RowView.w/(gs_ListBoxItemsPerRow-gs_ListBoxItemIndex%gs_ListBoxItemsPerRow), &Item.m_Rect, &s_RowView);
|
s_RowView.VSplitLeft(s_RowView.w/(gs_ListBoxItemsPerRow-gs_ListBoxItemIndex%gs_ListBoxItemsPerRow)/(UI()->Scale()), &Item.m_Rect, &s_RowView);
|
||||||
|
|
||||||
Item.m_Visible = 1;
|
Item.m_Visible = 1;
|
||||||
//item.rect = row;
|
//item.rect = row;
|
||||||
|
@ -477,22 +477,6 @@ void CMenus::RenderDemoList(CUIRect MainView)
|
||||||
s_Inited = 1;
|
s_Inited = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete demo
|
|
||||||
if(m_DemolistDelEntry)
|
|
||||||
{
|
|
||||||
if(m_DemolistSelectedIndex >= 0 && !m_DemolistSelectedIsDir)
|
|
||||||
{
|
|
||||||
char aBuf[512];
|
|
||||||
str_format(aBuf, sizeof(aBuf), "%s/%s", m_aCurrentDemoFolder, m_lDemos[m_DemolistSelectedIndex].m_aFilename);
|
|
||||||
if(Storage()->RemoveFile(aBuf, m_lDemos[m_DemolistSelectedIndex].m_StorageType))
|
|
||||||
{
|
|
||||||
DemolistPopulate();
|
|
||||||
DemolistOnUpdate(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m_DemolistDelEntry = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
char aFooterLabel[128] = {0};
|
char aFooterLabel[128] = {0};
|
||||||
if(m_DemolistSelectedIndex >= 0)
|
if(m_DemolistSelectedIndex >= 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -192,8 +192,8 @@ void CMenus::RenderServerInfo(CUIRect MainView)
|
||||||
MainView.Margin(10.0f, &View);
|
MainView.Margin(10.0f, &View);
|
||||||
|
|
||||||
// serverinfo
|
// serverinfo
|
||||||
View.HSplitTop(View.h/2-5.0f, &ServerInfo, &Motd);
|
View.HSplitTop(View.h/2/UI()->Scale()-5.0f, &ServerInfo, &Motd);
|
||||||
ServerInfo.VSplitLeft(View.w/2-5.0f, &ServerInfo, &GameInfo);
|
ServerInfo.VSplitLeft(View.w/2/UI()->Scale()-5.0f, &ServerInfo, &GameInfo);
|
||||||
RenderTools()->DrawUIRect(&ServerInfo, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
RenderTools()->DrawUIRect(&ServerInfo, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
||||||
|
|
||||||
ServerInfo.Margin(5.0f, &ServerInfo);
|
ServerInfo.Margin(5.0f, &ServerInfo);
|
||||||
|
@ -299,7 +299,7 @@ void CMenus::RenderServerControlServer(CUIRect MainView)
|
||||||
CListboxItem Item = UiDoListboxNextItem(pOption);
|
CListboxItem Item = UiDoListboxNextItem(pOption);
|
||||||
|
|
||||||
if(Item.m_Visible)
|
if(Item.m_Visible)
|
||||||
UI()->DoLabel(&Item.m_Rect, FormatCommand(pOption->m_aCommand), 16.0f, -1);
|
UI()->DoLabelScaled(&Item.m_Rect, FormatCommand(pOption->m_aCommand), 16.0f, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_CallvoteSelectedOption = UiDoListboxEnd(&s_ScrollValue, 0);
|
m_CallvoteSelectedOption = UiDoListboxEnd(&s_ScrollValue, 0);
|
||||||
|
@ -335,7 +335,7 @@ void CMenus::RenderServerControlKick(CUIRect MainView)
|
||||||
Item.m_Rect.HSplitTop(5.0f, 0, &Item.m_Rect); // some margin from the top
|
Item.m_Rect.HSplitTop(5.0f, 0, &Item.m_Rect); // some margin from the top
|
||||||
RenderTools()->RenderTee(CAnimState::GetIdle(), &Info, EMOTE_NORMAL, vec2(1,0), vec2(Item.m_Rect.x+Item.m_Rect.h/2, Item.m_Rect.y+Item.m_Rect.h/2));
|
RenderTools()->RenderTee(CAnimState::GetIdle(), &Info, EMOTE_NORMAL, vec2(1,0), vec2(Item.m_Rect.x+Item.m_Rect.h/2, Item.m_Rect.y+Item.m_Rect.h/2));
|
||||||
Item.m_Rect.x +=Info.m_Size;
|
Item.m_Rect.x +=Info.m_Size;
|
||||||
UI()->DoLabel(&Item.m_Rect, m_pClient->m_aClients[aPlayerIDs[i]].m_aName, 16.0f, -1);
|
UI()->DoLabelScaled(&Item.m_Rect, m_pClient->m_aClients[aPlayerIDs[i]].m_aName, 16.0f, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ void CMenus::RenderServerControl(CUIRect MainView)
|
||||||
Bottom.VSplitRight(160.0f, &Bottom, &Reason);
|
Bottom.VSplitRight(160.0f, &Bottom, &Reason);
|
||||||
Reason.HSplitTop(5.0f, 0, &Reason);
|
Reason.HSplitTop(5.0f, 0, &Reason);
|
||||||
const char *pLabel = Localize("Reason:");
|
const char *pLabel = Localize("Reason:");
|
||||||
UI()->DoLabel(&Reason, pLabel, 14.0f, -1);
|
UI()->DoLabelScaled(&Reason, pLabel, 14.0f, -1);
|
||||||
float w = TextRender()->TextWidth(0, 14.0f, pLabel, -1);
|
float w = TextRender()->TextWidth(0, 14.0f, pLabel, -1);
|
||||||
Reason.VSplitLeft(w+10.0f, 0, &Reason);
|
Reason.VSplitLeft(w+10.0f, 0, &Reason);
|
||||||
static float s_Offset = 0.0f;
|
static float s_Offset = 0.0f;
|
||||||
|
|
|
@ -52,7 +52,7 @@ void CMenus::RenderSettingsPlayer(CUIRect MainView)
|
||||||
CUIRect Button;
|
CUIRect Button;
|
||||||
CUIRect LeftView, RightView;
|
CUIRect LeftView, RightView;
|
||||||
|
|
||||||
MainView.VSplitLeft(MainView.w/2, &LeftView, &RightView);
|
MainView.VSplitMid(&LeftView, &RightView);
|
||||||
LeftView.HSplitTop(20.0f, &Button, &LeftView);
|
LeftView.HSplitTop(20.0f, &Button, &LeftView);
|
||||||
|
|
||||||
// render settings
|
// render settings
|
||||||
|
@ -133,16 +133,16 @@ void CMenus::RenderSettingsPlayer(CUIRect MainView)
|
||||||
OwnSkinInfo.m_Texture = pOwnSkin->m_ColorTexture;
|
OwnSkinInfo.m_Texture = pOwnSkin->m_ColorTexture;
|
||||||
}
|
}
|
||||||
|
|
||||||
OwnSkinInfo.m_Size = UI()->Scale()*50.0f;
|
OwnSkinInfo.m_Size = 50.0f*UI()->Scale();
|
||||||
|
|
||||||
LeftView.HSplitTop(20.0f, &Button, &LeftView);
|
LeftView.HSplitTop(20.0f, &Button, &LeftView);
|
||||||
LeftView.HSplitTop(20.0f, &Button, &LeftView);
|
LeftView.HSplitTop(20.0f, &Button, &LeftView);
|
||||||
|
|
||||||
str_format(aBuf, sizeof(aBuf), "%s:", Localize("Your skin"));
|
str_format(aBuf, sizeof(aBuf), "%s:", Localize("Your skin"));
|
||||||
UI()->DoLabel(&Button, aBuf, 14.0, -1);
|
UI()->DoLabelScaled(&Button, aBuf, 14.0f, -1);
|
||||||
|
|
||||||
CUIRect SkinRect;
|
CUIRect SkinRect;
|
||||||
LeftView.VSplitLeft(LeftView.w/1.2f, &SkinRect, 0);
|
LeftView.VSplitLeft(LeftView.w/1.2f/UI()->Scale(), &SkinRect, 0);
|
||||||
SkinRect.HSplitTop(50.0f, &SkinRect, 0);
|
SkinRect.HSplitTop(50.0f, &SkinRect, 0);
|
||||||
RenderTools()->DrawUIRect(&SkinRect, vec4(1, 1, 1, 0.25f), CUI::CORNER_ALL, 10.0f);
|
RenderTools()->DrawUIRect(&SkinRect, vec4(1, 1, 1, 0.25f), CUI::CORNER_ALL, 10.0f);
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ void CMenus::RenderSettingsPlayer(CUIRect MainView)
|
||||||
|
|
||||||
str_format(aBuf, sizeof(aBuf), "%s", g_Config.m_PlayerSkin);
|
str_format(aBuf, sizeof(aBuf), "%s", g_Config.m_PlayerSkin);
|
||||||
CTextCursor Cursor;
|
CTextCursor Cursor;
|
||||||
TextRender()->SetCursor(&Cursor, Button.x, Button.y, 14.0f, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
|
TextRender()->SetCursor(&Cursor, Button.x, Button.y, 14.0f*UI()->Scale(), TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
|
||||||
Cursor.m_LineWidth = SkinRect.w-(Button.x-SkinRect.x)-5.0f;
|
Cursor.m_LineWidth = SkinRect.w-(Button.x-SkinRect.x)-5.0f;
|
||||||
TextRender()->TextEx(&Cursor, aBuf, -1);
|
TextRender()->TextEx(&Cursor, aBuf, -1);
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,7 @@ void CMenus::RenderSettingsPlayer(CUIRect MainView)
|
||||||
CUIRect Text;
|
CUIRect Text;
|
||||||
RightView.HSplitTop(20.0f, &Text, &RightView);
|
RightView.HSplitTop(20.0f, &Text, &RightView);
|
||||||
Text.VSplitLeft(15.0f, 0, &Text);
|
Text.VSplitLeft(15.0f, 0, &Text);
|
||||||
UI()->DoLabel(&Text, paParts[i], 14.0f, -1);
|
UI()->DoLabelScaled(&Text, paParts[i], 14.0f, -1);
|
||||||
|
|
||||||
int PrevColor = *paColors[i];
|
int PrevColor = *paColors[i];
|
||||||
int Color = 0;
|
int Color = 0;
|
||||||
|
@ -208,7 +208,7 @@ void CMenus::RenderSettingsPlayer(CUIRect MainView)
|
||||||
k = DoScrollbarH(&s_aColorSlider[i][s], &Button, k);
|
k = DoScrollbarH(&s_aColorSlider[i][s], &Button, k);
|
||||||
Color <<= 8;
|
Color <<= 8;
|
||||||
Color += clamp((int)(k*255), 0, 255);
|
Color += clamp((int)(k*255), 0, 255);
|
||||||
UI()->DoLabel(&Text, paLabels[s], 15.0f, -1);
|
UI()->DoLabelScaled(&Text, paLabels[s], 15.0f, -1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -348,7 +348,7 @@ void CMenus::UiDoGetButtons(int Start, int Stop, CUIRect View)
|
||||||
char aBuf[64];
|
char aBuf[64];
|
||||||
str_format(aBuf, sizeof(aBuf), "%s:", (const char *)Key.m_Name);
|
str_format(aBuf, sizeof(aBuf), "%s:", (const char *)Key.m_Name);
|
||||||
|
|
||||||
UI()->DoLabel(&Label, aBuf, 14.0f, -1);
|
UI()->DoLabelScaled(&Label, aBuf, 14.0f, -1);
|
||||||
int OldId = Key.m_KeyId;
|
int OldId = Key.m_KeyId;
|
||||||
int NewId = DoKeyReader((void *)&gs_aKeys[i].m_Name, &Button, OldId);
|
int NewId = DoKeyReader((void *)&gs_aKeys[i].m_Name, &Button, OldId);
|
||||||
if(NewId != OldId)
|
if(NewId != OldId)
|
||||||
|
@ -391,7 +391,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
||||||
RenderTools()->DrawUIRect(&MovementSettings, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
RenderTools()->DrawUIRect(&MovementSettings, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
||||||
MovementSettings.Margin(10.0f, &MovementSettings);
|
MovementSettings.Margin(10.0f, &MovementSettings);
|
||||||
|
|
||||||
TextRender()->Text(0, MovementSettings.x, MovementSettings.y, 14, Localize("Movement"), -1);
|
TextRender()->Text(0, MovementSettings.x, MovementSettings.y, 14.0f*UI()->Scale(), Localize("Movement"), -1);
|
||||||
|
|
||||||
MovementSettings.HSplitTop(14.0f+5.0f+10.0f, 0, &MovementSettings);
|
MovementSettings.HSplitTop(14.0f+5.0f+10.0f, 0, &MovementSettings);
|
||||||
|
|
||||||
|
@ -399,7 +399,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
||||||
CUIRect Button, Label;
|
CUIRect Button, Label;
|
||||||
MovementSettings.HSplitTop(20.0f, &Button, &MovementSettings);
|
MovementSettings.HSplitTop(20.0f, &Button, &MovementSettings);
|
||||||
Button.VSplitLeft(130.0f, &Label, &Button);
|
Button.VSplitLeft(130.0f, &Label, &Button);
|
||||||
UI()->DoLabel(&Label, Localize("Mouse sens."), 14.0f, -1);
|
UI()->DoLabel(&Label, Localize("Mouse sens."), 14.0f*UI()->Scale(), -1);
|
||||||
Button.HMargin(2.0f, &Button);
|
Button.HMargin(2.0f, &Button);
|
||||||
g_Config.m_InpMousesens = (int)(DoScrollbarH(&g_Config.m_InpMousesens, &Button, (g_Config.m_InpMousesens-5)/500.0f)*500.0f)+5;
|
g_Config.m_InpMousesens = (int)(DoScrollbarH(&g_Config.m_InpMousesens, &Button, (g_Config.m_InpMousesens-5)/500.0f)*500.0f)+5;
|
||||||
//*key.key = ui_do_key_reader(key.key, &Button, *key.key);
|
//*key.key = ui_do_key_reader(key.key, &Button, *key.key);
|
||||||
|
@ -416,7 +416,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
||||||
RenderTools()->DrawUIRect(&WeaponSettings, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
RenderTools()->DrawUIRect(&WeaponSettings, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
||||||
WeaponSettings.Margin(10.0f, &WeaponSettings);
|
WeaponSettings.Margin(10.0f, &WeaponSettings);
|
||||||
|
|
||||||
TextRender()->Text(0, WeaponSettings.x, WeaponSettings.y, 14, Localize("Weapon"), -1);
|
TextRender()->Text(0, WeaponSettings.x, WeaponSettings.y, 14.0f*UI()->Scale(), Localize("Weapon"), -1);
|
||||||
|
|
||||||
WeaponSettings.HSplitTop(14.0f+5.0f+10.0f, 0, &WeaponSettings);
|
WeaponSettings.HSplitTop(14.0f+5.0f+10.0f, 0, &WeaponSettings);
|
||||||
UiDoGetButtons(5, 12, WeaponSettings);
|
UiDoGetButtons(5, 12, WeaponSettings);
|
||||||
|
@ -429,7 +429,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
||||||
RenderTools()->DrawUIRect(&VotingSettings, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
RenderTools()->DrawUIRect(&VotingSettings, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
||||||
VotingSettings.Margin(10.0f, &VotingSettings);
|
VotingSettings.Margin(10.0f, &VotingSettings);
|
||||||
|
|
||||||
TextRender()->Text(0, VotingSettings.x, VotingSettings.y, 14, Localize("Voting"), -1);
|
TextRender()->Text(0, VotingSettings.x, VotingSettings.y, 14.0f*UI()->Scale(), Localize("Voting"), -1);
|
||||||
|
|
||||||
VotingSettings.HSplitTop(14.0f+5.0f+10.0f, 0, &VotingSettings);
|
VotingSettings.HSplitTop(14.0f+5.0f+10.0f, 0, &VotingSettings);
|
||||||
UiDoGetButtons(12, 14, VotingSettings);
|
UiDoGetButtons(12, 14, VotingSettings);
|
||||||
|
@ -442,7 +442,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
||||||
RenderTools()->DrawUIRect(&ChatSettings, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
RenderTools()->DrawUIRect(&ChatSettings, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
||||||
ChatSettings.Margin(10.0f, &ChatSettings);
|
ChatSettings.Margin(10.0f, &ChatSettings);
|
||||||
|
|
||||||
TextRender()->Text(0, ChatSettings.x, ChatSettings.y, 14, Localize("Chat"), -1);
|
TextRender()->Text(0, ChatSettings.x, ChatSettings.y, 14.0f*UI()->Scale(), Localize("Chat"), -1);
|
||||||
|
|
||||||
ChatSettings.HSplitTop(14.0f+5.0f+10.0f, 0, &ChatSettings);
|
ChatSettings.HSplitTop(14.0f+5.0f+10.0f, 0, &ChatSettings);
|
||||||
UiDoGetButtons(14, 17, ChatSettings);
|
UiDoGetButtons(14, 17, ChatSettings);
|
||||||
|
@ -451,11 +451,11 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
||||||
// misc settings
|
// misc settings
|
||||||
{
|
{
|
||||||
MiscSettings.HSplitTop(10.0f, 0, &MiscSettings);
|
MiscSettings.HSplitTop(10.0f, 0, &MiscSettings);
|
||||||
MiscSettings.HSplitTop(MainView.h/2-5.0f-45.0f, &MiscSettings, &ResetButton);
|
MiscSettings.HSplitBottom(50.0f*UI()->Scale(), &MiscSettings, &ResetButton);
|
||||||
RenderTools()->DrawUIRect(&MiscSettings, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
RenderTools()->DrawUIRect(&MiscSettings, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
||||||
MiscSettings.Margin(10.0f, &MiscSettings);
|
MiscSettings.Margin(10.0f, &MiscSettings);
|
||||||
|
|
||||||
TextRender()->Text(0, MiscSettings.x, MiscSettings.y, 14, Localize("Miscellaneous"), -1);
|
TextRender()->Text(0, MiscSettings.x, MiscSettings.y, 14.0f*UI()->Scale(), Localize("Miscellaneous"), -1);
|
||||||
|
|
||||||
MiscSettings.HSplitTop(14.0f+5.0f+10.0f, 0, &MiscSettings);
|
MiscSettings.HSplitTop(14.0f+5.0f+10.0f, 0, &MiscSettings);
|
||||||
UiDoGetButtons(17, 21, MiscSettings);
|
UiDoGetButtons(17, 21, MiscSettings);
|
||||||
|
@ -517,7 +517,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
||||||
if(Item.m_Visible)
|
if(Item.m_Visible)
|
||||||
{
|
{
|
||||||
str_format(aBuf, sizeof(aBuf), " %dx%d %d bit", s_aModes[i].m_Width, s_aModes[i].m_Height, Depth);
|
str_format(aBuf, sizeof(aBuf), " %dx%d %d bit", s_aModes[i].m_Width, s_aModes[i].m_Height, Depth);
|
||||||
UI()->DoLabel(&Item.m_Rect, aBuf, 16.0f, -1);
|
UI()->DoLabelScaled(&Item.m_Rect, aBuf, 16.0f, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,7 +594,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
||||||
MainView.HSplitTop(20.0f, 0, &MainView);
|
MainView.HSplitTop(20.0f, 0, &MainView);
|
||||||
MainView.HSplitTop(20.0f, &Text, &MainView);
|
MainView.HSplitTop(20.0f, &Text, &MainView);
|
||||||
//text.VSplitLeft(15.0f, 0, &text);
|
//text.VSplitLeft(15.0f, 0, &text);
|
||||||
UI()->DoLabel(&Text, Localize("UI Color"), 14.0f, -1);
|
UI()->DoLabelScaled(&Text, Localize("UI Color"), 14.0f, -1);
|
||||||
|
|
||||||
const char *paLabels[] = {
|
const char *paLabels[] = {
|
||||||
Localize("Hue"),
|
Localize("Hue"),
|
||||||
|
@ -614,7 +614,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
||||||
float k = (*pColorSlider[s]) / 255.0f;
|
float k = (*pColorSlider[s]) / 255.0f;
|
||||||
k = DoScrollbarH(pColorSlider[s], &Button, k);
|
k = DoScrollbarH(pColorSlider[s], &Button, k);
|
||||||
*pColorSlider[s] = (int)(k*255.0f);
|
*pColorSlider[s] = (int)(k*255.0f);
|
||||||
UI()->DoLabel(&Text, paLabels[s], 15.0f, -1);
|
UI()->DoLabelScaled(&Text, paLabels[s], 15.0f, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -644,7 +644,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
|
||||||
char aBuf[64];
|
char aBuf[64];
|
||||||
str_format(aBuf, sizeof(aBuf), "%d", g_Config.m_SndRate);
|
str_format(aBuf, sizeof(aBuf), "%d", g_Config.m_SndRate);
|
||||||
MainView.HSplitTop(20.0f, &Button, &MainView);
|
MainView.HSplitTop(20.0f, &Button, &MainView);
|
||||||
UI()->DoLabel(&Button, Localize("Sample rate"), 14.0f, -1);
|
UI()->DoLabelScaled(&Button, Localize("Sample rate"), 14.0f, -1);
|
||||||
Button.VSplitLeft(110.0f, 0, &Button);
|
Button.VSplitLeft(110.0f, 0, &Button);
|
||||||
Button.VSplitLeft(180.0f, &Button, 0);
|
Button.VSplitLeft(180.0f, &Button, 0);
|
||||||
static float Offset = 0.0f;
|
static float Offset = 0.0f;
|
||||||
|
@ -663,7 +663,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
|
||||||
MainView.HSplitTop(20.0f, &Button, &MainView);
|
MainView.HSplitTop(20.0f, &Button, &MainView);
|
||||||
Button.VSplitLeft(110.0f, &Label, &Button);
|
Button.VSplitLeft(110.0f, &Label, &Button);
|
||||||
Button.HMargin(2.0f, &Button);
|
Button.HMargin(2.0f, &Button);
|
||||||
UI()->DoLabel(&Label, Localize("Sound volume"), 14.0f, -1);
|
UI()->DoLabelScaled(&Label, Localize("Sound volume"), 14.0f, -1);
|
||||||
g_Config.m_SndVolume = (int)(DoScrollbarH(&g_Config.m_SndVolume, &Button, g_Config.m_SndVolume/100.0f)*100.0f);
|
g_Config.m_SndVolume = (int)(DoScrollbarH(&g_Config.m_SndVolume, &Button, g_Config.m_SndVolume/100.0f)*100.0f);
|
||||||
MainView.HSplitTop(20.0f, 0, &MainView);
|
MainView.HSplitTop(20.0f, 0, &MainView);
|
||||||
}
|
}
|
||||||
|
@ -748,7 +748,7 @@ void CMenus::RenderLanguageSelection(CUIRect MainView)
|
||||||
CListboxItem Item = UiDoListboxNextItem(&r.front());
|
CListboxItem Item = UiDoListboxNextItem(&r.front());
|
||||||
|
|
||||||
if(Item.m_Visible)
|
if(Item.m_Visible)
|
||||||
UI()->DoLabel(&Item.m_Rect, r.front().m_Name, 16.0f, -1);
|
UI()->DoLabelScaled(&Item.m_Rect, r.front().m_Name, 16.0f, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
s_SelectedLanguage = UiDoListboxEnd(&s_ScrollValue, 0);
|
s_SelectedLanguage = UiDoListboxEnd(&s_ScrollValue, 0);
|
||||||
|
@ -787,7 +787,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
|
||||||
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Max demos"), g_Config.m_ClAutoDemoMax);
|
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Max demos"), g_Config.m_ClAutoDemoMax);
|
||||||
else
|
else
|
||||||
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Max demos"), Localize("no limit"));
|
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Max demos"), Localize("no limit"));
|
||||||
UI()->DoLabel(&Label, aBuf, 13.0f, -1);
|
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
|
||||||
g_Config.m_ClAutoDemoMax = static_cast<int>(DoScrollbarH(&g_Config.m_ClAutoDemoMax, &Button, g_Config.m_ClAutoDemoMax/1000.0f)*1000.0f+0.1f);
|
g_Config.m_ClAutoDemoMax = static_cast<int>(DoScrollbarH(&g_Config.m_ClAutoDemoMax, &Button, g_Config.m_ClAutoDemoMax/1000.0f)*1000.0f+0.1f);
|
||||||
|
|
||||||
Right.HSplitTop(10.0f, 0, &Right);
|
Right.HSplitTop(10.0f, 0, &Right);
|
||||||
|
@ -798,7 +798,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
|
||||||
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Max Screenshots"), g_Config.m_ClAutoScreenshotMax);
|
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Max Screenshots"), g_Config.m_ClAutoScreenshotMax);
|
||||||
else
|
else
|
||||||
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Max Screenshots"), Localize("no limit"));
|
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Max Screenshots"), Localize("no limit"));
|
||||||
UI()->DoLabel(&Label, aBuf, 13.0f, -1);
|
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
|
||||||
g_Config.m_ClAutoScreenshotMax = static_cast<int>(DoScrollbarH(&g_Config.m_ClAutoScreenshotMax, &Button, g_Config.m_ClAutoScreenshotMax/1000.0f)*1000.0f+0.1f);
|
g_Config.m_ClAutoScreenshotMax = static_cast<int>(DoScrollbarH(&g_Config.m_ClAutoScreenshotMax, &Button, g_Config.m_ClAutoScreenshotMax/1000.0f)*1000.0f+0.1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,13 +69,18 @@ CUIRect *CUI::Screen()
|
||||||
|
|
||||||
void CUI::SetScale(float s)
|
void CUI::SetScale(float s)
|
||||||
{
|
{
|
||||||
//config.UI()->Scale = (int)(s*100.0f);
|
g_Config.m_UiScale = (int)(s*100.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*float CUI::Scale()
|
float CUI::Scale()
|
||||||
{
|
{
|
||||||
return config.UI()->Scale/100.0f;
|
return g_Config.m_UiScale/100.0f;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
float CUIRect::Scale() const
|
||||||
|
{
|
||||||
|
return g_Config.m_UiScale/100.0f;
|
||||||
|
}
|
||||||
|
|
||||||
void CUI::ClipEnable(const CUIRect *r)
|
void CUI::ClipEnable(const CUIRect *r)
|
||||||
{
|
{
|
||||||
|
@ -138,6 +143,7 @@ void CUIRect::VSplitMid(CUIRect *pLeft, CUIRect *pRight) const
|
||||||
{
|
{
|
||||||
CUIRect r = *this;
|
CUIRect r = *this;
|
||||||
float Cut = r.w/2;
|
float Cut = r.w/2;
|
||||||
|
// Cut *= Scale();
|
||||||
|
|
||||||
if (pLeft)
|
if (pLeft)
|
||||||
{
|
{
|
||||||
|
@ -313,7 +319,6 @@ void CUI::DoLabel(const CUIRect *r, const char *pText, float Size, int Align, in
|
||||||
{
|
{
|
||||||
// TODO: FIX ME!!!!
|
// TODO: FIX ME!!!!
|
||||||
//Graphics()->BlendNormal();
|
//Graphics()->BlendNormal();
|
||||||
Size *= Scale();
|
|
||||||
if(Align == 0)
|
if(Align == 0)
|
||||||
{
|
{
|
||||||
float tw = TextRender()->TextWidth(0, Size, pText, MaxWidth);
|
float tw = TextRender()->TextWidth(0, Size, pText, MaxWidth);
|
||||||
|
@ -327,3 +332,8 @@ void CUI::DoLabel(const CUIRect *r, const char *pText, float Size, int Align, in
|
||||||
TextRender()->Text(0, r->x + r->w-tw, r->y - Size/10, Size, pText, MaxWidth);
|
TextRender()->Text(0, r->x + r->w-tw, r->y - Size/10, Size, pText, MaxWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CUI::DoLabelScaled(const CUIRect *r, const char *pText, float Size, int Align, int MaxWidth)
|
||||||
|
{
|
||||||
|
DoLabel(r, pText, Size*Scale(), Align, MaxWidth);
|
||||||
|
}
|
|
@ -6,7 +6,7 @@
|
||||||
class CUIRect
|
class CUIRect
|
||||||
{
|
{
|
||||||
// TODO: Refactor: Redo UI scaling
|
// TODO: Refactor: Redo UI scaling
|
||||||
float Scale() const { return 1.0f; }
|
float Scale() const;
|
||||||
public:
|
public:
|
||||||
float x, y, w, h;
|
float x, y, w, h;
|
||||||
|
|
||||||
|
@ -85,12 +85,13 @@ public:
|
||||||
|
|
||||||
// TODO: Refactor: Redo UI scaling
|
// TODO: Refactor: Redo UI scaling
|
||||||
void SetScale(float s);
|
void SetScale(float s);
|
||||||
float Scale() const { return 1.0f; }
|
float Scale();
|
||||||
|
|
||||||
int DoButtonLogic(const void *pID, const char *pText /* TODO: Refactor: Remove */, int Checked, const CUIRect *pRect);
|
int DoButtonLogic(const void *pID, const char *pText /* TODO: Refactor: Remove */, int Checked, const CUIRect *pRect);
|
||||||
|
|
||||||
// TODO: Refactor: Remove this?
|
// TODO: Refactor: Remove this?
|
||||||
void DoLabel(const CUIRect *pRect, const char *pText, float Size, int Align, int MaxWidth = -1);
|
void DoLabel(const CUIRect *pRect, const char *pText, float Size, int Align, int MaxWidth = -1);
|
||||||
|
void DoLabelScaled(const CUIRect *pRect, const char *pText, float Size, int Align, int MaxWidth = -1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ MACRO_CONFIG_STR(PlayerSkin, player_skin, 24, "default", CFGFLAG_CLIENT|CFGFLAG_
|
||||||
MACRO_CONFIG_INT(UiPage, ui_page, 5, 0, 9, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface page", -1)
|
MACRO_CONFIG_INT(UiPage, ui_page, 5, 0, 9, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface page", -1)
|
||||||
MACRO_CONFIG_INT(UiToolboxPage, ui_toolbox_page, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toolbox page", -1)
|
MACRO_CONFIG_INT(UiToolboxPage, ui_toolbox_page, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toolbox page", -1)
|
||||||
MACRO_CONFIG_STR(UiServerAddress, ui_server_address, 25, "localhost:8303", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface server address", -1)
|
MACRO_CONFIG_STR(UiServerAddress, ui_server_address, 25, "localhost:8303", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface server address", -1)
|
||||||
MACRO_CONFIG_INT(UiScale, ui_scale, 100, 1, 100000, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface scale", -1)
|
MACRO_CONFIG_INT(UiScale, ui_scale, 100, 50, 150, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface scale", -1)
|
||||||
|
|
||||||
MACRO_CONFIG_INT(UiColorHue, ui_color_hue, 160, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color hue", -1)
|
MACRO_CONFIG_INT(UiColorHue, ui_color_hue, 160, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color hue", -1)
|
||||||
MACRO_CONFIG_INT(UiColorSat, ui_color_sat, 70, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color saturation", -1)
|
MACRO_CONFIG_INT(UiColorSat, ui_color_sat, 70, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color saturation", -1)
|
||||||
|
|
Loading…
Reference in a new issue