forked from rosebudai/OpenRCT2-Web
Merge branch 'develop'
This commit is contained in:
203 files changed
+1572
-1331
No files matched your search
+2
-2
@@ -70,9 +70,9 @@ set(TITLE_SEQUENCE_VERSION "0.4.26")
|
||||
set(TITLE_SEQUENCE_URL "https://github.com/OpenRCT2/title-sequences/releases/download/v${TITLE_SEQUENCE_VERSION}/title-sequences.zip")
|
||||
set(TITLE_SEQUENCE_SHA256 "dabb9787b1576342fca4dd9f64b3f8cfa04a7e6ce9c2bb9610f47b762905c858")
|
||||
|
||||
set(OBJECTS_VERSION "1.7.3")
|
||||
set(OBJECTS_VERSION "1.7.5")
|
||||
set(OBJECTS_URL "https://github.com/OpenRCT2/objects/releases/download/v${OBJECTS_VERSION}/objects.zip")
|
||||
set(OBJECTS_SHA256 "c81029264578706ed1db88665e12a70a583e71dc4d3eb4db262535d2f0589eab")
|
||||
set(OBJECTS_SHA256 "c8b9d3039a920f67caf15b09e8312cc4f80d59ed7fe0288625b9ccedef606797")
|
||||
|
||||
set(OPENSFX_VERSION "1.0.6")
|
||||
set(OPENSFX_URL "https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v${OPENSFX_VERSION}/opensound.zip")
|
||||
|
||||
+5
-1
@@ -15,7 +15,8 @@ Includes all git commit authors. Aliases are GitHub usernames or community nickn
|
||||
* Joshua Jacobs (leicestersquare) - Graphic Artist
|
||||
|
||||
## Support team
|
||||
* Kenton Boadway (Krutonium) - Lead OpenScenarios
|
||||
* (Kyphii) - Lead OpenScenarios
|
||||
* Kenton Boadway (Krutonium) - Discord moderation
|
||||
|
||||
## Former development team members
|
||||
* Lewis Fox (LRFLEW)
|
||||
@@ -30,6 +31,7 @@ Appreciation for long term contributors to the project having provided substanti
|
||||
* Edward Calver (X7123M3-256)
|
||||
* Kelson Blakewood (spacek531)
|
||||
* (frutiemax)
|
||||
* (mixiate)
|
||||
|
||||
## Special Thanks
|
||||
Appreciation for contributors who have provided substantial work, but are no longer active.
|
||||
@@ -252,6 +254,8 @@ Appreciation for contributors who have provided substantial work, but are no lon
|
||||
* David Sungaila (sungaila)
|
||||
* Garrett Leach (GarrettLeach)
|
||||
* Ruohao (Jater) Xu (jaterx)
|
||||
* Marcel Vos (MarcelVos96)
|
||||
* Jonas Doggart
|
||||
|
||||
## Toolchain
|
||||
* (Balletie) - macOS
|
||||
|
||||
@@ -32,12 +32,9 @@ STR_0027 :السيارات المتصادمة
|
||||
STR_0028 :سفينة القراصنة
|
||||
STR_0029 :سفينة متأرجحة عكسية
|
||||
STR_0030 :كشك الطعام
|
||||
STR_0031 :كشك غير معروف (1D)
|
||||
STR_0032 :كشك الشرب
|
||||
STR_0033 :كشك غير معروف (1F)
|
||||
STR_0034 :متجر
|
||||
STR_0035 :أفعوانية الخيل
|
||||
STR_0036 :كشك غير معروف (22)
|
||||
STR_0037 :منصة المعلومات
|
||||
STR_0038 :غرفة الإستراحة
|
||||
STR_0039 :عجلة فيريس
|
||||
@@ -83,16 +80,10 @@ STR_0078 :إفعوانية منعطفه حاده معكوسة
|
||||
STR_0079 :السجادة السحرية
|
||||
STR_0080 :رحلة بالغواصة
|
||||
STR_0081 :طوافات النهر
|
||||
STR_0082 :رحلة غير معروفة (50)
|
||||
STR_0083 :مغامرة
|
||||
STR_0084 :رحلة غير معروفة (52)
|
||||
STR_0085 :رحلة غير معروفة (53)
|
||||
STR_0086 :رحلة غير معروفة (54)
|
||||
STR_0087 :رحلة غير معروفة (55)
|
||||
STR_0088 :إفعوانية دافعة معكوسة
|
||||
STR_0089 :إفعوانية دائرية مصغرة
|
||||
STR_0090 :رحلة مصغرة
|
||||
STR_0091 :رحلة غير معروفة (59)
|
||||
STR_0092 :LIM أفعوانية مُطلقة بواسطة
|
||||
STR_0093 :أفعوانية هجينة
|
||||
STR_0094 :أفعوانية سكة حديدية مفردة
|
||||
|
||||
+4
-10
@@ -32,12 +32,9 @@ STR_0027 :Cotxes de xoc
|
||||
STR_0028 :Vaixell amb balanceig
|
||||
STR_0029 :Vaixell amb balanceig i inversió
|
||||
STR_0030 :Estand de menjar
|
||||
STR_0031 :Estand desconegut (1D)
|
||||
STR_0032 :Estand de begudes
|
||||
STR_0033 :Estand desconegut (1F)
|
||||
STR_0034 :Tenda
|
||||
STR_0035 :Cavallets
|
||||
STR_0036 :Estand desconegut (22)
|
||||
STR_0037 :Quiosc d’informació
|
||||
STR_0038 :Lavabos
|
||||
STR_0039 :Roda de fira
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Forquilla invertida
|
||||
STR_0079 :Catifa màgica
|
||||
STR_0080 :Viatge submarí
|
||||
STR_0081 :Barques soleres
|
||||
STR_0082 :Atracció desconeguda (50)
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Atracció desconeguda (52)
|
||||
STR_0085 :Atracció desconeguda (53)
|
||||
STR_0086 :Atracció desconeguda (54)
|
||||
STR_0087 :Atracció desconeguda (55)
|
||||
STR_0088 :Muntanya russa d’impuls invers
|
||||
STR_0089 :Minimuntanya russa
|
||||
STR_0090 :La mina
|
||||
STR_0091 :Atracció desconeguda (59)
|
||||
STR_0092 :Muntanya russa d’impuls LIM
|
||||
STR_0093 :Muntanya russa híbrida
|
||||
STR_0094 :Muntanya russa d’un sol rail
|
||||
@@ -567,7 +558,7 @@ STR_1169 :(Cap)
|
||||
STR_1170 :{STRING}
|
||||
STR_1171 :{RED}Tancada
|
||||
STR_1172 :{YELLOW}{STRINGID}
|
||||
STR_1173 :Construir camins i cues
|
||||
STR_1173 :Construeix camins i cues
|
||||
STR_1174 :Hi ha un cartell pel mig.
|
||||
STR_1175 :Això no es pot construir a sobre d’un pendent.
|
||||
STR_1176 :Aquest camí aquí no es pot construir…
|
||||
@@ -3845,3 +3836,6 @@ STR_7001 :Nom de l’atracció
|
||||
STR_7002 :{STRINGID} {STRINGID}
|
||||
STR_7003 :El fitxer d’àudio «{STRING}» està truncat. Mostra esperada de {INT32}, però només n’hi ha {INT32}. Considereu reinstal·lar el RCT2.
|
||||
STR_7004 :Força que es torni a dibuixar
|
||||
STR_7005 :Dibuixa una àrea de camí
|
||||
STR_7006 :Dibuixa una vora al voltant de les imatges dels botons
|
||||
STR_7007 :Tipus d’atracció
|
||||
+3
-10
@@ -32,12 +32,9 @@ STR_0027 :Autodrom
|
||||
STR_0028 :Pirátská loď
|
||||
STR_0029 :Houpající se obrácená loď
|
||||
STR_0030 :Stánek s jídlem
|
||||
STR_0031 :Neznámý obchod (1D)
|
||||
STR_0032 :Stánek s pitím
|
||||
STR_0033 :Neznámý obchod (1F)
|
||||
STR_0034 :Obchod
|
||||
STR_0035 :Kolotoč
|
||||
STR_0036 :Neznámý obchod (22)
|
||||
STR_0037 :Informační kiosek
|
||||
STR_0038 :Toalety
|
||||
STR_0039 :Ruské kolo
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Ostrá zavěšená horská dráha
|
||||
STR_0079 :Kouzelný koberec
|
||||
STR_0080 :Podmořská jízda
|
||||
STR_0081 :Říční vory
|
||||
STR_0082 :Neznámá atrakce (50)
|
||||
STR_0083 :Loď Enterprise
|
||||
STR_0084 :Neznámá atrakce (52)
|
||||
STR_0085 :Neznámá atrakce (53)
|
||||
STR_0086 :Neznámá atrakce (54)
|
||||
STR_0087 :Neznámá atrakce (55)
|
||||
STR_0088 :Otočená impulsní dráha
|
||||
STR_0089 :Malá horská dráha
|
||||
STR_0090 :Mini dráha
|
||||
STR_0091 :Neznámá atrakce (59)
|
||||
STR_0092 :LIM horská dráha
|
||||
STR_0093 :Hybridní horská dráha
|
||||
STR_0094 :Jednokolejná horská dráha
|
||||
@@ -3845,4 +3836,6 @@ STR_7002 :{STRINGID} {STRINGID}
|
||||
STR_7003 :Zvukový soubor ‘{STRING}’ je zkrácený. Očekáván sample {INT32}, avšak pouze {INT32} je dostupných. Zvažte přeinstalování RCT2.
|
||||
STR_7004 :Vynutit překresl. (force redraw)
|
||||
STR_7005 :Stavět cesty v oblasti označené tažením
|
||||
STR_7006 :Vykreslit okraje tlačítek s obrázky
|
||||
STR_7006 :Vykreslit okraje tlačítek s obrázky
|
||||
STR_7007 :Typ atrakce
|
||||
STR_7008 :Neznámá atrakce ({INT32})
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Radiobiler
|
||||
STR_0028 :Svingende Skib
|
||||
STR_0029 :Svingende Inverteret Skib
|
||||
STR_0030 :Madbod
|
||||
STR_0031 :Ukendt Bod (1D)
|
||||
STR_0032 :Drikkebod
|
||||
STR_0033 :Ukendt Bod (1F)
|
||||
STR_0034 :Butik
|
||||
STR_0035 :Karrusel
|
||||
STR_0036 :Ukendt Bod (22)
|
||||
STR_0037 :Informations Kiosk
|
||||
STR_0038 :Toiletter
|
||||
STR_0039 :Pariserhjul
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Inverteret Hårnåls Rutschebane
|
||||
STR_0079 :Flyvende Tæppe
|
||||
STR_0080 :Ubåds Forlystelse
|
||||
STR_0081 :River Rafts
|
||||
STR_0082 :Ukendt Forlystelse (50)
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Ukendt Forlystelse (52)
|
||||
STR_0085 :Ukendt Forlystelse (53)
|
||||
STR_0086 :Ukendt Forlystelse (54)
|
||||
STR_0087 :Ukendt Forlystelse (55)
|
||||
STR_0088 :Inverteret Impuls Rutschebane
|
||||
STR_0089 :Mini Rutschebane
|
||||
STR_0090 :Mine Forlystelse
|
||||
STR_0091 :Ukendt Forlystelse (59)
|
||||
STR_0092 :LIM Accelereret Rutschebane
|
||||
STR_0093 :Hybrid Rutschebane
|
||||
STR_0094 :Enkelt skinde rutchebane
|
||||
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Autoscooter
|
||||
STR_0028 :Piratenschiff
|
||||
STR_0029 :Schwingendes Überkopfschiff
|
||||
STR_0030 :Imbissstand
|
||||
STR_0031 :Unbekannter Stand (1D)
|
||||
STR_0032 :Getränkestand
|
||||
STR_0033 :Unbekannter Stand (1F)
|
||||
STR_0034 :Stand
|
||||
STR_0035 :Karussell
|
||||
STR_0036 :Stand
|
||||
STR_0037 :Kiosk
|
||||
STR_0038 :Toiletten
|
||||
STR_0039 :Riesenrad
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Umgekehrte Haarnadelbahn
|
||||
STR_0079 :Fliegender Teppich
|
||||
STR_0080 :U-Boot-Fahrt
|
||||
STR_0081 :Floße
|
||||
STR_0082 :Unbekannte Bahn (50)
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Unbekannte Bahn (52)
|
||||
STR_0085 :Unbekannte Bahn (53)
|
||||
STR_0086 :Unbekannte Bahn (54)
|
||||
STR_0087 :Unbekannte Bahn (55)
|
||||
STR_0088 :Umgekehrte Impuls-Bahn
|
||||
STR_0089 :Miniachterbahn
|
||||
STR_0090 :Minenbahn
|
||||
STR_0091 :Unbekannte Bahn (59)
|
||||
STR_0092 :LIM-Achterbahn
|
||||
STR_0093 :Hybridachterbahn
|
||||
STR_0094 :Einschienenachterbahn
|
||||
@@ -3836,3 +3827,7 @@ STR_7000 :oder
|
||||
STR_7001 :Fahrgeschäftsname
|
||||
STR_7002 :{STRINGID} {STRINGID}
|
||||
STR_7003 :Die Audiodatei „{STRING}“ ist abgeschnitten. Sample {INT32} erwartet, es sind aber nur {INT32} verfügbar. Ziehen Sie eine Neuinstallation von RCT2 in Betracht.
|
||||
STR_7004 :Erzwinge Neuzeichnung
|
||||
STR_7005 :Baue eine Fläche aus Fußwegen
|
||||
STR_7006 :Zeichne Ränder um Bildknöpfe
|
||||
STR_7007 :Achterbahntyp
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Dodgems
|
||||
STR_0028 :Swinging Ship
|
||||
STR_0029 :Swinging Inverter Ship
|
||||
STR_0030 :Food Stall
|
||||
STR_0031 :Unknown Stall (1D)
|
||||
STR_0032 :Drink Stall
|
||||
STR_0033 :Unknown Stall (1F)
|
||||
STR_0034 :Shop
|
||||
STR_0035 :Merry-Go-Round
|
||||
STR_0036 :Unknown Stall (22)
|
||||
STR_0037 :Information Kiosk
|
||||
STR_0038 :Toilets
|
||||
STR_0039 :Ferris Wheel
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Inverted Hairpin Coaster
|
||||
STR_0079 :Magic Carpet
|
||||
STR_0080 :Submarine Ride
|
||||
STR_0081 :River Rafts
|
||||
STR_0082 :Unknown Ride (50)
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Unknown Ride (52)
|
||||
STR_0085 :Unknown Ride (53)
|
||||
STR_0086 :Unknown Ride (54)
|
||||
STR_0087 :Unknown Ride (55)
|
||||
STR_0088 :Inverted Impulse Coaster
|
||||
STR_0089 :Mini Roller Coaster
|
||||
STR_0090 :Mine Ride
|
||||
STR_0091 :Unknown Ride (59)
|
||||
STR_0092 :LIM Launched Roller Coaster
|
||||
STR_0093 :Hybrid Coaster
|
||||
STR_0094 :Single Rail Roller Coaster
|
||||
@@ -3846,3 +3837,4 @@ STR_7004 :Force Redraw
|
||||
STR_7005 :Drag an area of footpath
|
||||
STR_7006 :Draw border around image buttons
|
||||
STR_7007 :Ride Type
|
||||
STR_7008 :Unknown ride type ({INT32})
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Doĝemoj
|
||||
STR_0028 :Svingiĝanta Ŝipo
|
||||
STR_0029 :Svingiĝanta Inversiĝanta Ŝipo
|
||||
STR_0030 :Manĝaĵbudo
|
||||
STR_0031 :Nekonata Budo (1D)
|
||||
STR_0032 :Trinkaĵbudo
|
||||
STR_0033 :Nekonata Budo (1F)
|
||||
STR_0034 :Vendejo
|
||||
STR_0035 :Karuselo
|
||||
STR_0036 :Nekonata Budo (22)
|
||||
STR_0037 :Informokiosko
|
||||
STR_0038 :Necesejo
|
||||
STR_0039 :Spektoradego
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Inversigita Onda Fervojo kun Harpingloformaj Kurboj
|
||||
STR_0079 :Magia Tapiŝo
|
||||
STR_0080 :Submarŝiprajdo
|
||||
STR_0081 :Riverflosoj
|
||||
STR_0082 :Nekonata Atrakcio (50)
|
||||
STR_0083 :Centrifugilo
|
||||
STR_0084 :Nekonata Atrakcio (52)
|
||||
STR_0085 :Nekonata Atrakcio (53)
|
||||
STR_0086 :Nekonata Atrakcio (54)
|
||||
STR_0087 :Nekonata Atrakcio (55)
|
||||
STR_0088 :Inversigita Lanĉita Onda Fervojo
|
||||
STR_0089 :Miniatura Onda Fervojo
|
||||
STR_0090 :Minrajdo
|
||||
STR_0091 :Nekonata Atrakcio (59)
|
||||
STR_0092 :Onda Fervojo Lanĉita per Linearaj Induktaj Motoroj
|
||||
STR_0093 :Hibrida Onda Fervojo
|
||||
STR_0094 :Onda Fervojo kun Unuopa Relo
|
||||
@@ -3841,3 +3832,5 @@ STR_7002 :{STRINGID} {STRINGID}
|
||||
STR_7003 :Sondosiero ‘{STRING}’ estas distranĉita. Atendis sonpecon {INT32}, sed nur {INT32} disponeblas. Konsideru reinstali je RCT2.
|
||||
STR_7004 :Devigi redesegnon
|
||||
STR_7005 :Treni areon de trotuaro
|
||||
STR_7006 :Desegni borderon ĉirkaŭ bildo-butonoj
|
||||
STR_7007 :Atrakciotipo
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Coches de Choque
|
||||
STR_0028 :Barco Pirata
|
||||
STR_0029 :Barco Balancín Invertido
|
||||
STR_0030 :Puesto de comida
|
||||
STR_0031 :Puesto Desconocido (1D)
|
||||
STR_0032 :Puesto de Bebidas
|
||||
STR_0033 :Puesto Desconocido (1F)
|
||||
STR_0034 :Tienda
|
||||
STR_0035 :Tiovivo
|
||||
STR_0036 :Puesto Desconocido (22)
|
||||
STR_0037 :Quiosco de Información
|
||||
STR_0038 :Baños
|
||||
STR_0039 :Rueda Gigante
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Horquilla invertida
|
||||
STR_0079 :Alfombra Mágica
|
||||
STR_0080 :Viaje Submarino
|
||||
STR_0081 :Balsas de Río
|
||||
STR_0082 :Atracc. Desconocida (50)
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Atracc. Desconocida (52)
|
||||
STR_0085 :Atracc. Desconocida (53)
|
||||
STR_0086 :Atracc. Desconocida (54)
|
||||
STR_0087 :Atracc. Desconocida (55)
|
||||
STR_0088 :Montaña Rusa Impulso Inverso
|
||||
STR_0089 :Mini Montaña Rusa
|
||||
STR_0090 :Trenes Mineros
|
||||
STR_0091 :Atracc. Desconocida (59)
|
||||
STR_0092 :Montaña Rusa acelerada por LIM
|
||||
STR_0093 :Montaña Rusa Híbrida
|
||||
STR_0094 :Montaña Rusa de un solo carril
|
||||
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Törmäilyautot
|
||||
STR_0028 :Merirosvolaiva
|
||||
STR_0029 :Kieppuva merirosvolaiva
|
||||
STR_0030 :Ruokakoju
|
||||
STR_0031 :Tuntematon koju (1D)
|
||||
STR_0032 :Juomakoju
|
||||
STR_0033 :Tuntematon koju (1F)
|
||||
STR_0034 :Kauppa
|
||||
STR_0035 :Karuselli
|
||||
STR_0036 :Tuntematon koju (22)
|
||||
STR_0037 :Infokioski
|
||||
STR_0038 :Vessa
|
||||
STR_0039 :Maailmanpyörä
|
||||
@@ -83,17 +80,11 @@ STR_0078 :Käänteinen hiusneularata
|
||||
STR_0079 :Taikamatto
|
||||
STR_0080 :Sukellusveneajelu
|
||||
STR_0081 :Jokilautat
|
||||
STR_0082 :Tuntematon laite (50)
|
||||
# 0083 is a name, and can't be translated. The ride itself was named after USS Enterprise from star trek, see wikipedia.
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Tuntematon laite (52)
|
||||
STR_0085 :Tuntematon laite (53)
|
||||
STR_0086 :Tuntematon laite (54)
|
||||
STR_0087 :Tuntematon laite (55)
|
||||
STR_0088 :Käänteinen impulssirata
|
||||
STR_0089 :Minivuoristorata
|
||||
STR_0090 :Kaivosajelu
|
||||
STR_0091 :Tuntematon laite (59)
|
||||
STR_0092 :Laukaisuvuoristorata
|
||||
STR_0093 :Hybridivuoristorata
|
||||
STR_0094 :Yksikiskoinen vuoristorata
|
||||
|
||||
@@ -34,12 +34,9 @@ STR_0027 :Autos tamponneuses
|
||||
STR_0028 :Bateau pirate
|
||||
STR_0029 :Bateau renverseur
|
||||
STR_0030 :Stand de nourriture
|
||||
STR_0031 :Stand inconnu (1D)
|
||||
STR_0032 :Stand de boissons
|
||||
STR_0033 :Stand inconnu (1F)
|
||||
STR_0034 :Boutique
|
||||
STR_0035 :Carrousel
|
||||
STR_0036 :Stand inconnu (22)
|
||||
STR_0037 :Kiosque d’information
|
||||
STR_0038 :Toilettes
|
||||
STR_0039 :Grande roue
|
||||
@@ -85,16 +82,10 @@ STR_0078 :Epingle à cheveux inversée
|
||||
STR_0079 :Tapis volant
|
||||
STR_0080 :Balade sous-marine
|
||||
STR_0081 :Radeau
|
||||
STR_0082 :Manège Inconnu (50)
|
||||
STR_0083 :Entreprise
|
||||
STR_0084 :Manège Inconnu (52)
|
||||
STR_0085 :Manège Inconnu (53)
|
||||
STR_0086 :Manège Inconnu (54)
|
||||
STR_0087 :Manège Inconnu (55)
|
||||
STR_0088 :Impulsion inversée
|
||||
STR_0089 :Mini-montagnes russes
|
||||
STR_0090 :Mineur
|
||||
STR_0091 :Manège Inconnu (59)
|
||||
STR_0092 :Moteur à induction linéaire
|
||||
STR_0093 :Montagnes russes hybrides
|
||||
STR_0094 :Montagnes russes à rail unique
|
||||
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Coches de choque
|
||||
STR_0028 :Barco pirata
|
||||
STR_0029 :Barco basculante invertido
|
||||
STR_0030 :posto de comida
|
||||
STR_0031 :Posto descoñecido (1D)
|
||||
STR_0032 :Posto de bebidas
|
||||
STR_0033 :Posto descoñecido (1F)
|
||||
STR_0034 :Tenda
|
||||
STR_0035 :Carrusel
|
||||
STR_0036 :Posto descoñecido (22)
|
||||
STR_0037 :Quiosco de información
|
||||
STR_0038 :Aseos
|
||||
STR_0039 :Nora
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Montaña Rusa de Prendedor invertido
|
||||
STR_0079 :Alfombra máxica
|
||||
STR_0080 :Viaxe submarina
|
||||
STR_0081 :Balsas fluviais
|
||||
STR_0082 :Atracción Descoñecida (50)
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Atracción Descoñecida (52)
|
||||
STR_0085 :Atracción Descoñecida (53)
|
||||
STR_0086 :Atracción Descoñecida (54)
|
||||
STR_0087 :Atracción Descoñecida (55)
|
||||
STR_0088 :Montaña rusa de impulso inverso
|
||||
STR_0089 :Mini montaña rusa
|
||||
STR_0090 :Atracción da mina
|
||||
STR_0091 :Atracción Descoñecida (59)
|
||||
STR_0092 :Montaña Rusa Lanzada por MIL
|
||||
STR_0093 :Montaña Rusa Híbrida
|
||||
STR_0094 :Montaña rusa dun só raíl
|
||||
@@ -3842,3 +3833,4 @@ STR_7003 :O ficheiro de son ‘{STRING}’ está incompleto. Agardabase {INT3
|
||||
STR_7004 :Forzar redeseño
|
||||
STR_7005 :Arrastra unha área de camiño
|
||||
STR_7006 :Debuxa un bordo arredor dos botóns de imaxe
|
||||
STR_7007 :Tipo de atracción
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Dodzsem
|
||||
STR_0028 :Hajóhinta
|
||||
STR_0029 :Fejreálló hajóhinta
|
||||
STR_0030 :Ételes bódé
|
||||
STR_0031 :Ismeretlen bódé (1D)
|
||||
STR_0032 :Italos bódé
|
||||
STR_0033 :Ismeretlen bódé (1F)
|
||||
STR_0034 :Bolt
|
||||
STR_0035 :Körhinta
|
||||
STR_0036 :Ismeretlen bódé (22)
|
||||
STR_0037 :Információs bódé
|
||||
STR_0038 :WC
|
||||
STR_0039 :Óriáskerék
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Fordított hajtű hullámvasút
|
||||
STR_0079 :Varázsszőnyeg
|
||||
STR_0080 :Tengeralattjáró-játék
|
||||
STR_0081 :Folyami tutajok
|
||||
STR_0082 :Ismeretlen játék (50)
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Ismeretlen játék (52)
|
||||
STR_0085 :Ismeretlen játék (53)
|
||||
STR_0086 :Ismeretlen játék (54)
|
||||
STR_0087 :Ismeretlen játék (55)
|
||||
STR_0088 :Fordított impulzus hullámvasút
|
||||
STR_0089 :Mini hullámvasút
|
||||
STR_0090 :Bányavasút
|
||||
STR_0091 :Ismeretlen játék (59)
|
||||
STR_0092 :Aszinkronmotoros hullámvasút
|
||||
STR_0093 :Hibrid hullámvasút
|
||||
STR_0094 :Egysínű hullámvasút
|
||||
@@ -3842,3 +3833,5 @@ STR_7003 :A(z) „{STRING}” hangfájl csonka. Minta {INT32} lenne az elvár
|
||||
STR_7004 :Újrarajzolás kényszerítése
|
||||
STR_7005 :Útterület építése húzással
|
||||
STR_7006 :Keret rajzolása a képgombok köré
|
||||
STR_7007 :Játéktípus
|
||||
STR_7008 :Ismeretlen játéktípus ({INT32})
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Autoscontri
|
||||
STR_0028 :Nave dei pirati
|
||||
STR_0029 :Nave oscillante invertita
|
||||
STR_0030 :Chiosco del cibo
|
||||
STR_0031 :Chiosco sconosciuto (1D)
|
||||
STR_0032 :Chiosco delle bibite
|
||||
STR_0033 :Chiosco sconosciuto (1F)
|
||||
STR_0034 :Chiosco
|
||||
STR_0035 :Giostra
|
||||
STR_0036 :Chiosco sconosciuto (22)
|
||||
STR_0037 :Chiosco
|
||||
STR_0038 :Servizi igienici
|
||||
STR_0039 :Ruota panoramica
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Ottovolante sottile invertito
|
||||
STR_0079 :Tappeto magico
|
||||
STR_0080 :Corsa sottomarina
|
||||
STR_0081 :River Rafts
|
||||
STR_0082 :Attrazione sconosciuta (50)
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Attrazione sconosciuta (52)
|
||||
STR_0085 :Attrazione sconosciuta (53)
|
||||
STR_0086 :Attrazione sconosciuta (54)
|
||||
STR_0087 :Attrazione sconosciuta (55)
|
||||
STR_0088 :Ottovolante invertito a impulso
|
||||
STR_0089 :Mini-ottovolante
|
||||
STR_0090 :Corsa nella miniera
|
||||
STR_0091 :Attrazione sconosciuta (59)
|
||||
STR_0092 :Ottovolante a lancio MIL
|
||||
STR_0093 :Ottovolante ibrido
|
||||
STR_0094 :Ottovolante a binario singolo
|
||||
|
||||
@@ -32,12 +32,9 @@ STR_0027 :バンパーカー
|
||||
STR_0028 :パイレーツシップ
|
||||
STR_0029 :スイング・インバータ・シップ
|
||||
STR_0030 :食べ物の店
|
||||
STR_0031 :Unknown Stall (1D)
|
||||
STR_0032 :飲料の店
|
||||
STR_0033 :Unknown Stall (1F)
|
||||
STR_0034 :ショップ
|
||||
STR_0035 :メリーゴーラウンド
|
||||
STR_0036 :Unknown Stall (22)
|
||||
STR_0037 :インフォーメーションセンター
|
||||
STR_0038 :トイレ
|
||||
STR_0039 :観覧車
|
||||
@@ -83,16 +80,10 @@ STR_0078 :インバーテッドヘアピンコースター
|
||||
STR_0079 :空飛ぶじゅうたん
|
||||
STR_0080 :潜水艦ライド
|
||||
STR_0081 :川いかだ
|
||||
STR_0082 :Unknown Ride (50)
|
||||
STR_0083 :エンタープライズ
|
||||
STR_0084 :Unknown Ride (52)
|
||||
STR_0085 :Unknown Ride (53)
|
||||
STR_0086 :Unknown Ride (54)
|
||||
STR_0087 :Unknown Ride (55)
|
||||
STR_0088 :インバーテッドインパルスコースター
|
||||
STR_0089 :ミニジェットコースター
|
||||
STR_0090 :鉱山ライド
|
||||
STR_0091 :Unknown Ride (59)
|
||||
STR_0092 :リニアモーターコースター
|
||||
STR_0093 :ハイブリッドコースター
|
||||
STR_0094 :シングルレール・ジェットコースター
|
||||
|
||||
@@ -32,12 +32,9 @@ STR_0027 :범퍼카
|
||||
STR_0028 :바이킹
|
||||
STR_0029 :360도 바이킹
|
||||
STR_0030 :음식 상점
|
||||
STR_0031 :알 수 없는 상점 (1D)
|
||||
STR_0032 :음료수 상점
|
||||
STR_0033 :알 수 없는 상점 (1F)
|
||||
STR_0034 :상점
|
||||
STR_0035 :회전목마
|
||||
STR_0036 :알 수 없는 상점 (22)
|
||||
STR_0037 :안내소
|
||||
STR_0038 :화장실
|
||||
STR_0039 :관람차
|
||||
@@ -83,16 +80,10 @@ STR_0078 :인버티드 헤어핀 코스터
|
||||
STR_0079 :마법의 양탄자
|
||||
STR_0080 :서브마린 라이드
|
||||
STR_0081 :리버 래프트
|
||||
STR_0082 :알 수 없는 놀이기구 (50)
|
||||
STR_0083 :엔터프라이즈
|
||||
STR_0084 :알 수 없는 놀이기구 (52)
|
||||
STR_0085 :알 수 없는 놀이기구 (53)
|
||||
STR_0086 :알 수 없는 놀이기구 (54)
|
||||
STR_0087 :알 수 없는 놀이기구 (55)
|
||||
STR_0088 :인버티드 임펄스 코스터
|
||||
STR_0089 :미니 롤러코스터
|
||||
STR_0090 :마인 라이드
|
||||
STR_0091 :알 수 없는 놀이기구 (59)
|
||||
STR_0092 :LIM 발진 롤러코스터
|
||||
STR_0093 :하이브리드 코스터
|
||||
STR_0094 :모노레일 롤러코스터
|
||||
@@ -3845,3 +3836,5 @@ STR_7003 :오디오 파일(‘{STRING}’) 데이터가 잘려있습니다. {
|
||||
STR_7004 :강제 화면 갱신
|
||||
STR_7005 :드래그로 보도 건설
|
||||
STR_7006 :버튼 주위에 경계선 표시
|
||||
STR_7007 :놀이기구 종류
|
||||
STR_7008 :알 수 없는 놀이기구 종류 ({INT32})
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Radiobiler
|
||||
STR_0028 :Piratskip
|
||||
STR_0029 :Roterende skip
|
||||
STR_0030 :Matbod
|
||||
STR_0031 :Ukjent bod (1D)
|
||||
STR_0032 :Drikkebod
|
||||
STR_0033 :Ukjent bod (1F)
|
||||
STR_0034 :Bod
|
||||
STR_0035 :Karusell
|
||||
STR_0036 :Ukjent bod (22)
|
||||
STR_0037 :Informasjonskiosk
|
||||
STR_0038 :Toaletter
|
||||
STR_0039 :Pariserhjul
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Invertert hårnålsbane
|
||||
STR_0079 :Flyvende teppe
|
||||
STR_0080 :Ubåtbane
|
||||
STR_0081 :Elveflåter
|
||||
STR_0082 :Ukjent attraksjon (50)
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Ukjent attraksjon (52)
|
||||
STR_0085 :Ukjent attraksjon (53)
|
||||
STR_0086 :Ukjent attraksjon (54)
|
||||
STR_0087 :Ukjent attraksjon (55)
|
||||
STR_0088 :Invertert impulsbane
|
||||
STR_0089 :Miniberg-og-dal-bane
|
||||
STR_0090 :Gruvebane
|
||||
STR_0091 :Ukjent attraksjon (59)
|
||||
STR_0092 :LIM-berg-og-dal-bane
|
||||
STR_0093 :Hybrid berg-og-dal-bane
|
||||
STR_0094 :Enkeltspor berg-og-dal-bane
|
||||
|
||||
@@ -29,12 +29,9 @@ STR_0027 :Botsauto’s
|
||||
STR_0028 :Schommelschip
|
||||
STR_0029 :Loopingschip
|
||||
STR_0030 :Eetkraam
|
||||
STR_0031 :Onbekende kraam (1D)
|
||||
STR_0032 :Drankkraam
|
||||
STR_0033 :Onbekende kraam (1F)
|
||||
STR_0034 :Winkel
|
||||
STR_0035 :Draaimolen
|
||||
STR_0036 :Onbekende kraam (22)
|
||||
STR_0037 :Informatiekiosk
|
||||
STR_0038 :Toilet
|
||||
STR_0039 :Reuzenrad
|
||||
@@ -80,16 +77,10 @@ STR_0078 :Omgekeerde haarspeldachtbaan
|
||||
STR_0079 :Vliegend tapijt
|
||||
STR_0080 :Onderzeeër-attractie
|
||||
STR_0081 :Riviertocht
|
||||
STR_0082 :Onbekende attractie (50)
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Onbekende attractie (52)
|
||||
STR_0085 :Onbekende attractie (53)
|
||||
STR_0086 :Onbekende attractie (54)
|
||||
STR_0087 :Onbekende attractie (55)
|
||||
STR_0088 :Omgekeerde Impulse-achtbaan
|
||||
STR_0089 :Mini-achtbaan
|
||||
STR_0090 :Aangedreven mijntrein
|
||||
STR_0091 :Onbekende attractie (59)
|
||||
STR_0092 :LIM-lanceringsachtbaan
|
||||
STR_0093 :Hybride achtbaan
|
||||
STR_0094 :Achtbaan met enkele rail
|
||||
@@ -3840,3 +3831,6 @@ STR_7002 :{STRINGID} {STRINGID}
|
||||
STR_7003 :Audiobestand ‘{STRING}’ is beschadigd. Sample nr. {INT32} kon niet worden geladen, aangezien er maar {INT32} beschikbaar zijn. Installeer RollerCoaster Tycoon 2 opnieuw.
|
||||
STR_7004 :Volledig beeld hertekenen
|
||||
STR_7005 :Voetpaden aanleggen door te slepen
|
||||
STR_7006 :Rand tekenen om knoppen met alleen een plaatje
|
||||
STR_7007 :Attractietype
|
||||
STR_7008 :Onbekend attractietype ({INT32})
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Unikajki
|
||||
STR_0028 :Okręt piracki
|
||||
STR_0029 :Morska huśtawka
|
||||
STR_0030 :Budka z jedzeniem
|
||||
STR_0031 :Nieznane stoisko (1D)
|
||||
STR_0032 :Budka z napojami
|
||||
STR_0033 :Nieznane stoisko (1F)
|
||||
STR_0034 :Stoisko
|
||||
STR_0035 :Karuzela obrotowa
|
||||
STR_0036 :Nieznane stoisko (22)
|
||||
STR_0037 :Punkt informacyjny
|
||||
STR_0038 :Toalety
|
||||
STR_0039 :Diabelski młyn
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Kolejka serpentynowa
|
||||
STR_0079 :Latający dywan
|
||||
STR_0080 :Podwodna podróż
|
||||
STR_0081 :Tratwy rzeczne
|
||||
STR_0082 :Nieznana atrakcja (50)
|
||||
STR_0083 :Krynolina
|
||||
STR_0084 :Nieznana atrakcja (52)
|
||||
STR_0085 :Nieznana atrakcja (53)
|
||||
STR_0086 :Nieznana atrakcja (54)
|
||||
STR_0087 :Nieznana atrakcja (55)
|
||||
STR_0088 :Kolejka zwrotna
|
||||
STR_0089 :Minikolejka
|
||||
STR_0090 :Przejażdżka kopalniana
|
||||
STR_0091 :Nieznana atrakcja (59)
|
||||
STR_0092 :Kolejka z napędem indukcyjnym liniowym
|
||||
STR_0093 :Kolejka hybrydowa
|
||||
STR_0094 :Kolejka jednoszynowa
|
||||
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Carrinho de Bate-Bate
|
||||
STR_0028 :Barco Viking
|
||||
STR_0029 :Navio de Balanço Reverso
|
||||
STR_0030 :Barraca de Comida
|
||||
STR_0031 :Barraca Desconhecida (1D)
|
||||
STR_0032 :Barraca de Bebida
|
||||
STR_0033 :Barraca Desconhecida (1F)
|
||||
STR_0034 :Loja
|
||||
STR_0035 :Carrossel
|
||||
STR_0036 :Barraca Desconhecida (22)
|
||||
STR_0037 :Quiosque de Informações
|
||||
STR_0038 :Banheiros
|
||||
STR_0039 :Roda Gigante
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Montanha Fechada Invertida
|
||||
STR_0079 :Tapete Mágico
|
||||
STR_0080 :Submarino
|
||||
STR_0081 :Balsas de rio
|
||||
STR_0082 :Brinquedo Desconhecido (50)
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Brinquedo Desconhecido (52)
|
||||
STR_0085 :Brinquedo Desconhecido (53)
|
||||
STR_0086 :Brinquedo Desconhecido (54)
|
||||
STR_0087 :Brinquedo Desconhecido (55)
|
||||
STR_0088 :Montanha de Impulso Invertida
|
||||
STR_0089 :Minimontanha-Russa
|
||||
STR_0090 :Brinquedo de Mina
|
||||
STR_0091 :Brinquedo Desconhecido (59)
|
||||
STR_0092 :Montanha-Russa de Indução Linear
|
||||
STR_0093 :Montanha-Russa Híbrida
|
||||
STR_0094 :Montanha-Russa de Trilho Único
|
||||
@@ -3841,3 +3832,6 @@ STR_7002 :{STRINGID} {STRINGID}
|
||||
STR_7003 :O arquivo de áudio ‘{STRING}’ está incompleto. {INT32} amostras eram esperadas, mas apenas {INT32} estão disponíveis. Considere reinstalar o RCT2.
|
||||
STR_7004 :Forçar Redesenho
|
||||
STR_7005 :Arrastar uma área de calçada
|
||||
STR_7006 :Desenhar borda ao redor dos botões com imagens
|
||||
STR_7007 :Tipo de Atração
|
||||
STR_7008 :Tipo de atração desconhecido ({INT32})
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Автодром
|
||||
STR_0028 :Пиратский корабль
|
||||
STR_0029 :Раскачивающийся инвертированный корабль
|
||||
STR_0030 :Киоск с едой
|
||||
STR_0031 :Неизвестный киоск (1D)
|
||||
STR_0032 :Киоск с питьём
|
||||
STR_0033 :Неизвестный киоск (1F)
|
||||
STR_0034 :Магазинчик
|
||||
STR_0035 :Карусель
|
||||
STR_0036 :Неизвестный киоск (22)
|
||||
STR_0037 :Информационный стенд
|
||||
STR_0038 :Туалеты
|
||||
STR_0039 :Колесо обозрения
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Горки «Обратная шпилька»
|
||||
STR_0079 :Ковёр-самолёт
|
||||
STR_0080 :Заплыв на подводной лодке
|
||||
STR_0081 :Речной рафтинг
|
||||
STR_0082 :Неизвестный аттракцион (50)
|
||||
STR_0083 :Центрифуга
|
||||
STR_0084 :Неизвестный аттракцион (52)
|
||||
STR_0085 :Неизвестный аттракцион (53)
|
||||
STR_0086 :Неизвестный аттракцион (54)
|
||||
STR_0087 :Неизвестный аттракцион (55)
|
||||
STR_0088 :Инвертированные импульсные горки
|
||||
STR_0089 :Мини-горки
|
||||
STR_0090 :Шахтёрская поездка
|
||||
STR_0091 :Неизвестный аттракцион (59)
|
||||
STR_0092 :Горки с запуском ЛИМ
|
||||
STR_0093 :Гибридные горки
|
||||
STR_0094 :Горки с одним рельсом
|
||||
@@ -3829,3 +3820,5 @@ STR_7002 :{STRINGID} {STRINGID}
|
||||
STR_7003 :Аудио-файл «{STRING}» повреждён. Ожидалось {INT32} образцов, но доступны только {INT32}. Рекомендуется повторная установка RCT2.
|
||||
STR_7004 :Полная перерисовка
|
||||
STR_7006 :Бордюр на кнопках с изображениями
|
||||
STR_7007 :Тип аттр.
|
||||
STR_7008 :Неизвестный аттракцион ({INT32})
|
||||
@@ -33,12 +33,9 @@ STR_0027 :Radiobilar
|
||||
STR_0028 :Piratskepp
|
||||
STR_0029 :Svängande omvänt piratskepp
|
||||
STR_0030 :Matstånd
|
||||
STR_0031 :Okänt stånd (1D)
|
||||
STR_0032 :Dryckesstånd
|
||||
STR_0033 :Okänt stånd (1F)
|
||||
STR_0034 :Stånd
|
||||
STR_0035 :Karusell
|
||||
STR_0036 :Okänt stånd (22)
|
||||
STR_0037 :Informationskiosk
|
||||
STR_0038 :Toaletter
|
||||
STR_0039 :Pariserhjul
|
||||
@@ -84,16 +81,10 @@ STR_0078 :Inverterad hårnålsbana
|
||||
STR_0079 :Flygande matta
|
||||
STR_0080 :Ubåtsbana
|
||||
STR_0081 :Flodflottar
|
||||
STR_0082 :Okänd åktur (50)
|
||||
STR_0083 :Enterprise
|
||||
STR_0084 :Okänd åktur (52)
|
||||
STR_0085 :Okänd åktur (53)
|
||||
STR_0086 :Okänd åktur (54)
|
||||
STR_0087 :Okänd åktur (55)
|
||||
STR_0088 :Inverterad impulsbana
|
||||
STR_0089 :Miniberg- och dalbana
|
||||
STR_0090 :Gruvattraktion
|
||||
STR_0091 :Okänd åktur (59)
|
||||
STR_0092 :Induktionsberg- och dalbana
|
||||
STR_0093 :Hybridberg- och dalbana
|
||||
STR_0094 :Enkelspårig berg- och dalbana
|
||||
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Çarpışan Arabalar
|
||||
STR_0028 :Korsan Gemisi
|
||||
STR_0029 :Tepe Takla Gemisi
|
||||
STR_0030 :Yiyecek Standı
|
||||
STR_0031 :Bilinmeyen Stant (1D)
|
||||
STR_0032 :İçecek Standı
|
||||
STR_0033 :Bilinmeyen Stant (1F)
|
||||
STR_0034 :Dükkan
|
||||
STR_0035 :Atlıkarınca
|
||||
STR_0036 :Bilinmeyen Stant (22)
|
||||
STR_0037 :Danışma
|
||||
STR_0038 :Tuvalet
|
||||
STR_0039 :Dönme Dolap
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Teleferik Treni
|
||||
STR_0079 :Sihirli Halı
|
||||
STR_0080 :Denizaltı Kiralama
|
||||
STR_0081 :Sal Seyahati
|
||||
STR_0082 :Bilinmeyen Alet (50)
|
||||
STR_0083 :Dönen Teker
|
||||
STR_0084 :Bilinmeyen Alet (52)
|
||||
STR_0085 :Bilinmeyen Alet (53)
|
||||
STR_0086 :Bilinmeyen Alet (54)
|
||||
STR_0087 :Bilinmeyen Alet (55)
|
||||
STR_0088 :Vida Treni
|
||||
STR_0089 :Mini Tren
|
||||
STR_0090 :Küçük Maden Treni
|
||||
STR_0091 :Bilinmeyen Alet (59)
|
||||
STR_0092 :LIM Tren
|
||||
STR_0096 :Klasik Tahta Tren
|
||||
STR_0512 :Sarmal şeklinde tırmanma zinciri rayı ile yükseğe çıkabilen çelik yapılı bir tren
|
||||
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Виверти
|
||||
STR_0028 :Корабель-гойдалка
|
||||
STR_0029 :Гойдалка з інвертором
|
||||
STR_0030 :Магазинчик їжі
|
||||
STR_0031 :Невідомий кіоск (1Д)
|
||||
STR_0032 :Магазинчик напоїв
|
||||
STR_0033 :Невідомий кіоск (1Ф)
|
||||
STR_0034 :Магазин
|
||||
STR_0035 :Весела карусель
|
||||
STR_0036 :Невідомий кіоск (22)
|
||||
STR_0037 :Довідковий кіоск
|
||||
STR_0038 :Туалети
|
||||
STR_0039 :Оглядове колесо
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Перевернута підставка для шпильок
|
||||
STR_0079 :Чарівний килим
|
||||
STR_0080 :Підводний човен
|
||||
STR_0081 :Річкові плоти
|
||||
STR_0082 :Невідомий атракціон (50)
|
||||
STR_0083 :Підприємство
|
||||
STR_0084 :Невідомий атракціон (52)
|
||||
STR_0085 :Невідомий атракціон (53)
|
||||
STR_0086 :Невідомий атракціон (54)
|
||||
STR_0087 :Невідомий атракціон (55)
|
||||
STR_0088 :Перевернуті імпульсні атракціони
|
||||
STR_0089 :Міні американські гірки
|
||||
STR_0090 :Атракціон "Шахта"
|
||||
STR_0091 :Невідомий атракціон (59)
|
||||
STR_0092 :Американські гірки, що запускаються LIM
|
||||
STR_0093 :Гібридні американські гірки
|
||||
STR_0094 :Однорейкові американські гірки
|
||||
|
||||
@@ -32,12 +32,9 @@ STR_0027 :Xe điện đụng
|
||||
STR_0028 :Tàu cướp biển
|
||||
STR_0029 :Tàu lượn siêu tốc xoay tròn
|
||||
STR_0030 :Quầy đồ ăn
|
||||
STR_0031 :Quầy không xác định (1D)
|
||||
STR_0032 :Quầy đồ uống
|
||||
STR_0033 :Quầy không xác định (1F)
|
||||
STR_0034 :Cửa hàng
|
||||
STR_0035 :Đu quay ngựa gỗ
|
||||
STR_0036 :Quầy không xác định (22)
|
||||
STR_0037 :Quầy thông tin
|
||||
STR_0038 :Nhà vệ sinh
|
||||
STR_0039 :Vòng quay Ferris
|
||||
@@ -83,16 +80,10 @@ STR_0078 :Tàu lượn ngược hình kẹp tóc
|
||||
STR_0079 :Thảm thần
|
||||
STR_0080 :Tàu ngầm
|
||||
STR_0081 :Thuyền bè
|
||||
STR_0082 :Trò chơi không xác định (50)
|
||||
STR_0083 :Vòng quay Enterprise
|
||||
STR_0084 :Trò chơi không xác định (52)
|
||||
STR_0085 :Trò chơi không xác định (53)
|
||||
STR_0086 :Trò chơi không xác định (54)
|
||||
STR_0087 :Trò chơi không xác định (55)
|
||||
STR_0088 :Tàu lượn siêu tốc xung ngược
|
||||
STR_0089 :Tàu lượn siêu tốc mini
|
||||
STR_0090 :Chuyến tàu mỏ
|
||||
STR_0091 :Trò chơi không xác định (59)
|
||||
STR_0092 :Tàu lượn siêu tốc khởi động LIM
|
||||
STR_0093 :Tàu lượn siêu tốc lai
|
||||
STR_0094 :Tàu lượn siêu tốc một ray
|
||||
|
||||
@@ -32,12 +32,9 @@ STR_0027 :碰碰车
|
||||
STR_0028 :海盗船
|
||||
STR_0029 :摇摆海盗船
|
||||
STR_0030 :食品小站
|
||||
STR_0031 :未知店铺(1D)
|
||||
STR_0032 :饮料铺
|
||||
STR_0033 :未知店铺(1F)
|
||||
STR_0034 :商店
|
||||
STR_0035 :旋转木马
|
||||
STR_0036 :未知店铺(22)
|
||||
STR_0037 :信息亭
|
||||
STR_0038 :厕所
|
||||
STR_0039 :摩天轮
|
||||
@@ -83,16 +80,10 @@ STR_0078 :回转发卡过山车
|
||||
STR_0079 :魔毯
|
||||
STR_0080 :迷你潜艇
|
||||
STR_0081 :水上木筏
|
||||
STR_0082 :未知游乐设施(50)
|
||||
STR_0083 :企业号
|
||||
STR_0084 :未知游乐设施(52)
|
||||
STR_0085 :未知游乐设施(53)
|
||||
STR_0086 :未知游乐设施(54)
|
||||
STR_0087 :未知游乐设施(55)
|
||||
STR_0088 :回转冲力过山车
|
||||
STR_0089 :迷你过山车
|
||||
STR_0090 :矿车式过山车
|
||||
STR_0091 :未知游乐设施(59)
|
||||
STR_0092 :LIM喷射过山车
|
||||
STR_0093 :混合过山车
|
||||
STR_0094 :单轨过山车
|
||||
|
||||
@@ -32,12 +32,9 @@ STR_0027 :碰碰車
|
||||
STR_0028 :海盜船
|
||||
STR_0029 :垂直迴轉海盜船
|
||||
STR_0030 :食物店鋪
|
||||
STR_0031 :Unknown Stall (1D)
|
||||
STR_0032 :飲料店鋪
|
||||
STR_0033 :Unknown Stall (1F)
|
||||
STR_0034 :商店
|
||||
STR_0035 :旋轉木馬
|
||||
STR_0036 :Unknown Stall (22)
|
||||
STR_0037 :訪客資訊中心
|
||||
STR_0038 :廁所
|
||||
STR_0039 :摩天輪
|
||||
@@ -83,16 +80,10 @@ STR_0078 :反轉髮夾彎式雲霄飛車
|
||||
STR_0079 :魔法地毯
|
||||
STR_0080 :潛艇遊道
|
||||
STR_0081 :木筏河道
|
||||
STR_0082 :Unknown Ride (50)
|
||||
STR_0083 :太空摩天輪
|
||||
STR_0084 :Unknown Ride (52)
|
||||
STR_0085 :Unknown Ride (53)
|
||||
STR_0086 :Unknown Ride (54)
|
||||
STR_0087 :Unknown Ride (55)
|
||||
STR_0088 :反轉極速式雲霄飛車
|
||||
STR_0089 :迷你雲霄飛車
|
||||
STR_0090 :礦遊式雲霄飛車
|
||||
STR_0091 :Unknown Ride (59)
|
||||
STR_0092 :直線電動機發車雲霄飛車
|
||||
STR_0093 :混合式雲霄飛車
|
||||
STR_0094 :單軌式雲霄飛車
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
0.4.29 (in development)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [#25459] Wall line dragging tool.
|
||||
- Improved: [#25028] Stalls now support colour presets, just like regular rides.
|
||||
- Improved: [#25426] Building the track designs index is now quicker.
|
||||
- Improved: [#25490] The ‘New Ride’ window can now be resized.
|
||||
- Fix: [#6228] The saved queue line path connections are not preserved when placing track designs (original bug).
|
||||
- Fix: [#14365] Track designs with scenery below the lowest track piece do not preview correctly.
|
||||
- Fix: [#25451] Dropdown item tooltips stay open if the mouse is moved over an empty space.
|
||||
- Fix: [#25454] Opening the land tool while building a path bridge or tunnel closes the Footpaths window.
|
||||
- Fix: [#25461] Path connections in raised track designs are sometimes broken when placed.
|
||||
- Fix: [#25467] Paths are not connected together correctly in track design previews.
|
||||
- Fix: [#25476] When both RCT2 and RCT1 are present, autodetection fails.
|
||||
- Fix: [#25480] The mini track design preview and price are misaligned in Enlarged UI mode.
|
||||
- Fix: [#25488] Crash in headless mode.
|
||||
- Fix: [#25494] The Go-Karts steep to flat track does not draw correctly in the flat side tunnel.
|
||||
- Fix: [#25518] The virtual floor does not draw correctly if expanded on the positive x and y axes.
|
||||
- Fix: [#25519] Crackling audio when sampling frequencies do not match.
|
||||
- Fix: [objects#401] Round tunnels on down slopes glitch.
|
||||
- Fix: [objects#404] Wooden Wild Mine cars incorrectly allow setting a third remap colour.
|
||||
- Fix: [objects#408] Australian fountain sets have confusing naming.
|
||||
- Fix: [objects#409] LIM Launched Coaster trains incorrectly have a 10% intensity modifier set (original bug).
|
||||
- Fix: [objects#410] Large scenery from the Wacky Worlds Africa theming have incorrect previews when using specific versions of the RCT2 base game.
|
||||
- Fix: [objects#415] Penguin bobsleigh trains show incorrect sprites on the 12° down slope (original bug).
|
||||
|
||||
0.4.28 (2025-11-01)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [#25286] Footpath area dragging tool.
|
||||
|
||||
Vendored
+2
-2
@@ -5354,11 +5354,11 @@ declare global {
|
||||
write(data: string): boolean;
|
||||
|
||||
on(event: "close", callback: (hadError: boolean) => void): Socket;
|
||||
on(event: "error", callback: (hadError: boolean) => void): Socket;
|
||||
on(event: "error", callback: (errorString: string) => void): Socket;
|
||||
on(event: "data", callback: (data: string) => void): Socket;
|
||||
|
||||
off(event: "close", callback: (hadError: boolean) => void): Socket;
|
||||
off(event: "error", callback: (hadError: boolean) => void): Socket;
|
||||
off(event: "error", callback: (errorString: string) => void): Socket;
|
||||
off(event: "data", callback: (data: string) => void): Socket;
|
||||
}
|
||||
|
||||
|
||||
@@ -218,8 +218,8 @@
|
||||
<LibsSha256 Condition="'$(Platform)'=='Win32'">490263b873dd02c13a043a04d26bb9837d2d378dacd8b2c8d29660fef44db3db</LibsSha256>
|
||||
<TitleSequencesUrl>https://github.com/OpenRCT2/title-sequences/releases/download/v0.4.26/title-sequences.zip</TitleSequencesUrl>
|
||||
<TitleSequencesSha256>dabb9787b1576342fca4dd9f64b3f8cfa04a7e6ce9c2bb9610f47b762905c858</TitleSequencesSha256>
|
||||
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.7.3/objects.zip</ObjectsUrl>
|
||||
<ObjectsSha256>c81029264578706ed1db88665e12a70a583e71dc4d3eb4db262535d2f0589eab</ObjectsSha256>
|
||||
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.7.5/objects.zip</ObjectsUrl>
|
||||
<ObjectsSha256>c8b9d3039a920f67caf15b09e8312cc4f80d59ed7fe0288625b9ccedef606797</ObjectsSha256>
|
||||
<OpenSFXUrl>https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v1.0.6/opensound.zip</OpenSFXUrl>
|
||||
<OpenSFXSha256>06b90f3e19c216752df441d551b26a9e3e1ba7755bdd2102504b73bf993608be</OpenSFXSha256>
|
||||
<OpenMSXUrl>https://github.com/OpenRCT2/OpenMusic/releases/download/v1.6.1/openmusic.zip</OpenMSXUrl>
|
||||
|
||||
@@ -1574,15 +1574,7 @@ namespace OpenRCT2
|
||||
STR_RIDE_MODE_NUMBER_OF_SWINGS_VALUE = 1771,
|
||||
STR_RIDE_MODE_SPEED_VALUE = 1331,
|
||||
STR_RIDE_MODE_TIME_LIMIT_VALUE = 1749,
|
||||
STR_RIDE_NAME_1D = 31,
|
||||
STR_RIDE_NAME_1F = 33,
|
||||
STR_RIDE_NAME_22 = 36,
|
||||
STR_RIDE_NAME_50 = 82,
|
||||
STR_RIDE_NAME_52 = 84,
|
||||
STR_RIDE_NAME_53 = 85,
|
||||
STR_RIDE_NAME_54 = 86,
|
||||
STR_RIDE_NAME_55 = 87,
|
||||
STR_RIDE_NAME_59 = 91,
|
||||
STR_RIDE_NAME_UNKNOWN_INT32 = 7008,
|
||||
STR_RIDE_SECONDARY_PRICE_VALUE = 1799,
|
||||
STR_RIDE_STATS_ALTITUDE = 1416,
|
||||
STR_RIDE_STATS_ALTITUDE_FORMAT = 1420,
|
||||
|
||||
@@ -254,7 +254,7 @@ namespace OpenRCT2::Audio
|
||||
size_t readLen = _source->Read(dst, _offset, bytesToRead);
|
||||
if (readLen > 0)
|
||||
{
|
||||
dst = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(dst) + readLen);
|
||||
dst = static_cast<void*>(static_cast<uint8_t*>(dst) + readLen);
|
||||
bytesToRead -= readLen;
|
||||
bytesRead += readLen;
|
||||
_offset += readLen;
|
||||
|
||||
@@ -40,9 +40,9 @@ void AudioMixer::Init(const char* device)
|
||||
|
||||
SDL_AudioSpec have;
|
||||
_deviceId = SDL_OpenAudioDevice(device, 0, &want, &have, 0);
|
||||
_format.format = have.format;
|
||||
_format.channels = have.channels;
|
||||
_format.freq = have.freq;
|
||||
_outputFormat.format = have.format;
|
||||
_outputFormat.channels = have.channels;
|
||||
_outputFormat.freq = have.freq;
|
||||
|
||||
SDL_PauseAudioDevice(_deviceId, 0);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ void AudioMixer::RemoveReleasedSources()
|
||||
|
||||
const AudioFormat& AudioMixer::GetFormat() const
|
||||
{
|
||||
return _format;
|
||||
return _outputFormat;
|
||||
}
|
||||
|
||||
void AudioMixer::GetNextAudioChunk(uint8_t* dst, size_t length)
|
||||
@@ -173,10 +173,10 @@ void AudioMixer::UpdateAdjustedSound()
|
||||
|
||||
void AudioMixer::MixChannel(ISDLAudioChannel* channel, uint8_t* data, size_t length)
|
||||
{
|
||||
int32_t byteRate = _format.GetByteRate();
|
||||
auto numSamples = static_cast<int32_t>(length / byteRate);
|
||||
int32_t outputByteRate = _outputFormat.GetByteRate();
|
||||
auto numSamples = static_cast<int32_t>(length / outputByteRate);
|
||||
double rate = 1;
|
||||
if (_format.format == AUDIO_S16SYS)
|
||||
if (_outputFormat.format == AUDIO_S16SYS)
|
||||
{
|
||||
rate = channel->GetRate();
|
||||
}
|
||||
@@ -185,11 +185,11 @@ void AudioMixer::MixChannel(ISDLAudioChannel* channel, uint8_t* data, size_t len
|
||||
SDL_AudioCVT cvt;
|
||||
cvt.len_ratio = 1;
|
||||
AudioFormat streamformat = channel->GetFormat();
|
||||
if (streamformat != _format)
|
||||
if (streamformat != _outputFormat)
|
||||
{
|
||||
if (SDL_BuildAudioCVT(
|
||||
&cvt, streamformat.format, streamformat.channels, streamformat.freq, _format.format, _format.channels,
|
||||
_format.freq)
|
||||
&cvt, streamformat.format, streamformat.channels, streamformat.freq, _outputFormat.format,
|
||||
_outputFormat.channels, _outputFormat.freq)
|
||||
== -1)
|
||||
{
|
||||
// Unable to convert channel data
|
||||
@@ -200,7 +200,7 @@ void AudioMixer::MixChannel(ISDLAudioChannel* channel, uint8_t* data, size_t len
|
||||
|
||||
// Read raw PCM from channel
|
||||
int32_t readSamples = numSamples * rate;
|
||||
auto readLength = static_cast<size_t>(readSamples / cvt.len_ratio) * byteRate;
|
||||
auto readLength = static_cast<size_t>(ceil(readSamples / cvt.len_ratio)) * outputByteRate;
|
||||
_channelBuffer.resize(readLength);
|
||||
size_t bytesRead = channel->Read(_channelBuffer.data(), readLength);
|
||||
|
||||
@@ -228,43 +228,45 @@ void AudioMixer::MixChannel(ISDLAudioChannel* channel, uint8_t* data, size_t len
|
||||
// Apply effects
|
||||
if (rate != 1)
|
||||
{
|
||||
auto inRate = static_cast<int32_t>(bufferLen / byteRate);
|
||||
auto inRate = static_cast<int32_t>(bufferLen / outputByteRate);
|
||||
int32_t outRate = numSamples;
|
||||
if (bytesRead != readLength)
|
||||
{
|
||||
inRate = _format.freq;
|
||||
outRate = _format.freq * (1 / rate);
|
||||
inRate = _outputFormat.freq;
|
||||
outRate = _outputFormat.freq * (1 / rate);
|
||||
}
|
||||
_effectBuffer.resize(length);
|
||||
bufferLen = ApplyResample(channel, buffer, static_cast<int32_t>(bufferLen / byteRate), numSamples, inRate, outRate);
|
||||
bufferLen = ApplyResample(
|
||||
channel, buffer, static_cast<int32_t>(bufferLen / outputByteRate), numSamples, inRate, outRate);
|
||||
buffer = _effectBuffer.data();
|
||||
}
|
||||
|
||||
// Apply panning and volume
|
||||
ApplyPan(channel, buffer, bufferLen, byteRate);
|
||||
ApplyPan(channel, buffer, bufferLen, outputByteRate);
|
||||
int32_t mixVolume = ApplyVolume(channel, buffer, bufferLen);
|
||||
|
||||
// Finally mix on to destination buffer
|
||||
size_t dstLength = std::min(length, bufferLen);
|
||||
SDL_MixAudioFormat(data, static_cast<const uint8_t*>(buffer), _format.format, static_cast<uint32_t>(dstLength), mixVolume);
|
||||
SDL_MixAudioFormat(
|
||||
data, static_cast<const uint8_t*>(buffer), _outputFormat.format, static_cast<uint32_t>(dstLength), mixVolume);
|
||||
|
||||
channel->UpdateOldVolume();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resample the given buffer into _effectBuffer.
|
||||
* Assumes that srcBuffer is the same format as _format.
|
||||
* Assumes that srcBuffer is the same format as _outputFormat.
|
||||
*/
|
||||
size_t AudioMixer::ApplyResample(
|
||||
ISDLAudioChannel* channel, const void* srcBuffer, int32_t srcSamples, int32_t dstSamples, int32_t inRate, int32_t outRate)
|
||||
{
|
||||
int32_t byteRate = _format.GetByteRate();
|
||||
int32_t outputByteRate = _outputFormat.GetByteRate();
|
||||
|
||||
// Create resampler
|
||||
SpeexResamplerState* resampler = channel->GetResampler();
|
||||
if (resampler == nullptr)
|
||||
{
|
||||
resampler = speex_resampler_init(_format.channels, _format.freq, _format.freq, 0, nullptr);
|
||||
resampler = speex_resampler_init(_outputFormat.channels, _outputFormat.freq, _outputFormat.freq, 0, nullptr);
|
||||
channel->SetResampler(resampler);
|
||||
}
|
||||
speex_resampler_set_rate(resampler, inRate, outRate);
|
||||
@@ -275,14 +277,14 @@ size_t AudioMixer::ApplyResample(
|
||||
resampler, static_cast<const spx_int16_t*>(srcBuffer), &inLen, reinterpret_cast<spx_int16_t*>(_effectBuffer.data()),
|
||||
&outLen);
|
||||
|
||||
return outLen * byteRate;
|
||||
return outLen * outputByteRate;
|
||||
}
|
||||
|
||||
void AudioMixer::ApplyPan(const IAudioChannel* channel, void* buffer, size_t len, size_t sampleSize)
|
||||
{
|
||||
if (channel->GetPan() != 0.5f && _format.channels == 2)
|
||||
if (channel->GetPan() != 0.5f && _outputFormat.channels == 2)
|
||||
{
|
||||
switch (_format.format)
|
||||
switch (_outputFormat.format)
|
||||
{
|
||||
case AUDIO_S16SYS:
|
||||
EffectPanS16(channel, static_cast<int16_t*>(buffer), static_cast<int32_t>(len / sampleSize));
|
||||
@@ -331,8 +333,8 @@ int32_t AudioMixer::ApplyVolume(const IAudioChannel* channel, void* buffer, size
|
||||
mixVolume = kMixerVolumeMax;
|
||||
|
||||
// Fade between volume levels to smooth out sound and minimize clicks from sudden volume changes
|
||||
int32_t fadeLength = static_cast<int32_t>(len) / _format.BytesPerSample();
|
||||
switch (_format.format)
|
||||
int32_t fadeLength = static_cast<int32_t>(len) / _outputFormat.BytesPerSample();
|
||||
switch (_outputFormat.format)
|
||||
{
|
||||
case AUDIO_S16SYS:
|
||||
EffectFadeS16(static_cast<int16_t*>(buffer), fadeLength, startVolume, endVolume);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenRCT2::Audio
|
||||
std::vector<std::unique_ptr<SDLAudioSource>> _sources;
|
||||
|
||||
SDL_AudioDeviceID _deviceId = 0;
|
||||
AudioFormat _format = {};
|
||||
AudioFormat _outputFormat = {};
|
||||
std::list<std::shared_ptr<ISDLAudioChannel>> _channels;
|
||||
float _volume = 1.0f;
|
||||
float _adjustSoundVolume = 0.0f;
|
||||
@@ -67,7 +67,7 @@ namespace OpenRCT2::Audio
|
||||
|
||||
/**
|
||||
* Resample the given buffer into _effectBuffer.
|
||||
* Assumes that srcBuffer is the same format as _format.
|
||||
* Assumes that srcBuffer is the same format as _outputFormat.
|
||||
*/
|
||||
size_t ApplyResample(
|
||||
ISDLAudioChannel* channel, const void* srcBuffer, int32_t srcSamples, int32_t dstSamples, int32_t inRate,
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace OpenRCT2::Audio
|
||||
_currentOffset = offset;
|
||||
}
|
||||
|
||||
auto dst8 = reinterpret_cast<uint8_t*>(dst);
|
||||
auto dst8 = static_cast<uint8_t*>(dst);
|
||||
auto bytesRead = ReadFromDecodeBuffer(dst8, len);
|
||||
dst8 += bytesRead;
|
||||
if (bytesRead < len)
|
||||
@@ -171,7 +171,7 @@ namespace OpenRCT2::Audio
|
||||
static FLAC__StreamDecoderReadStatus FlacCallbackRead(
|
||||
const FLAC__StreamDecoder* decoder, FLAC__byte buffer[], size_t* bytes, void* clientData)
|
||||
{
|
||||
auto* self = reinterpret_cast<FlacAudioSource*>(clientData);
|
||||
auto* self = static_cast<FlacAudioSource*>(clientData);
|
||||
if (*bytes > 0)
|
||||
{
|
||||
*bytes = SDL_RWread(self->_rw, buffer, sizeof(FLAC__byte), *bytes);
|
||||
@@ -193,7 +193,7 @@ namespace OpenRCT2::Audio
|
||||
static FLAC__StreamDecoderSeekStatus FlacCallbackSeek(
|
||||
const FLAC__StreamDecoder* decoder, FLAC__uint64 absoluteByteOffset, void* clientData)
|
||||
{
|
||||
auto* self = reinterpret_cast<FlacAudioSource*>(clientData);
|
||||
auto* self = static_cast<FlacAudioSource*>(clientData);
|
||||
if (SDL_RWseek(self->_rw, absoluteByteOffset, RW_SEEK_SET) < 0)
|
||||
{
|
||||
return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
|
||||
@@ -207,7 +207,7 @@ namespace OpenRCT2::Audio
|
||||
static FLAC__StreamDecoderTellStatus FlacCallbackTell(
|
||||
const FLAC__StreamDecoder* decoder, FLAC__uint64* absoluteByteOffset, void* clientData)
|
||||
{
|
||||
auto* self = reinterpret_cast<FlacAudioSource*>(clientData);
|
||||
auto* self = static_cast<FlacAudioSource*>(clientData);
|
||||
auto pos = SDL_RWtell(self->_rw);
|
||||
if (pos < 0)
|
||||
{
|
||||
@@ -223,7 +223,7 @@ namespace OpenRCT2::Audio
|
||||
static FLAC__StreamDecoderLengthStatus FlacCallbackLength(
|
||||
const FLAC__StreamDecoder* decoder, FLAC__uint64* streamLength, void* clientData)
|
||||
{
|
||||
auto* self = reinterpret_cast<FlacAudioSource*>(clientData);
|
||||
auto* self = static_cast<FlacAudioSource*>(clientData);
|
||||
auto pos = SDL_RWtell(self->_rw);
|
||||
auto length = SDL_RWseek(self->_rw, 0, RW_SEEK_END);
|
||||
if (SDL_RWseek(self->_rw, pos, RW_SEEK_SET) != pos || length < 0)
|
||||
@@ -239,7 +239,7 @@ namespace OpenRCT2::Audio
|
||||
|
||||
static FLAC__bool FlacCallbackEof(const FLAC__StreamDecoder* decoder, void* clientData)
|
||||
{
|
||||
auto* self = reinterpret_cast<FlacAudioSource*>(clientData);
|
||||
auto* self = static_cast<FlacAudioSource*>(clientData);
|
||||
auto pos = SDL_RWtell(self->_rw);
|
||||
auto end = SDL_RWseek(self->_rw, 0, RW_SEEK_END);
|
||||
if (pos == end)
|
||||
@@ -256,7 +256,7 @@ namespace OpenRCT2::Audio
|
||||
static FLAC__StreamDecoderWriteStatus FlacCallbackWrite(
|
||||
const FLAC__StreamDecoder* decoder, const FLAC__Frame* frame, const FLAC__int32* const buffer[], void* clientData)
|
||||
{
|
||||
auto* self = reinterpret_cast<FlacAudioSource*>(clientData);
|
||||
auto* self = static_cast<FlacAudioSource*>(clientData);
|
||||
|
||||
// Determine sizes
|
||||
auto channels = self->_format.channels;
|
||||
@@ -301,7 +301,7 @@ namespace OpenRCT2::Audio
|
||||
static void FlacCallbackMetadata(
|
||||
const FLAC__StreamDecoder* decoder, const FLAC__StreamMetadata* metadata, void* clientData)
|
||||
{
|
||||
auto* self = reinterpret_cast<FlacAudioSource*>(clientData);
|
||||
auto* self = static_cast<FlacAudioSource*>(clientData);
|
||||
if (metadata->type == FLAC__METADATA_TYPE_STREAMINFO)
|
||||
{
|
||||
self->_bitsPerSample = metadata->data.stream_info.bits_per_sample;
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenRCT2::Audio
|
||||
auto src = _data.data();
|
||||
if (src != nullptr)
|
||||
{
|
||||
std::copy_n(src + offset, bytesToRead, reinterpret_cast<uint8_t*>(dst));
|
||||
std::copy_n(src + offset, bytesToRead, static_cast<uint8_t*>(dst));
|
||||
}
|
||||
}
|
||||
return bytesToRead;
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace OpenRCT2::Audio
|
||||
}
|
||||
|
||||
auto readLen = static_cast<int64_t>(len);
|
||||
auto dst8 = reinterpret_cast<char*>(dst);
|
||||
auto dst8 = static_cast<char*>(dst);
|
||||
int64_t totalBytesRead{};
|
||||
int64_t bytesRead;
|
||||
do
|
||||
@@ -139,17 +139,17 @@ namespace OpenRCT2::Audio
|
||||
private:
|
||||
static size_t VorbisCallbackRead(void* ptr, size_t size, size_t nmemb, void* datasource)
|
||||
{
|
||||
return SDL_RWread(reinterpret_cast<SDL_RWops*>(datasource), ptr, size, nmemb);
|
||||
return SDL_RWread(static_cast<SDL_RWops*>(datasource), ptr, size, nmemb);
|
||||
}
|
||||
|
||||
static int VorbisCallbackSeek(void* datasource, ogg_int64_t offset, int whence)
|
||||
{
|
||||
return (SDL_RWseek(reinterpret_cast<SDL_RWops*>(datasource), offset, whence) < 0) ? -1 : 0;
|
||||
return (SDL_RWseek(static_cast<SDL_RWops*>(datasource), offset, whence) < 0) ? -1 : 0;
|
||||
}
|
||||
|
||||
static long VorbisCallbackTell(void* datasource)
|
||||
{
|
||||
return static_cast<long>(SDL_RWtell(reinterpret_cast<SDL_RWops*>(datasource)));
|
||||
return static_cast<long>(SDL_RWtell(static_cast<SDL_RWops*>(datasource)));
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <openrct2-ui/interface/Window.h>
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/core/Console.hpp>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/IDrawingContext.h>
|
||||
#include <openrct2/drawing/IDrawingEngine.h>
|
||||
@@ -1210,7 +1211,7 @@ void OpenGLDrawingContext::DrawTTFBitmap(
|
||||
right += clip.GetLeft() - rt.x;
|
||||
bottom += clip.GetTop() - rt.y;
|
||||
|
||||
if (info->flags & TEXT_DRAW_FLAG_OUTLINE)
|
||||
if (info->colourFlags.has(ColourFlag::withOutline))
|
||||
{
|
||||
std::array<ivec4, 4> boundsArr = { {
|
||||
{ left + 1, top, right + 1, bottom },
|
||||
@@ -1234,7 +1235,7 @@ void OpenGLDrawingContext::DrawTTFBitmap(
|
||||
command.zoom = 1.0f;
|
||||
}
|
||||
}
|
||||
if (info->flags & TEXT_DRAW_FLAG_INSET)
|
||||
if (info->colourFlags.has(ColourFlag::inset))
|
||||
{
|
||||
DrawRectCommand& command = _commandBuffers.rects.allocate();
|
||||
command.clip = { clip.GetLeft(), clip.GetTop(), clip.GetRight(), clip.GetBottom() };
|
||||
|
||||
@@ -211,7 +211,7 @@ namespace OpenRCT2
|
||||
|
||||
if (scroll.flags & HSCROLLBAR_VISIBLE)
|
||||
{
|
||||
int16_t size = widget.width() - 1;
|
||||
int16_t size = widget.width() - 2;
|
||||
if (scroll.flags & VSCROLLBAR_VISIBLE)
|
||||
size -= 11;
|
||||
size = std::max(0, scroll.contentWidth - size);
|
||||
@@ -671,7 +671,7 @@ namespace OpenRCT2
|
||||
const auto& widg = w.widgets[widgetIndex];
|
||||
auto& scroll = w.scrolls[scroll_id];
|
||||
|
||||
int32_t widget_width = widg.width() - 1;
|
||||
int32_t widget_width = widg.width() - 2;
|
||||
if (scroll.flags & VSCROLLBAR_VISIBLE)
|
||||
widget_width -= kScrollBarWidth + 1;
|
||||
int32_t widget_content_width = std::max(scroll.contentWidth - widget_width, 0);
|
||||
@@ -794,7 +794,7 @@ namespace OpenRCT2
|
||||
int32_t newLeft;
|
||||
newLeft = scroll.contentWidth;
|
||||
newLeft *= x;
|
||||
x = widget.width() - 21;
|
||||
x = widget.width() - 22;
|
||||
if (scroll.flags & VSCROLLBAR_VISIBLE)
|
||||
x -= kScrollBarWidth + 1;
|
||||
newLeft /= x;
|
||||
@@ -804,7 +804,7 @@ namespace OpenRCT2
|
||||
newLeft += x;
|
||||
if (newLeft < 0)
|
||||
newLeft = 0;
|
||||
x = widget.width() - 1;
|
||||
x = widget.width() - 2;
|
||||
if (scroll.flags & VSCROLLBAR_VISIBLE)
|
||||
x -= kScrollBarWidth + 1;
|
||||
x *= -1;
|
||||
@@ -891,7 +891,7 @@ namespace OpenRCT2
|
||||
auto& scroll = w.scrolls[scroll_id];
|
||||
scroll.flags |= HSCROLLBAR_RIGHT_PRESSED;
|
||||
scroll.contentOffsetX += 3;
|
||||
int32_t newLeft = widget.width() - 1;
|
||||
int32_t newLeft = widget.width() - 2;
|
||||
if (scroll.flags & VSCROLLBAR_VISIBLE)
|
||||
newLeft -= kScrollBarWidth + 1;
|
||||
newLeft *= -1;
|
||||
@@ -1466,6 +1466,11 @@ namespace OpenRCT2
|
||||
int32_t dropdown_index = DropdownIndexFromPoint(screenCoords, w);
|
||||
if (dropdown_index == -1)
|
||||
{
|
||||
if (gDropdown.hasTooltips && gDropdown.lastTooltipHover != -1)
|
||||
{
|
||||
gDropdown.lastTooltipHover = -1;
|
||||
WindowTooltipClose();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,9 @@ struct ImageId;
|
||||
|
||||
namespace OpenRCT2
|
||||
{
|
||||
struct ColourWithFlags;
|
||||
class Formatter;
|
||||
}
|
||||
} // namespace OpenRCT2
|
||||
|
||||
namespace OpenRCT2::Dropdown
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <openrct2-ui/interface/Graph.h>
|
||||
#include <openrct2/Date.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/localisation/Formatting.h>
|
||||
#include <openrct2/localisation/Localisation.Date.h>
|
||||
@@ -37,7 +38,7 @@ namespace OpenRCT2::Graph
|
||||
char buffer[64]{};
|
||||
FormatStringToBuffer(buffer, sizeof(buffer), fmt, curLabel);
|
||||
DrawText(
|
||||
rt, { internalBounds.GetLeft() - kYTickMarkPadding, curScreenPos }, { FontStyle::Small, TextAlignment::RIGHT },
|
||||
rt, { internalBounds.GetLeft() - kYTickMarkPadding, curScreenPos }, { FontStyle::small, TextAlignment::right },
|
||||
buffer);
|
||||
// Draw Y label tick mark
|
||||
Rectangle::fill(
|
||||
@@ -69,7 +70,7 @@ namespace OpenRCT2::Graph
|
||||
ft.Add<StringId>(DateGameShortMonthNames[DateGetMonth((yearOver32 / 4) + MONTH_COUNT)]);
|
||||
DrawTextBasic(
|
||||
rt, screenCoords - ScreenCoordsXY{ 0, 14 }, STR_GRAPH_LABEL, ft,
|
||||
{ FontStyle::Small, TextAlignment::CENTRE });
|
||||
{ FontStyle::small, TextAlignment::centre });
|
||||
// Draw month tick mark
|
||||
Rectangle::fill(
|
||||
rt, { screenCoords - ScreenCoordsXY{ 0, 4 }, screenCoords - ScreenCoordsXY{ 0, 1 } }, PaletteIndex::pi10);
|
||||
@@ -100,7 +101,7 @@ namespace OpenRCT2::Graph
|
||||
kDashLength, PaletteIndex::pi10);
|
||||
GfxDrawDashedLine(rt, { { bounds.GetLeft(), coords.y }, coords }, kDashLength, PaletteIndex::pi10);
|
||||
|
||||
DrawText(rt, coords - ScreenCoordsXY{ 0, 16 }, { textCol, TextAlignment::CENTRE }, text);
|
||||
DrawText(rt, coords - ScreenCoordsXY{ 0, 16 }, { textCol, TextAlignment::centre }, text);
|
||||
|
||||
Rectangle::fill(rt, { { coords - ScreenCoordsXY{ 2, 2 } }, coords + ScreenCoordsXY{ 2, 2 } }, PaletteIndex::pi10);
|
||||
Rectangle::fill(rt, { { coords - ScreenCoordsXY{ 1, 1 } }, { coords + ScreenCoordsXY{ 1, 1 } } }, PaletteIndex::pi21);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/core/Money.hpp>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/world/Location.hpp>
|
||||
|
||||
namespace OpenRCT2::Graph
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/interface/Colour.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/interface/Viewport.h>
|
||||
#include <openrct2/interface/Window.h>
|
||||
#include <openrct2/localisation/Language.h>
|
||||
@@ -35,7 +36,7 @@ static InGameConsole _inGameConsole;
|
||||
|
||||
static FontStyle InGameConsoleGetFontStyle()
|
||||
{
|
||||
return (Config::Get().interface.consoleSmallFont ? FontStyle::Small : FontStyle::Medium);
|
||||
return (Config::Get().interface.consoleSmallFont ? FontStyle::small : FontStyle::medium);
|
||||
}
|
||||
|
||||
static int32_t InGameConsoleGetLineHeight()
|
||||
@@ -298,7 +299,7 @@ void InGameConsole::Draw(RenderTarget& rt) const
|
||||
return;
|
||||
|
||||
// Set font
|
||||
ColourWithFlags textColour = { ThemeGetColour(WindowClass::console, 1).colour, 0 };
|
||||
ColourWithFlags textColour = { ThemeGetColour(WindowClass::console, 1).colour, {} };
|
||||
const FontStyle style = InGameConsoleGetFontStyle();
|
||||
const int32_t lineHeight = InGameConsoleGetLineHeight();
|
||||
const int32_t maxLines = GetNumVisibleLines();
|
||||
@@ -306,7 +307,7 @@ void InGameConsole::Draw(RenderTarget& rt) const
|
||||
// TTF looks far better without the outlines
|
||||
if (!LocalisationService_UseTrueTypeFont())
|
||||
{
|
||||
textColour.setFlag(ColourFlag::withOutline, true);
|
||||
textColour.flags.set(ColourFlag::withOutline, true);
|
||||
}
|
||||
|
||||
Invalidate();
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/interface/Colour.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/localisation/Language.h>
|
||||
#include <openrct2/localisation/StringIds.h>
|
||||
#include <stdexcept>
|
||||
@@ -151,7 +152,7 @@ namespace OpenRCT2::Ui
|
||||
}
|
||||
static constexpr ColourWithFlags translucent(colour_t colour)
|
||||
{
|
||||
return ColourWithFlags{ colour, EnumToFlag(ColourFlag::translucent) };
|
||||
return ColourWithFlags{ colour, { ColourFlag::translucent } };
|
||||
}
|
||||
|
||||
static constexpr WindowThemeDesc kWindowThemeDescriptors[] =
|
||||
@@ -322,7 +323,7 @@ namespace OpenRCT2::Ui
|
||||
for (uint8_t i = 0; i < wtDesc->windowColours.numColours; i++)
|
||||
{
|
||||
json_t jsonEntry = { { "colour", Colour::ToString(Theme.Colours[i].colour) },
|
||||
{ "translucent", Theme.Colours[i].hasFlag(ColourFlag::translucent) } };
|
||||
{ "translucent", Theme.Colours[i].flags.has(ColourFlag::translucent) } };
|
||||
|
||||
jsonColours.emplace_back(jsonEntry);
|
||||
}
|
||||
@@ -364,7 +365,8 @@ namespace OpenRCT2::Ui
|
||||
auto colourObject = Json::AsObject(jsonColours[i]);
|
||||
auto colour = Colour::FromString(Json::GetString(colourObject["colour"]), COLOUR_BLACK);
|
||||
auto isTranslucent = Json::GetBoolean(colourObject["translucent"], false);
|
||||
uint8_t flags = isTranslucent ? EnumToFlag(ColourFlag::translucent) : 0;
|
||||
ColourFlags flags{};
|
||||
flags.set(ColourFlag::translucent, isTranslucent);
|
||||
|
||||
result.Theme.Colours[i] = { colour, flags };
|
||||
}
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
#include <openrct2/interface/Colour.h>
|
||||
#include <openrct2/interface/Window.h>
|
||||
|
||||
namespace OpenRCT2
|
||||
{
|
||||
struct ColourWithFlags;
|
||||
}
|
||||
|
||||
namespace OpenRCT2::Ui
|
||||
{
|
||||
enum
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/drawing/Text.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/localisation/Formatting.h>
|
||||
#include <openrct2/localisation/StringIds.h>
|
||||
@@ -357,9 +358,9 @@ namespace OpenRCT2::Ui
|
||||
return;
|
||||
|
||||
auto colour = w.colours[widget.colour];
|
||||
colour.setFlag(ColourFlag::translucent, false);
|
||||
colour.flags.set(ColourFlag::translucent, false);
|
||||
if (widgetIsDisabled(w, widgetIndex))
|
||||
colour.setFlag(ColourFlag::inset, true);
|
||||
colour.flags.set(ColourFlag::inset, true);
|
||||
|
||||
// Resolve the absolute ltrb
|
||||
auto topLeft = w.windowPos + ScreenCoordsXY{ widget.left, 0 };
|
||||
@@ -381,11 +382,11 @@ namespace OpenRCT2::Ui
|
||||
ScreenCoordsXY coords = { (topLeft.x + r + 1) / 2 - 1, topLeft.y };
|
||||
if (widget.type == WidgetType::labelCentred)
|
||||
{
|
||||
DrawTextWrapped(rt, coords, widget.width() - 2, stringId, ft, { colour, TextAlignment::CENTRE });
|
||||
DrawTextWrapped(rt, coords, widget.width() - 3, stringId, ft, { colour, TextAlignment::centre });
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawTextEllipsised(rt, coords, widget.width() - 2, stringId, ft, { colour, TextAlignment::CENTRE });
|
||||
DrawTextEllipsised(rt, coords, widget.width() - 3, stringId, ft, { colour, TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,7 +404,7 @@ namespace OpenRCT2::Ui
|
||||
|
||||
auto colour = w.colours[widget.colour];
|
||||
if (widgetIsDisabled(w, widgetIndex))
|
||||
colour.setFlag(ColourFlag::inset, true);
|
||||
colour.flags.set(ColourFlag::inset, true);
|
||||
|
||||
// Resolve the absolute ltrb
|
||||
int32_t l = w.windowPos.x + widget.left;
|
||||
@@ -429,7 +430,7 @@ namespace OpenRCT2::Ui
|
||||
ScreenCoordsXY coords = { l + 1, t };
|
||||
if (widget.type == WidgetType::labelCentred)
|
||||
{
|
||||
DrawTextWrapped(rt, coords, r - l, stringId, ft, { colour, TextAlignment::CENTRE });
|
||||
DrawTextWrapped(rt, coords, r - l, stringId, ft, { colour, TextAlignment::centre });
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -492,7 +493,7 @@ namespace OpenRCT2::Ui
|
||||
{
|
||||
auto colour = w.colours[widget.colour].withFlag(ColourFlag::translucent, false);
|
||||
if (widgetIsDisabled(w, widgetIndex))
|
||||
colour.setFlag(ColourFlag::inset, true);
|
||||
colour.flags.set(ColourFlag::inset, true);
|
||||
|
||||
utf8 buffer[512] = { 0 };
|
||||
OpenRCT2::FormatStringLegacy(buffer, sizeof(buffer), stringId, rawFt.Data());
|
||||
@@ -500,7 +501,7 @@ namespace OpenRCT2::Ui
|
||||
auto ft = Formatter();
|
||||
ft.Add<utf8*>(buffer);
|
||||
DrawTextBasic(rt, { l, t }, STR_STRING, ft, { colour });
|
||||
textRight = l + GfxGetStringWidth(buffer, FontStyle::Medium) + 1;
|
||||
textRight = l + GfxGetStringWidth(buffer, FontStyle::medium) + 1;
|
||||
}
|
||||
|
||||
// Border
|
||||
@@ -571,7 +572,7 @@ namespace OpenRCT2::Ui
|
||||
return;
|
||||
|
||||
topLeft = w.windowPos + ScreenCoordsXY{ widget->left + 2, widget->top + 1 };
|
||||
int32_t width = widget->width() - 4;
|
||||
int32_t width = widget->width() - 5;
|
||||
|
||||
if (static_cast<size_t>(widgetIndex + 1) < w.widgets.size()
|
||||
&& (w.widgets[widgetIndex + 1]).type == WidgetType::closeBox)
|
||||
@@ -589,7 +590,7 @@ namespace OpenRCT2::Ui
|
||||
|
||||
DrawTextEllipsised(
|
||||
rt, topLeft, width, widget->text, Formatter::Common(),
|
||||
{ ColourWithFlags{ COLOUR_WHITE }.withFlag(ColourFlag::withOutline, true), TextAlignment::CENTRE });
|
||||
{ ColourWithFlags{ COLOUR_WHITE }.withFlag(ColourFlag::withOutline, true), TextAlignment::centre });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -624,9 +625,9 @@ namespace OpenRCT2::Ui
|
||||
topLeft = w.windowPos + ScreenCoordsXY{ widget.midX() - 1, std::max<int32_t>(widget.top, widget.midY() - 5) };
|
||||
|
||||
if (widgetIsDisabled(w, widgetIndex))
|
||||
colour.setFlag(ColourFlag::inset, true);
|
||||
colour.flags.set(ColourFlag::inset, true);
|
||||
|
||||
DrawText(rt, topLeft, { colour, TextAlignment::CENTRE }, widget.string);
|
||||
DrawText(rt, topLeft, { colour, TextAlignment::centre }, widget.string);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -652,7 +653,7 @@ namespace OpenRCT2::Ui
|
||||
|
||||
if (widgetIsDisabled(w, widgetIndex))
|
||||
{
|
||||
colour.setFlag(ColourFlag::inset, true);
|
||||
colour.flags.set(ColourFlag::inset, true);
|
||||
}
|
||||
|
||||
// fill it when checkbox is pressed
|
||||
@@ -676,7 +677,7 @@ namespace OpenRCT2::Ui
|
||||
}
|
||||
|
||||
DrawTextEllipsised(
|
||||
rt, w.windowPos + ScreenCoordsXY{ widget.left + 14, widget.textTop() }, widget.width() - 14, stringId, ft, colour);
|
||||
rt, w.windowPos + ScreenCoordsXY{ widget.left + 14, widget.textTop() }, widget.width() - 15, stringId, ft, colour);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -707,7 +708,7 @@ namespace OpenRCT2::Ui
|
||||
bottomRight.x--;
|
||||
bottomRight.y--;
|
||||
|
||||
bool hScrollNeeded = scroll.contentWidth > widget.width() && (scroll.flags & HSCROLLBAR_VISIBLE);
|
||||
bool hScrollNeeded = scroll.contentWidth > (widget.width() - 1) && (scroll.flags & HSCROLLBAR_VISIBLE);
|
||||
bool vScrollNeeded = scroll.contentHeight > widget.height() && (scroll.flags & VSCROLLBAR_VISIBLE);
|
||||
|
||||
// Horizontal scrollbar
|
||||
@@ -762,7 +763,7 @@ namespace OpenRCT2::Ui
|
||||
static void WidgetHScrollbarDraw(
|
||||
RenderTarget& rt, const ScrollArea& scroll, int32_t l, int32_t t, int32_t r, int32_t b, ColourWithFlags colour)
|
||||
{
|
||||
colour.setFlag(ColourFlag::translucent, false);
|
||||
colour.flags.set(ColourFlag::translucent, false);
|
||||
|
||||
// Trough
|
||||
Rectangle::fill(rt, { { l + kScrollBarWidth, t }, { r - kScrollBarWidth, b } }, ColourMapA[colour.colour].lighter);
|
||||
@@ -809,7 +810,7 @@ namespace OpenRCT2::Ui
|
||||
static void WidgetVScrollbarDraw(
|
||||
RenderTarget& rt, const ScrollArea& scroll, int32_t l, int32_t t, int32_t r, int32_t b, ColourWithFlags colour)
|
||||
{
|
||||
colour.setFlag(ColourFlag::translucent, false);
|
||||
colour.flags.set(ColourFlag::translucent, false);
|
||||
|
||||
// Trough
|
||||
Rectangle::fill(rt, { { l, t + kScrollBarWidth }, { r, b - kScrollBarWidth } }, ColourMapA[colour.colour].lighter);
|
||||
@@ -981,7 +982,7 @@ namespace OpenRCT2::Ui
|
||||
}
|
||||
|
||||
const auto& scroll = w.scrolls[*scroll_id];
|
||||
if ((scroll.flags & HSCROLLBAR_VISIBLE) && scroll.contentWidth > widget->width()
|
||||
if ((scroll.flags & HSCROLLBAR_VISIBLE) && scroll.contentWidth > (widget->width() - 1)
|
||||
&& screenCoords.y >= (w.windowPos.y + widget->bottom - (kScrollBarWidth + 1)))
|
||||
{
|
||||
// horizontal scrollbar
|
||||
@@ -1173,7 +1174,7 @@ namespace OpenRCT2::Ui
|
||||
if (widget.text != 0)
|
||||
{
|
||||
u8string wrappedString;
|
||||
GfxWrapString(widget.string, bottomRight.x - topLeft.x - 5, FontStyle::Medium, &wrappedString, nullptr);
|
||||
GfxWrapString(widget.string, bottomRight.x - topLeft.x - 5, FontStyle::medium, &wrappedString, nullptr);
|
||||
DrawText(rt, { topLeft.x + 2, topLeft.y }, { w.colours[1] }, wrappedString.c_str(), true);
|
||||
}
|
||||
return;
|
||||
@@ -1182,7 +1183,7 @@ namespace OpenRCT2::Ui
|
||||
// String length needs to add 12 either side of box
|
||||
// +13 for cursor when max length.
|
||||
u8string wrappedString;
|
||||
GfxWrapString(*textInput->Buffer, bottomRight.x - topLeft.x - 5 - 6, FontStyle::Medium, &wrappedString, nullptr);
|
||||
GfxWrapString(*textInput->Buffer, bottomRight.x - topLeft.x - 5 - 6, FontStyle::medium, &wrappedString, nullptr);
|
||||
|
||||
DrawText(rt, { topLeft.x + 2, topLeft.y }, { w.colours[1] }, wrappedString.c_str(), true);
|
||||
|
||||
@@ -1190,7 +1191,7 @@ namespace OpenRCT2::Ui
|
||||
int32_t curX = topLeft.x
|
||||
+ GfxGetStringWidthNoFormatting(
|
||||
u8string_view{ wrappedString.c_str(), std::min(wrappedString.length(), textInput->SelectionStart) },
|
||||
FontStyle::Medium)
|
||||
FontStyle::medium)
|
||||
+ 3;
|
||||
|
||||
int32_t width = 6;
|
||||
@@ -1199,7 +1200,7 @@ namespace OpenRCT2::Ui
|
||||
// Make a new 1 character wide string for measuring the width
|
||||
// of the character that the cursor is under. (NOTE: this is broken for multi byte utf8 codepoints)
|
||||
width = std::max(
|
||||
GfxGetStringWidthNoFormatting(u8string{ (*textInput->Buffer)[textInput->SelectionStart] }, FontStyle::Medium)
|
||||
GfxGetStringWidthNoFormatting(u8string{ (*textInput->Buffer)[textInput->SelectionStart] }, FontStyle::medium)
|
||||
- 2,
|
||||
4);
|
||||
}
|
||||
@@ -1235,7 +1236,7 @@ namespace OpenRCT2::Ui
|
||||
return;
|
||||
}
|
||||
|
||||
const auto barWidth = widget.width() - 2;
|
||||
const auto barWidth = widget.width() - 3;
|
||||
const int32_t fillSize = (barWidth * percentage) / 100;
|
||||
if (fillSize > 0)
|
||||
{
|
||||
@@ -1282,7 +1283,7 @@ namespace OpenRCT2::Ui
|
||||
|
||||
if (scroll.flags & HSCROLLBAR_VISIBLE)
|
||||
{
|
||||
int32_t view_size = widget.width() - 21;
|
||||
int32_t view_size = widget.width() - 22;
|
||||
if (scroll.flags & VSCROLLBAR_VISIBLE)
|
||||
view_size -= 11;
|
||||
int32_t x = scroll.contentOffsetX * view_size;
|
||||
@@ -1290,7 +1291,7 @@ namespace OpenRCT2::Ui
|
||||
x /= scroll.contentWidth;
|
||||
scroll.hThumbLeft = x + 11;
|
||||
|
||||
x = widget.width() - 2;
|
||||
x = widget.width() - 3;
|
||||
if (scroll.flags & VSCROLLBAR_VISIBLE)
|
||||
x -= 11;
|
||||
x += scroll.contentOffsetX;
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace OpenRCT2::Ui
|
||||
}
|
||||
else
|
||||
{
|
||||
int32_t size = widget->width() - 1;
|
||||
int32_t size = widget->width() - 2;
|
||||
if (scroll.flags & VSCROLLBAR_VISIBLE)
|
||||
size -= 11;
|
||||
size = std::max(0, scroll.contentWidth - size);
|
||||
@@ -492,7 +492,7 @@ namespace OpenRCT2::Ui
|
||||
assert(end_tab_id < w->widgets.size());
|
||||
|
||||
int32_t i, x = w->widgets[start_tab_id].left;
|
||||
int32_t tab_width = w->widgets[start_tab_id].width();
|
||||
int32_t tab_width = w->widgets[start_tab_id].width() - 1;
|
||||
|
||||
for (i = start_tab_id; i <= end_tab_id; i++)
|
||||
{
|
||||
|
||||
@@ -696,13 +696,13 @@ void CustomListView::PaintHeading(
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(STR_UP);
|
||||
DrawTextBasic(rt, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, { TextAlignment::RIGHT });
|
||||
DrawTextBasic(rt, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, { TextAlignment::right });
|
||||
}
|
||||
else if (sortOrder == ColumnSortOrder::Descending)
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(STR_DOWN);
|
||||
DrawTextBasic(rt, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, { TextAlignment::RIGHT });
|
||||
DrawTextBasic(rt, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, { TextAlignment::right });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -724,12 +724,12 @@ void CustomListView::PaintSeparator(RenderTarget& rt, const ScreenCoordsXY& pos,
|
||||
// Draw string
|
||||
Formatter ft;
|
||||
ft.Add<const char*>(text);
|
||||
DrawTextBasic(rt, { centreX, pos.y }, STR_STRING, ft, { baseColour, TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, { centreX, pos.y }, STR_STRING, ft, { baseColour, TextAlignment::centre });
|
||||
|
||||
// Get string dimensions
|
||||
utf8 stringBuffer[512]{};
|
||||
FormatStringLegacy(stringBuffer, sizeof(stringBuffer), STR_STRING, ft.Data());
|
||||
int32_t categoryStringHalfWidth = (GfxGetStringWidth(stringBuffer, FontStyle::Medium) / 2) + 4;
|
||||
int32_t categoryStringHalfWidth = (GfxGetStringWidth(stringBuffer, FontStyle::medium) / 2) + 4;
|
||||
int32_t strLeft = centreX - categoryStringHalfWidth;
|
||||
int32_t strRight = centreX + categoryStringHalfWidth;
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <openrct2/SpriteIds.h>
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/interface/Window.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/scripting/Plugin.h>
|
||||
@@ -157,7 +158,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
result.Text = ProcessString(desc["text"]);
|
||||
if (ProcessString(desc["textAlign"]) == "centred")
|
||||
{
|
||||
result.TextAlign = TextAlignment::CENTRE;
|
||||
result.TextAlign = TextAlignment::centre;
|
||||
}
|
||||
}
|
||||
else if (result.Type == "listview")
|
||||
@@ -318,9 +319,9 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (w.type() == DukValue::Type::NUMBER)
|
||||
{
|
||||
colour_t colour = w.as_uint() & ~kLegacyColourFlagTranslucent;
|
||||
auto isTranslucent = (w.as_uint() & kLegacyColourFlagTranslucent);
|
||||
bool isTranslucent = (w.as_uint() & kLegacyColourFlagTranslucent);
|
||||
c.colour = std::clamp<colour_t>(colour, COLOUR_BLACK, COLOUR_COUNT - 1);
|
||||
c.flags = (isTranslucent ? EnumToFlag(ColourFlag::translucent) : 0);
|
||||
c.flags.set(ColourFlag::translucent, isTranslucent);
|
||||
}
|
||||
return c;
|
||||
});
|
||||
@@ -488,7 +489,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
void onPrepareDraw() override
|
||||
{
|
||||
auto& closeButton = widgets[WIDX_CLOSE];
|
||||
bool translucent = colours[closeButton.colour].hasFlag(ColourFlag::translucent);
|
||||
bool translucent = colours[closeButton.colour].flags.has(ColourFlag::translucent);
|
||||
if (Config::Get().interface.enlargedUi)
|
||||
closeButton.string = !translucent ? kCloseBoxStringBlackLarge : kCloseBoxStringWhiteLarge;
|
||||
else
|
||||
@@ -518,7 +519,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (widget.type == WidgetType::scroll)
|
||||
{
|
||||
auto& listView = _info.ListViews[scrollIndex];
|
||||
auto wwidth = widget.width() + 1 - 2;
|
||||
auto wwidth = widget.width() - 2;
|
||||
auto wheight = widget.height() + 1 - 2;
|
||||
if (listView.GetScrollbars() == ScrollbarType::Horizontal
|
||||
|| listView.GetScrollbars() == ScrollbarType::Both)
|
||||
@@ -560,7 +561,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
RenderTarget widgetDpi;
|
||||
if (ClipDrawPixelInfo(
|
||||
widgetDpi, rt, { windowPos.x + widget.left, windowPos.y + widget.top }, widget.width(),
|
||||
widgetDpi, rt, { windowPos.x + widget.left, windowPos.y + widget.top }, widget.width() - 1,
|
||||
widget.height()))
|
||||
{
|
||||
auto ctx = onDraw.context();
|
||||
@@ -653,7 +654,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1,
|
||||
colours[widget->colour], 0, Dropdown::Flag::StayOpen, numItems, widget->width() - 3);
|
||||
colours[widget->colour], 0, Dropdown::Flag::StayOpen, numItems, widget->width() - 4);
|
||||
|
||||
if (selectedIndex >= 0 && selectedIndex < static_cast<int32_t>(numItems))
|
||||
gDropdown.items[selectedIndex].setChecked(true);
|
||||
@@ -808,7 +809,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto left = windowPos.x + viewportWidget->left + 1;
|
||||
auto top = windowPos.y + viewportWidget->top + 1;
|
||||
auto wwidth = viewportWidget->width() - 1;
|
||||
auto wwidth = viewportWidget->width() - 2;
|
||||
auto wheight = viewportWidget->height() - 1;
|
||||
if (viewport == nullptr)
|
||||
{
|
||||
@@ -1053,7 +1054,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
widget.type = WidgetType::label;
|
||||
widget.string = const_cast<utf8*>(desc.Text.c_str());
|
||||
widget.flags.set(WidgetFlag::textIsString);
|
||||
if (desc.TextAlign == TextAlignment::CENTRE)
|
||||
if (desc.TextAlign == TextAlignment::centre)
|
||||
{
|
||||
widget.type = WidgetType::labelCentred;
|
||||
}
|
||||
|
||||
@@ -159,8 +159,8 @@ namespace OpenRCT2::Scripting
|
||||
|
||||
DukValue measureText(const std::string& text)
|
||||
{
|
||||
auto width = GfxGetStringWidth(text, FontStyle::Medium);
|
||||
auto height = StringGetHeightRaw(text.c_str(), FontStyle::Medium);
|
||||
auto width = GfxGetStringWidth(text, FontStyle::medium);
|
||||
auto height = StringGetHeightRaw(text.c_str(), FontStyle::medium);
|
||||
return ToDuk<ScreenSize>(_ctx, { width, height });
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ namespace OpenRCT2::Scripting
|
||||
auto widget = GetWidget();
|
||||
if (widget != nullptr)
|
||||
{
|
||||
return widget->width() + 1;
|
||||
return widget->width();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "ScWidget.hpp"
|
||||
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/interface/Window.h>
|
||||
#include <openrct2/interface/WindowBase.h>
|
||||
#include <openrct2/scripting/Duktape.hpp>
|
||||
@@ -238,7 +239,7 @@ namespace OpenRCT2::Scripting
|
||||
for (auto c : w->colours)
|
||||
{
|
||||
auto colour = c.colour;
|
||||
if (c.hasFlag(ColourFlag::translucent))
|
||||
if (c.flags.has(ColourFlag::translucent))
|
||||
colour |= kLegacyColourFlagTranslucent;
|
||||
result.push_back(colour);
|
||||
}
|
||||
@@ -256,9 +257,9 @@ namespace OpenRCT2::Scripting
|
||||
if (i < colours.size())
|
||||
{
|
||||
colour_t colour = colours[i] & ~kLegacyColourFlagTranslucent;
|
||||
auto isTranslucent = (colours[i] & kLegacyColourFlagTranslucent);
|
||||
bool isTranslucent = (colours[i] & kLegacyColourFlagTranslucent);
|
||||
c.colour = std::clamp<colour_t>(colour, COLOUR_BLACK, COLOUR_COUNT - 1);
|
||||
c.flags = (isTranslucent ? EnumToFlag(ColourFlag::translucent) : 0);
|
||||
c.flags.set(ColourFlag::translucent, isTranslucent);
|
||||
}
|
||||
w->colours[i] = c;
|
||||
}
|
||||
|
||||
@@ -165,14 +165,14 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<StringId>(STR_TITLE_SEQUENCE_OPENRCT2);
|
||||
DrawTextWrapped(
|
||||
rt, aboutOpenRCT2Coords, 87, STR_WINDOW_COLOUR_2_STRINGID, ft,
|
||||
{ COLOUR_AQUAMARINE, TextAlignment::CENTRE });
|
||||
{ COLOUR_AQUAMARINE, TextAlignment::centre });
|
||||
}
|
||||
{
|
||||
// TODO: this string shouldn't be reused for this tab
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(STR_TITLE_SEQUENCE_RCT2);
|
||||
DrawTextWrapped(
|
||||
rt, aboutRCT2Coords, 87, STR_WINDOW_COLOUR_2_STRINGID, ft, { COLOUR_AQUAMARINE, TextAlignment::CENTRE });
|
||||
rt, aboutRCT2Coords, 87, STR_WINDOW_COLOUR_2_STRINGID, ft, { COLOUR_AQUAMARINE, TextAlignment::centre });
|
||||
}
|
||||
|
||||
int32_t newHeight = 0;
|
||||
@@ -232,9 +232,9 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
const auto& versionWidget = widgets[WIDX_VERSION];
|
||||
auto centreX = versionWidget.midX();
|
||||
auto centreY = versionWidget.midY() - FontGetLineHeight(FontStyle::Medium) / 2;
|
||||
auto centreY = versionWidget.midY() - FontGetLineHeight(FontStyle::medium) / 2;
|
||||
auto centrePos = windowPos + ScreenCoordsXY(centreX, centreY);
|
||||
DrawTextWrapped(rt, centrePos, versionWidget.width(), STR_STRING, ft, { colours[1], TextAlignment::CENTRE });
|
||||
DrawTextWrapped(rt, centrePos, versionWidget.width() - 1, STR_STRING, ft, { colours[1], TextAlignment::centre });
|
||||
|
||||
// Shows the update available button
|
||||
if (OpenRCT2::GetContext()->HasNewVersionInfo())
|
||||
@@ -243,7 +243,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
|
||||
// Draw the rest of the text
|
||||
TextPaint tp{ colours[1], TextAlignment::CENTRE };
|
||||
TextPaint tp{ colours[1], TextAlignment::centre };
|
||||
auto textCoords = windowPos + ScreenCoordsXY((width / 2) - 1, 240);
|
||||
auto textWidth = kWindowSize.width - (kPadding * 2);
|
||||
for (auto stringId : _OpenRCT2InfoStrings)
|
||||
@@ -257,7 +257,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto& backgroundWidget = widgets[WIDX_PAGE_BACKGROUND];
|
||||
auto textCoords = windowPos + ScreenCoordsXY{ backgroundWidget.midX(), backgroundWidget.top + kPadding };
|
||||
auto textWidth = kWindowSize.width - 20;
|
||||
TextPaint tp{ colours[1], TextAlignment::CENTRE };
|
||||
TextPaint tp{ colours[1], TextAlignment::centre };
|
||||
|
||||
// Draw credits
|
||||
for (auto stringId : _RCT2InfoStrings)
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
const auto& viewportWidget = widgets[WIDX_VIEWPORT];
|
||||
ViewportCreate(
|
||||
*this, windowPos + ScreenCoordsXY{ viewportWidget.left + 1, viewportWidget.top + 1 },
|
||||
(viewportWidget.width()) - 1, (viewportWidget.height()) - 1, Focus(_bannerViewPos));
|
||||
viewportWidget.width() - 2, (viewportWidget.height()) - 1, Focus(_bannerViewPos));
|
||||
|
||||
if (viewport != nullptr)
|
||||
viewport->flags = Config::Get().general.alwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE;
|
||||
@@ -177,7 +177,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ widget->left + windowPos.x, widget->top + windowPos.y }, widget->height() + 1, colours[1], 0,
|
||||
Dropdown::Flag::StayOpen, numItems, widget->width() + 3);
|
||||
Dropdown::Flag::StayOpen, numItems, widget->width() - 1 + 3);
|
||||
|
||||
gDropdown.items[EnumValue(banner->textColour) - 1].setChecked(true);
|
||||
break;
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
SetResizeDimensions();
|
||||
|
||||
auto downloadButtonWidth = widgets[WIDX_OPEN_URL].width();
|
||||
auto downloadButtonWidth = widgets[WIDX_OPEN_URL].width() - 1;
|
||||
widgets[WIDX_OPEN_URL].left = (width - downloadButtonWidth) / 2;
|
||||
widgets[WIDX_OPEN_URL].right = widgets[WIDX_OPEN_URL].left + downloadButtonWidth;
|
||||
}
|
||||
@@ -177,7 +177,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
void onScrollDraw(int32_t scrollIndex, RenderTarget& rt) override
|
||||
{
|
||||
const int32_t lineHeight = FontGetLineHeight(FontStyle::Medium);
|
||||
const int32_t lineHeight = FontGetLineHeight(FontStyle::medium);
|
||||
|
||||
ScreenCoordsXY screenCoords(3, 3 - lineHeight);
|
||||
for (const auto& line : _changelogLines)
|
||||
@@ -194,7 +194,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
return ScreenSize(
|
||||
_changelogLongestLineWidth + 4,
|
||||
static_cast<int32_t>(_changelogLines.size()) * FontGetLineHeight(FontStyle::Medium));
|
||||
static_cast<int32_t>(_changelogLines.size()) * FontGetLineHeight(FontStyle::medium));
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -271,7 +271,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
_changelogLongestLineWidth = 0;
|
||||
for (const auto& line : _changelogLines)
|
||||
{
|
||||
int32_t linewidth = GfxGetStringWidth(line.c_str(), FontStyle::Medium);
|
||||
int32_t linewidth = GfxGetStringWidth(line.c_str(), FontStyle::medium);
|
||||
_changelogLongestLineWidth = std::max(linewidth, _changelogLongestLineWidth);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -608,7 +608,7 @@ static StringId window_cheats_page_titles[] = {
|
||||
ft.Add<money64>(_moneySpinnerValue);
|
||||
if (isWidgetDisabled(WIDX_MONEY_SPINNER))
|
||||
{
|
||||
colour.setFlag(ColourFlag::inset, true);
|
||||
colour.flags.set(ColourFlag::inset, true);
|
||||
}
|
||||
|
||||
auto& widget = widgets[WIDX_MONEY_SPINNER];
|
||||
@@ -630,20 +630,20 @@ static StringId window_cheats_page_titles[] = {
|
||||
ft.Add<int32_t>(_yearSpinnerValue);
|
||||
DrawTextBasic(
|
||||
rt, windowPos + ScreenCoordsXY{ _xRcol, yearBox.top + 2 }, STR_FORMAT_INTEGER, ft,
|
||||
{ colours[1], TextAlignment::RIGHT });
|
||||
{ colours[1], TextAlignment::right });
|
||||
|
||||
ft = Formatter();
|
||||
int32_t actual_month = _monthSpinnerValue - 1;
|
||||
ft.Add<int32_t>(actual_month);
|
||||
DrawTextBasic(
|
||||
rt, windowPos + ScreenCoordsXY{ _xRcol, monthBox.top + 2 }, STR_FORMAT_MONTH, ft,
|
||||
{ colours[1], TextAlignment::RIGHT });
|
||||
{ colours[1], TextAlignment::right });
|
||||
|
||||
ft = Formatter();
|
||||
ft.Add<int32_t>(_daySpinnerValue);
|
||||
DrawTextBasic(
|
||||
rt, windowPos + ScreenCoordsXY{ _xRcol, dayBox.top + 2 }, STR_FORMAT_INTEGER, ft,
|
||||
{ colours[1], TextAlignment::RIGHT });
|
||||
{ colours[1], TextAlignment::right });
|
||||
}
|
||||
else if (page == WINDOW_CHEATS_PAGE_PARK)
|
||||
{
|
||||
@@ -995,7 +995,7 @@ static StringId window_cheats_page_titles[] = {
|
||||
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1,
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, 3, dropdownWidget->width() - 3);
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, 3, dropdownWidget->width() - 4);
|
||||
gDropdown.items[EnumValue(gameState.cheats.selectedStaffSpeed)].setChecked(true);
|
||||
}
|
||||
}
|
||||
@@ -1017,7 +1017,7 @@ static StringId window_cheats_page_titles[] = {
|
||||
}
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1,
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, std::size(WeatherTypes), dropdownWidget->width() - 3);
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, std::size(WeatherTypes), dropdownWidget->width() - 4);
|
||||
|
||||
auto currentWeather = gameState.weatherCurrent.weatherType;
|
||||
gDropdown.items[EnumValue(currentWeather)].setChecked(true);
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(gLandToolSize);
|
||||
DrawTextBasic(
|
||||
rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE });
|
||||
rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre });
|
||||
}
|
||||
|
||||
// Draw cost amount
|
||||
@@ -194,7 +194,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<money64>(_clearSceneryCost);
|
||||
screenCoords.x = widgets[WIDX_PREVIEW].midX() + windowPos.x;
|
||||
screenCoords.y = widgets[WIDX_PREVIEW].bottom + windowPos.y + 5 + 27;
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], 0,
|
||||
Dropdown::Flag::StayOpen, 2, widget->width() - 3);
|
||||
Dropdown::Flag::StayOpen, 2, widget->width() - 4);
|
||||
|
||||
if (CurrencyDescriptors[EnumValue(CurrencyType::custom)].affix_unicode == CurrencyAffix::prefix)
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <openrct2-ui/windows/Windows.h>
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/core/Guard.hpp>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/localisation/Language.h>
|
||||
#include <openrct2/localisation/LocalisationService.h>
|
||||
#include <openrct2/paint/Paint.h>
|
||||
@@ -124,7 +125,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
const auto& stringIdx = widgets[widgetIndex].text;
|
||||
auto string = ls.GetString(stringIdx);
|
||||
Guard::ArgumentNotNull(string);
|
||||
const auto strWidth = GfxGetStringWidth(string, FontStyle::Medium);
|
||||
const auto strWidth = GfxGetStringWidth(string, FontStyle::medium);
|
||||
newWidth = std::max<int16_t>(strWidth, newWidth);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<money64>(_demolishRideCost);
|
||||
|
||||
ScreenCoordsXY stringCoords(windowPos.x + kWindowSize.width / 2, windowPos.y + (kWindowSize.height / 2) - 3);
|
||||
DrawTextWrapped(rt, stringCoords, kWindowSize.width - 4, stringId, ft, { TextAlignment::CENTRE });
|
||||
DrawTextWrapped(rt, stringCoords, kWindowSize.width - 4, stringId, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <openrct2/core/BitSet.hpp>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/localisation/Formatting.h>
|
||||
#include <openrct2/localisation/Language.h>
|
||||
@@ -94,7 +95,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (highlighted)
|
||||
colour.colour = COLOUR_WHITE;
|
||||
if (item.isDisabled())
|
||||
colour = { background, EnumToFlag(ColourFlag::inset) };
|
||||
colour = { background, { ColourFlag::inset } };
|
||||
|
||||
auto yOffset = GetAdditionalRowPadding();
|
||||
Formatter ft;
|
||||
@@ -125,7 +126,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
const auto rightBottom = leftTop + ScreenCoordsXY{ ItemWidth - 4, 0 };
|
||||
const auto shadowOffset = ScreenCoordsXY{ 0, 1 };
|
||||
|
||||
if (colours[0].hasFlag(ColourFlag::translucent))
|
||||
if (colours[0].flags.has(ColourFlag::translucent))
|
||||
{
|
||||
TranslucentWindowPalette palette = kTranslucentWindowPalettes[colours[0].colour];
|
||||
Rectangle::filter(rt, { leftTop, rightBottom }, palette.highlight);
|
||||
@@ -231,7 +232,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
UpdateSizeAndPosition(screenPos, extraY);
|
||||
|
||||
if (colour.hasFlag(ColourFlag::translucent))
|
||||
if (colour.flags.has(ColourFlag::translucent))
|
||||
flags |= WindowFlag::transparent;
|
||||
colours[0] = colour;
|
||||
}
|
||||
@@ -264,7 +265,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
UpdateSizeAndPosition(screenPos, extraY);
|
||||
|
||||
if (colour.hasFlag(ColourFlag::translucent))
|
||||
if (colour.flags.has(ColourFlag::translucent))
|
||||
flags |= WindowFlag::transparent;
|
||||
colours[0] = colour;
|
||||
}
|
||||
@@ -354,7 +355,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
int32_t maxStringWidth = 0;
|
||||
for (size_t i = 0; i < num_items; i++)
|
||||
{
|
||||
int32_t stringWidth = GfxGetStringWidth(gDropdown.items[i].text, FontStyle::Medium);
|
||||
int32_t stringWidth = GfxGetStringWidth(gDropdown.items[i].text, FontStyle::medium);
|
||||
if (gDropdown.items[i].type != Dropdown::ItemType::plain)
|
||||
stringWidth += kDropdownItemLeftPadding;
|
||||
maxStringWidth = std::max(stringWidth, maxStringWidth);
|
||||
|
||||
@@ -370,8 +370,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (gLegacyScene == LegacyScene::trackDesigner)
|
||||
stringId = STR_EDITOR_STEP_OBJECT_SELECTION;
|
||||
|
||||
DrawTextBasic(rt, { textX, textY }, STR_BACK_TO_PREVIOUS_STEP, {}, { textColour, TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, { textX, textY + 10 }, stringId, {}, { textColour, TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, { textX, textY }, STR_BACK_TO_PREVIOUS_STEP, {}, { textColour, TextAlignment::centre });
|
||||
DrawTextBasic(rt, { textX, textY + 10 }, stringId, {}, { textColour, TextAlignment::centre });
|
||||
}
|
||||
|
||||
void DrawRightButtonBack(RenderTarget& rt)
|
||||
@@ -411,8 +411,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (gLegacyScene == LegacyScene::trackDesigner)
|
||||
stringId = STR_EDITOR_STEP_ROLLERCOASTER_DESIGNER;
|
||||
|
||||
DrawTextBasic(rt, { textX, textY }, STR_FORWARD_TO_NEXT_STEP, {}, { textColour, TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, { textX, textY + 10 }, stringId, {}, { textColour, TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, { textX, textY }, STR_FORWARD_TO_NEXT_STEP, {}, { textColour, TextAlignment::centre });
|
||||
DrawTextBasic(rt, { textX, textY + 10 }, stringId, {}, { textColour, TextAlignment::centre });
|
||||
}
|
||||
|
||||
void DrawStepText(RenderTarget& rt)
|
||||
@@ -422,7 +422,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto colour = colours[2].withFlag(ColourFlag::translucent, false).withFlag(ColourFlag::withOutline, true);
|
||||
DrawTextBasic(
|
||||
rt, { stateX, stateY }, kEditorStepNames[EnumValue(getGameState().editorStep)], {},
|
||||
{ colour, TextAlignment::CENTRE });
|
||||
{ colour, TextAlignment::centre });
|
||||
}
|
||||
|
||||
static constexpr FuncPtr kPreviousButtonMouseUp[] = {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <openrct2/OpenRCT2.h>
|
||||
#include <openrct2/SpriteIds.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/interface/Cursors.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/management/Research.h>
|
||||
@@ -276,7 +277,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
uint8_t paletteIndex = ColourMapA[colours[1].colour].mid_light;
|
||||
GfxClear(rt, paletteIndex);
|
||||
|
||||
int16_t boxWidth = widgets[WIDX_RESEARCH_ORDER_SCROLL].width();
|
||||
int16_t boxWidth = widgets[WIDX_RESEARCH_ORDER_SCROLL].width() - 1;
|
||||
int32_t itemY = -kScrollableRowHeight;
|
||||
auto* dragItem = WindowEditorInventionsListDragGetItem();
|
||||
|
||||
@@ -312,15 +313,15 @@ namespace OpenRCT2::Ui::Windows
|
||||
// TODO: this parameter by itself produces very light text.
|
||||
// It needs a {BLACK} token in the string to work properly.
|
||||
ColourWithFlags colour = { COLOUR_BLACK };
|
||||
FontStyle fontStyle = FontStyle::Medium;
|
||||
auto darkness = TextDarkness::Regular;
|
||||
FontStyle fontStyle = FontStyle::medium;
|
||||
auto darkness = TextDarkness::regular;
|
||||
|
||||
if (researchItem.IsAlwaysResearched())
|
||||
{
|
||||
if (_selectedResearchItem == &researchItem && dragItem == nullptr)
|
||||
darkness = TextDarkness::ExtraDark;
|
||||
darkness = TextDarkness::extraDark;
|
||||
else
|
||||
darkness = TextDarkness::Dark;
|
||||
darkness = TextDarkness::dark;
|
||||
colour = colours[1].withFlag(ColourFlag::inset, true);
|
||||
}
|
||||
|
||||
@@ -401,7 +402,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
RenderTarget clipDPI;
|
||||
screenPos = windowPos + ScreenCoordsXY{ bkWidget.left + 1, bkWidget.top + 1 };
|
||||
const auto clipWidth = bkWidget.width() - 1;
|
||||
const auto clipWidth = bkWidget.width() - 2;
|
||||
const auto clipHeight = bkWidget.height() - 1;
|
||||
if (ClipDrawPixelInfo(clipDPI, rt, screenPos, clipWidth, clipHeight))
|
||||
{
|
||||
@@ -431,7 +432,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<StringId>(stringId);
|
||||
}
|
||||
|
||||
DrawTextEllipsised(rt, screenPos, itemWidth, drawString, ft, { TextAlignment::CENTRE });
|
||||
DrawTextEllipsised(rt, screenPos, itemWidth, drawString, ft, { TextAlignment::centre });
|
||||
screenPos.y += 15;
|
||||
|
||||
// Item category
|
||||
|
||||
@@ -761,12 +761,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
&& (*listItem.flags & ObjectSelectionFlags::Selected))
|
||||
{
|
||||
screenCoords.x = 2;
|
||||
auto darkness = highlighted ? TextDarkness::ExtraDark : TextDarkness::Dark;
|
||||
auto darkness = highlighted ? TextDarkness::extraDark : TextDarkness::dark;
|
||||
auto colour2 = colours[1].withFlag(ColourFlag::translucent, false);
|
||||
if (*listItem.flags & (ObjectSelectionFlags::InUse | ObjectSelectionFlags::AlwaysRequired))
|
||||
colour2.setFlag(ColourFlag::inset, true);
|
||||
colour2.flags.set(ColourFlag::inset, true);
|
||||
|
||||
DrawText(rt, screenCoords, { colour2, FontStyle::Medium, darkness }, kCheckMarkString);
|
||||
DrawText(rt, screenCoords, { colour2, FontStyle::medium, darkness }, kCheckMarkString);
|
||||
}
|
||||
|
||||
screenCoords.x = gLegacyScene == LegacyScene::trackDesignsManager ? 0 : 15;
|
||||
@@ -776,14 +776,14 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto buffer = strchr(bufferWithColour, '\0');
|
||||
|
||||
colour_t colour = COLOUR_BLACK;
|
||||
auto darkness = TextDarkness::Regular;
|
||||
auto darkness = TextDarkness::regular;
|
||||
if (*listItem.flags & ObjectSelectionFlags::Flag6)
|
||||
{
|
||||
colour = colours[1].colour;
|
||||
darkness = TextDarkness::Dark;
|
||||
darkness = TextDarkness::dark;
|
||||
}
|
||||
|
||||
int32_t width_limit = widgets[WIDX_LIST].width() - screenCoords.x;
|
||||
int32_t width_limit = widgets[WIDX_LIST].width() - 1 - screenCoords.x;
|
||||
|
||||
if (ridePage)
|
||||
{
|
||||
@@ -794,7 +794,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<const char*>(itemBuffer);
|
||||
DrawTextEllipsised(
|
||||
rt, screenCoords, width_limit - 15, STR_STRING, ft, { colour, FontStyle::Medium, darkness });
|
||||
rt, screenCoords, width_limit - 15, STR_STRING, ft, { colour, FontStyle::medium, darkness });
|
||||
screenCoords.x = widgets[WIDX_LIST_SORT_RIDE].left - widgets[WIDX_LIST].left;
|
||||
}
|
||||
|
||||
@@ -809,7 +809,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
auto ft = Formatter();
|
||||
ft.Add<const char*>(itemBuffer);
|
||||
DrawTextEllipsised(rt, screenCoords, width_limit, STR_STRING, ft, { colour, FontStyle::Medium, darkness });
|
||||
DrawTextEllipsised(rt, screenCoords, width_limit, STR_STRING, ft, { colour, FontStyle::medium, darkness });
|
||||
}
|
||||
screenCoords.y += kScrollableRowHeight;
|
||||
}
|
||||
@@ -859,7 +859,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto& dropdownWidget = widgets[WIDX_FILTER_DROPDOWN];
|
||||
resizeDropdown(WIDX_FILTER_DROPDOWN, { width - kFilterWidth - 10, dropdownWidget.top }, { kFilterWidth, 14 });
|
||||
auto& installTrackWidget = widgets[WIDX_INSTALL_TRACK];
|
||||
installTrackWidget.moveToX(dropdownWidget.left - installTrackWidget.width() - 10);
|
||||
installTrackWidget.moveToX(dropdownWidget.left - installTrackWidget.width() - 11);
|
||||
|
||||
// Set pressed widgets
|
||||
pressedWidgets |= 1uLL << WIDX_PREVIEW;
|
||||
@@ -978,7 +978,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
bool isRideTab = GetSelectedObjectType() == ObjectType::ride;
|
||||
if (isRideTab)
|
||||
{
|
||||
int32_t width_limit = (widgets[WIDX_LIST].width() - 15) / 2;
|
||||
int32_t width_limit = (widgets[WIDX_LIST].width() - 16) / 2;
|
||||
|
||||
widgets[WIDX_LIST_SORT_TYPE].type = WidgetType::tableHeader;
|
||||
widgets[WIDX_LIST_SORT_TYPE].top = widgets[WIDX_FILTER_TEXT_BOX].bottom + 3;
|
||||
@@ -1091,7 +1091,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
: kStringIdNone;
|
||||
ft.Add<StringId>(stringId);
|
||||
auto screenPos = windowPos + ScreenCoordsXY{ listSortTypeWidget.left + 1, listSortTypeWidget.top + 1 };
|
||||
DrawTextEllipsised(rt, screenPos, listSortTypeWidget.width(), STR_OBJECTS_SORT_TYPE, ft, { colours[1] });
|
||||
DrawTextEllipsised(rt, screenPos, listSortTypeWidget.width() - 1, STR_OBJECTS_SORT_TYPE, ft, { colours[1] });
|
||||
}
|
||||
const auto& listSortRideWidget = widgets[WIDX_LIST_SORT_RIDE];
|
||||
if (listSortRideWidget.type != WidgetType::empty)
|
||||
@@ -1101,7 +1101,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
: kStringIdNone;
|
||||
ft.Add<StringId>(stringId);
|
||||
auto screenPos = windowPos + ScreenCoordsXY{ listSortRideWidget.left + 1, listSortRideWidget.top + 1 };
|
||||
DrawTextEllipsised(rt, screenPos, listSortRideWidget.width(), STR_OBJECTS_SORT_RIDE, ft, { colours[1] });
|
||||
DrawTextEllipsised(rt, screenPos, listSortRideWidget.width() - 1, STR_OBJECTS_SORT_RIDE, ft, { colours[1] });
|
||||
}
|
||||
|
||||
if (selectedListItem == -1 || _loadedObject == nullptr)
|
||||
@@ -1111,7 +1111,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
RenderTarget clipDPI;
|
||||
auto screenPos = windowPos + ScreenCoordsXY{ previewWidget.left + 1, previewWidget.top + 1 };
|
||||
int32_t previewWidth = previewWidget.width() - 1;
|
||||
int32_t previewWidth = previewWidget.width() - 2;
|
||||
int32_t previewHeight = previewWidget.height() - 1;
|
||||
if (ClipDrawPixelInfo(clipDPI, rt, screenPos, previewWidth, previewHeight))
|
||||
{
|
||||
@@ -1261,7 +1261,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<StringId>(STR_STRING);
|
||||
ft.Add<const char*>(listItem->repositoryItem->Name.c_str());
|
||||
screenPos.y += DrawTextWrapped(
|
||||
rt, screenPos, descriptionWidth, STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::CENTRE });
|
||||
rt, screenPos, descriptionWidth, STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::centre });
|
||||
|
||||
// Leave some space between name and description
|
||||
screenPos.y += kListRowHeight;
|
||||
@@ -1364,7 +1364,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Draw fallback image warning
|
||||
if (_loadedObject && _loadedObject->UsesFallbackImages())
|
||||
{
|
||||
DrawTextBasic(rt, screenPos, STR_OBJECT_USES_FALLBACK_IMAGES, {}, { COLOUR_WHITE, TextAlignment::RIGHT });
|
||||
DrawTextBasic(rt, screenPos, STR_OBJECT_USES_FALLBACK_IMAGES, {}, { COLOUR_WHITE, TextAlignment::right });
|
||||
}
|
||||
screenPos.y += kListRowHeight;
|
||||
|
||||
@@ -1372,7 +1372,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (GetSelectedObjectType() == ObjectType::ride)
|
||||
{
|
||||
auto stringId = GetRideTypeStringId(listItem->repositoryItem);
|
||||
DrawTextBasic(rt, screenPos, stringId, {}, { COLOUR_WHITE, TextAlignment::RIGHT });
|
||||
DrawTextBasic(rt, screenPos, stringId, {}, { COLOUR_WHITE, TextAlignment::right });
|
||||
}
|
||||
|
||||
// Draw peep animation object type
|
||||
@@ -1380,14 +1380,14 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto* animObj = reinterpret_cast<PeepAnimationsObject*>(_loadedObject.get());
|
||||
auto stringId = GetAnimationPeepTypeStringId(animObj->GetPeepType());
|
||||
DrawTextBasic(rt, screenPos, stringId, {}, { COLOUR_WHITE, TextAlignment::RIGHT });
|
||||
DrawTextBasic(rt, screenPos, stringId, {}, { COLOUR_WHITE, TextAlignment::right });
|
||||
}
|
||||
|
||||
screenPos.y += kListRowHeight;
|
||||
|
||||
// Draw object source
|
||||
auto stringId = ObjectManagerGetSourceGameString(listItem->repositoryItem->GetFirstSourceGame());
|
||||
DrawTextBasic(rt, screenPos, stringId, {}, { COLOUR_WHITE, TextAlignment::RIGHT });
|
||||
DrawTextBasic(rt, screenPos, stringId, {}, { COLOUR_WHITE, TextAlignment::right });
|
||||
screenPos.y += kListRowHeight;
|
||||
|
||||
// Draw object filename
|
||||
@@ -1398,7 +1398,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<const utf8*>(path.c_str());
|
||||
DrawTextBasic(
|
||||
rt, { windowPos.x + this->width - 5, screenPos.y }, STR_WINDOW_COLOUR_2_STRINGID, ft,
|
||||
{ COLOUR_BLACK, TextAlignment::RIGHT });
|
||||
{ COLOUR_BLACK, TextAlignment::right });
|
||||
screenPos.y += kListRowHeight;
|
||||
}
|
||||
|
||||
@@ -1418,7 +1418,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<const char*>(authorsString.c_str());
|
||||
DrawTextEllipsised(
|
||||
rt, { windowPos.x + width - 5, screenPos.y }, width - widgets[WIDX_LIST].right - 4,
|
||||
STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::RIGHT });
|
||||
STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::right });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -767,7 +767,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
Widget* dropdownWidget = &widgets[WIDX_OBJECTIVE];
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1,
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, numItems, dropdownWidget->width() - 3);
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, numItems, dropdownWidget->width() - 4);
|
||||
}
|
||||
|
||||
void ShowCategoryDropdown()
|
||||
@@ -780,7 +780,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
Widget* dropdownWidget = &widgets[WIDX_CATEGORY];
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1,
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, 5, dropdownWidget->width() - 3);
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, 5, dropdownWidget->width() - 4);
|
||||
|
||||
gDropdown.items[EnumValue(getGameState().scenarioOptions.category)].setChecked(true);
|
||||
}
|
||||
@@ -1562,7 +1562,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() - 1,
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, 3, dropdownWidget->width() - 3);
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, 3, dropdownWidget->width() - 4);
|
||||
|
||||
if (gameState.park.flags & PARK_FLAGS_UNLOCK_ALL_PRICES)
|
||||
gDropdown.items[2].setChecked(true);
|
||||
@@ -1900,7 +1900,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + dropdownWidget.left, windowPos.y + dropdownWidget.top }, dropdownWidget.height() - 1,
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, 4, dropdownWidget.width() - 3);
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, 4, dropdownWidget.width() - 4);
|
||||
|
||||
const auto preferLess = gameState.park.flags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES;
|
||||
const auto preferMore = gameState.park.flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES;
|
||||
@@ -2368,9 +2368,9 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
if (currentRide->lifecycleFlags & RIDE_LIFECYCLE_INDESTRUCTIBLE)
|
||||
{
|
||||
auto darkness = stringId == STR_WINDOW_COLOUR_2_STRINGID ? TextDarkness::ExtraDark : TextDarkness::Dark;
|
||||
auto darkness = stringId == STR_WINDOW_COLOUR_2_STRINGID ? TextDarkness::extraDark : TextDarkness::dark;
|
||||
DrawText(
|
||||
rt, { 2, y }, { colours[1].withFlag(ColourFlag::translucent, false), FontStyle::Medium, darkness },
|
||||
rt, { 2, y }, { colours[1].withFlag(ColourFlag::translucent, false), FontStyle::medium, darkness },
|
||||
kCheckMarkString);
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
WindowDrawWidgets(*this, rt);
|
||||
|
||||
auto screenCoords = windowPos + ScreenCoordsXY{ (width + 1) / 2 - 1, kPadding - 1 };
|
||||
DrawStringCentredRaw(rt, screenCoords, _numLines, _text.data(), FontStyle::Medium);
|
||||
DrawStringCentredRaw(rt, screenCoords, _numLines, _text.data(), FontStyle::medium);
|
||||
}
|
||||
|
||||
void onPeriodicUpdate() override
|
||||
@@ -126,13 +126,13 @@ namespace OpenRCT2::Ui::Windows
|
||||
windowMgr->CloseByClass(WindowClass::error);
|
||||
|
||||
// How wide is the error string?
|
||||
int32_t width = GfxGetStringWidthNewLined(buffer.data(), FontStyle::Medium);
|
||||
int32_t width = GfxGetStringWidthNewLined(buffer.data(), FontStyle::medium);
|
||||
width = std::clamp(width + 2 * kPadding, kMinWidth, kMaxWidth);
|
||||
|
||||
// How high is the error string?
|
||||
int32_t numLines{};
|
||||
GfxWrapString(buffer, width + 1, FontStyle::Medium, &buffer, &numLines);
|
||||
int32_t height = (numLines + 1) * FontGetLineHeight(FontStyle::Medium) + (2 * kPadding);
|
||||
GfxWrapString(buffer, width + 1, FontStyle::medium, &buffer, &numLines);
|
||||
int32_t height = (numLines + 1) * FontGetLineHeight(FontStyle::medium) + (2 * kPadding);
|
||||
|
||||
// Position error message around the cursor
|
||||
const CursorState* state = ContextGetCursorState();
|
||||
|
||||
@@ -403,7 +403,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto screenCoords = ScreenCoordsXY{ 0, kTableCellHeight + 2 };
|
||||
|
||||
auto& self = widgets[WIDX_SUMMARY_SCROLL];
|
||||
int32_t row_width = std::max<uint16_t>(scrolls[0].contentWidth, self.width());
|
||||
int32_t row_width = std::max<uint16_t>(scrolls[0].contentWidth, self.width() - 1);
|
||||
|
||||
// Expenditure / Income row labels
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(ExpenditureType::count); i++)
|
||||
@@ -435,7 +435,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
DrawTextBasic(
|
||||
rt, screenCoords + ScreenCoordsXY{ kExpenditureColumnWidth, 0 },
|
||||
monthyear == currentMonthYear ? STR_WINDOW_COLOUR_2_STRINGID : STR_BLACK_STRING, ft,
|
||||
{ TextUnderline::On, TextAlignment::RIGHT });
|
||||
{ TextUnderline::on, TextAlignment::right });
|
||||
screenCoords.y += 14;
|
||||
|
||||
// Month expenditures
|
||||
@@ -452,7 +452,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<money64>(expenditure);
|
||||
DrawTextBasic(
|
||||
rt, screenCoords + ScreenCoordsXY{ kExpenditureColumnWidth, 0 }, format, ft,
|
||||
{ TextAlignment::RIGHT });
|
||||
{ TextAlignment::right });
|
||||
}
|
||||
screenCoords.y += kTableCellHeight;
|
||||
}
|
||||
@@ -463,7 +463,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft = Formatter();
|
||||
ft.Add<money64>(profit);
|
||||
DrawTextBasic(
|
||||
rt, screenCoords + ScreenCoordsXY{ kExpenditureColumnWidth, 0 }, format, ft, { TextAlignment::RIGHT });
|
||||
rt, screenCoords + ScreenCoordsXY{ kExpenditureColumnWidth, 0 }, format, ft, { TextAlignment::right });
|
||||
|
||||
Rectangle::fill(
|
||||
rt,
|
||||
@@ -597,7 +597,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Expenditure / Income heading
|
||||
DrawTextBasic(
|
||||
rt, screenCoords, STR_FINANCES_SUMMARY_EXPENDITURE_INCOME, {},
|
||||
{ COLOUR_BLACK, TextUnderline::On, TextAlignment::LEFT });
|
||||
{ COLOUR_BLACK, TextUnderline::on, TextAlignment::left });
|
||||
screenCoords.y += 14;
|
||||
|
||||
// Expenditure / Income row labels
|
||||
@@ -831,7 +831,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// dynamic padding for long axis labels:
|
||||
char buffer[64]{};
|
||||
FormatStringToBuffer(buffer, sizeof(buffer), "{BLACK}{CURRENCY2DP}", centredGraph ? -max : max);
|
||||
int32_t maxGraphWidth = GfxGetStringWidth(buffer, FontStyle::Small) + Graph::kYTickMarkPadding + 1;
|
||||
int32_t maxGraphWidth = GfxGetStringWidth(buffer, FontStyle::small) + Graph::kYTickMarkPadding + 1;
|
||||
const ScreenCoordsXY dynamicPadding{ std::max(maxGraphWidth, kGraphTopLeftPadding.x), kGraphTopLeftPadding.y };
|
||||
|
||||
_graphBounds = { windowPos + ScreenCoordsXY{ graphPageWidget->left + 4, graphPageWidget->top + 15 },
|
||||
@@ -847,7 +847,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
void initialiseScrollPosition(WidgetIndex widgetIndex, int32_t scrollId)
|
||||
{
|
||||
const auto& widget = this->widgets[widgetIndex];
|
||||
scrolls[scrollId].contentOffsetX = std::max(0, scrolls[scrollId].contentWidth - (widget.width() - 2));
|
||||
scrolls[scrollId].contentOffsetX = std::max(0, scrolls[scrollId].contentWidth - (widget.width() - 3));
|
||||
|
||||
widgetScrollUpdateThumbs(*this, widgetIndex);
|
||||
}
|
||||
|
||||
@@ -282,6 +282,11 @@ namespace OpenRCT2::Ui::Windows
|
||||
close();
|
||||
break;
|
||||
case PathConstructionMode::dragArea:
|
||||
// If another window has enabled a tool, close ours.
|
||||
// If the user merely pressed Escape, we cancel the tool but don’t close the window.
|
||||
if (gInputFlags.has(InputFlag::toolActive)
|
||||
&& gCurrentToolWidget.windowClassification != WindowClass::footpath)
|
||||
close();
|
||||
break;
|
||||
case PathConstructionMode::bridgeOrTunnelPick:
|
||||
if (!isToolActive(WindowClass::footpath, WIDX_CONSTRUCT_BRIDGE_OR_TUNNEL))
|
||||
@@ -290,10 +295,6 @@ namespace OpenRCT2::Ui::Windows
|
||||
case PathConstructionMode::bridgeOrTunnel:
|
||||
break;
|
||||
}
|
||||
|
||||
// If another window has enabled a tool, close ours.
|
||||
if (gInputFlags.has(InputFlag::toolActive) && gCurrentToolWidget.windowClassification != WindowClass::footpath)
|
||||
close();
|
||||
}
|
||||
|
||||
void onMouseDown(WidgetIndex widgetIndex) override
|
||||
@@ -593,7 +594,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Draw build this... label
|
||||
screenCoords = this->windowPos
|
||||
+ ScreenCoordsXY{ widgets[WIDX_CONSTRUCT].midX(), widgets[WIDX_CONSTRUCT].bottom - 23 };
|
||||
DrawTextBasic(rt, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::centre });
|
||||
}
|
||||
|
||||
// Draw cost
|
||||
@@ -605,7 +606,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<money64>(_windowFootpathCost);
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_LABEL, ft, { TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_LABEL, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <openrct2/entity/EntityRegistry.h>
|
||||
#include <openrct2/entity/Guest.h>
|
||||
#include <openrct2/entity/Staff.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/localisation/Localisation.Date.h>
|
||||
#include <openrct2/localisation/StringIds.h>
|
||||
@@ -100,7 +101,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
Rectangle::FillMode::none);
|
||||
|
||||
// Figure out how much line height we have to work with.
|
||||
uint32_t line_height = FontGetLineHeight(FontStyle::Medium);
|
||||
uint32_t line_height = FontGetLineHeight(FontStyle::medium);
|
||||
|
||||
auto& gameState = getGameState();
|
||||
|
||||
@@ -115,7 +116,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
StringId stringId = gameState.park.cash < 0 ? STR_BOTTOM_TOOLBAR_CASH_NEGATIVE : STR_BOTTOM_TOOLBAR_CASH;
|
||||
auto ft = Formatter();
|
||||
ft.Add<money64>(gameState.park.cash);
|
||||
DrawTextBasic(rt, screenCoords, stringId, ft, { colour, TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, screenCoords, stringId, ft, { colour, TextAlignment::centre });
|
||||
}
|
||||
|
||||
static constexpr StringId _guestCountFormats[] = {
|
||||
@@ -141,7 +142,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto colour = GetHoverWidgetColour(WIDX_GUESTS);
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint32_t>(gameState.park.numGuestsInPark);
|
||||
DrawTextBasic(rt, screenCoords, stringId, ft, { colour, TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, screenCoords, stringId, ft, { colour, TextAlignment::centre });
|
||||
}
|
||||
|
||||
// Draw park rating
|
||||
@@ -200,10 +201,10 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<StringId>(DateDayNames[day]);
|
||||
ft.Add<int16_t>(month);
|
||||
ft.Add<int16_t>(year);
|
||||
DrawTextBasic(rt, screenCoords, stringId, ft, { colour, TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, screenCoords, stringId, ft, { colour, TextAlignment::centre });
|
||||
|
||||
// Figure out how much line height we have to work with.
|
||||
uint32_t line_height = FontGetLineHeight(FontStyle::Medium);
|
||||
uint32_t line_height = FontGetLineHeight(FontStyle::medium);
|
||||
|
||||
// Temperature
|
||||
screenCoords = { windowPos.x + rightPanelWidget.left + 15, static_cast<int32_t>(screenCoords.y + line_height + 1) };
|
||||
@@ -251,7 +252,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// Text
|
||||
auto screenCoords = windowPos + ScreenCoordsXY{ middleOutsetWidget.midX(), middleOutsetWidget.top + 11 };
|
||||
int32_t itemWidth = middleOutsetWidget.width() - 62;
|
||||
int32_t itemWidth = middleOutsetWidget.width() - 63;
|
||||
DrawNewsTicker(
|
||||
rt, screenCoords, itemWidth, COLOUR_BRIGHT_GREEN, STR_BOTTOM_TOOLBAR_NEWS_TEXT, newsItem->text,
|
||||
newsItem->ticks);
|
||||
@@ -363,11 +364,11 @@ namespace OpenRCT2::Ui::Windows
|
||||
colours[0], Rectangle::BorderStyle::inset, Rectangle::FillBrightness::light, Rectangle::FillMode::none);
|
||||
|
||||
// Figure out how much line height we have to work with.
|
||||
uint32_t line_height = FontGetLineHeight(FontStyle::Medium);
|
||||
uint32_t line_height = FontGetLineHeight(FontStyle::medium);
|
||||
|
||||
ScreenCoordsXY middleWidgetCoords(
|
||||
windowPos.x + middleOutsetWidget->midX(), windowPos.y + middleOutsetWidget->top + line_height + 1);
|
||||
int32_t panelWidth = middleOutsetWidget->width() - 62;
|
||||
int32_t panelWidth = middleOutsetWidget->width() - 63;
|
||||
|
||||
// Check if there is a map tooltip to draw
|
||||
StringId stringId;
|
||||
@@ -377,12 +378,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
// TODO: this string probably shouldn't be reused for this
|
||||
DrawTextWrapped(
|
||||
rt, middleWidgetCoords, panelWidth, STR_TITLE_SEQUENCE_OPENRCT2, ft, { colours[0], TextAlignment::CENTRE });
|
||||
rt, middleWidgetCoords, panelWidth, STR_TITLE_SEQUENCE_OPENRCT2, ft, { colours[0], TextAlignment::centre });
|
||||
}
|
||||
else
|
||||
{
|
||||
// Show tooltip in bottom toolbar
|
||||
DrawTextWrapped(rt, middleWidgetCoords, panelWidth, STR_STRINGID, ft, { colours[0], TextAlignment::CENTRE });
|
||||
DrawTextWrapped(rt, middleWidgetCoords, panelWidth, STR_STRINGID, ft, { colours[0], TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,7 +509,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
void onPrepareDraw() override
|
||||
{
|
||||
// Figure out how much line height we have to work with.
|
||||
uint32_t line_height = FontGetLineHeight(FontStyle::Medium);
|
||||
uint32_t line_height = FontGetLineHeight(FontStyle::medium);
|
||||
|
||||
// Reset dimensions as appropriate -- in case we're switching languages.
|
||||
height = line_height * 2 + 12;
|
||||
@@ -695,7 +696,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
int32_t screenHeight = ContextGetHeight();
|
||||
|
||||
// Figure out how much line height we have to work with.
|
||||
uint32_t lineHeight = FontGetLineHeight(FontStyle::Medium);
|
||||
uint32_t lineHeight = FontGetLineHeight(FontStyle::medium);
|
||||
int32_t toolbarHeight = lineHeight * 2 + 12;
|
||||
|
||||
auto* windowMgr = GetWindowManager();
|
||||
|
||||
@@ -549,7 +549,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
return;
|
||||
|
||||
const auto& widget = widgets[WIDX_TAB_1];
|
||||
int32_t widgWidth = widget.width() - 1;
|
||||
int32_t widgWidth = widget.width() - 2;
|
||||
int32_t widgHeight = widget.height() - 1;
|
||||
auto screenCoords = windowPos + ScreenCoordsXY{ widget.left + 1, widget.top + 1 };
|
||||
if (page == WINDOW_GUEST_OVERVIEW)
|
||||
@@ -624,7 +624,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (viewport != nullptr)
|
||||
{
|
||||
const auto& widget = widgets[WIDX_VIEWPORT];
|
||||
const auto reqViewportWidth = widget.width() - 1;
|
||||
const auto reqViewportWidth = widget.width() - 2;
|
||||
const auto reqViewportHeight = widget.height() - 1;
|
||||
viewport->pos = windowPos + ScreenCoordsXY{ widget.left + 1, widget.top + 1 };
|
||||
if (viewport->width != reqViewportWidth || viewport->height != reqViewportHeight)
|
||||
@@ -766,7 +766,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
const auto& viewWidget = widgets[WIDX_VIEWPORT];
|
||||
auto screenPos = ScreenCoordsXY{ viewWidget.left + 1 + windowPos.x, viewWidget.top + 1 + windowPos.y };
|
||||
int32_t widgWidth = viewWidget.width() - 1;
|
||||
int32_t widgWidth = viewWidget.width() - 2;
|
||||
int32_t widgHeight = viewWidget.height() - 1;
|
||||
|
||||
ViewportCreate(*this, screenPos, widgWidth, widgHeight, focus.value());
|
||||
@@ -814,13 +814,13 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto ft = Formatter();
|
||||
peep->FormatActionTo(ft);
|
||||
int32_t textWidth = actionLabelWidget.width();
|
||||
DrawTextEllipsised(rt, screenPos, textWidth, STR_BLACK_STRING, ft, { TextAlignment::CENTRE });
|
||||
int32_t textWidth = actionLabelWidget.width() - 1;
|
||||
DrawTextEllipsised(rt, screenPos, textWidth, STR_BLACK_STRING, ft, { TextAlignment::centre });
|
||||
}
|
||||
|
||||
// Draw the marquee thought
|
||||
const auto& marqueeWidget = widgets[WIDX_MARQUEE];
|
||||
auto marqWidth = marqueeWidget.width() - 3;
|
||||
auto marqWidth = marqueeWidget.width() - 4;
|
||||
int32_t left = marqueeWidget.left + 2 + windowPos.x;
|
||||
int32_t top = marqueeWidget.top + windowPos.y;
|
||||
int32_t marqHeight = marqueeWidget.height();
|
||||
@@ -849,11 +849,11 @@ namespace OpenRCT2::Ui::Windows
|
||||
return;
|
||||
}
|
||||
|
||||
screenPos.x = marqueeWidget.width() - _marqueePosition;
|
||||
screenPos.x = marqueeWidget.width() - 1 - _marqueePosition;
|
||||
{
|
||||
auto ft = Formatter();
|
||||
PeepThoughtSetFormatArgs(&peep->Thoughts[i], ft);
|
||||
DrawTextBasic(rtMarquee, { screenPos.x, 0 }, STR_WINDOW_COLOUR_2_STRINGID, ft, { FontStyle::Small });
|
||||
DrawTextBasic(rtMarquee, { screenPos.x, 0 }, STR_WINDOW_COLOUR_2_STRINGID, ft, { FontStyle::small });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1588,7 +1588,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
auto ft = Formatter();
|
||||
PeepThoughtSetFormatArgs(&thought, ft);
|
||||
screenCoords.y += DrawTextWrapped(rt, screenCoords, widgWidth, STR_BLACK_STRING, ft, { FontStyle::Small });
|
||||
screenCoords.y += DrawTextWrapped(rt, screenCoords, widgWidth, STR_BLACK_STRING, ft, { FontStyle::small });
|
||||
|
||||
// If this is the last visible line end drawing.
|
||||
if (screenCoords.y > windowPos.y + widgets[WIDX_PAGE_BACKGROUND].bottom - 32)
|
||||
@@ -1757,7 +1757,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
auto& widget = widgets[WIDX_PAGE_BACKGROUND];
|
||||
auto screenCoords = windowPos + ScreenCoordsXY{ widget.left + 4, widget.top + 12 };
|
||||
int32_t itemNameWidth = widget.width() - 24;
|
||||
int32_t itemNameWidth = widget.width() - 25;
|
||||
|
||||
int32_t maxY = windowPos.y + height - 22;
|
||||
int32_t numItems = 0;
|
||||
|
||||
@@ -336,7 +336,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], 0,
|
||||
Dropdown::Flag::StayOpen, _numPages, widget->width() - 3);
|
||||
Dropdown::Flag::StayOpen, _numPages, widget->width() - 4);
|
||||
|
||||
for (size_t i = 0; i < _numPages; i++)
|
||||
{
|
||||
@@ -355,7 +355,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto* widget = &widgets[widgetIndex - 1];
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], 0,
|
||||
Dropdown::Flag::StayOpen, 2, widget->width() - 3);
|
||||
Dropdown::Flag::StayOpen, 2, widget->width() - 4);
|
||||
|
||||
gDropdown.items[static_cast<int32_t>(_selectedView)].setChecked(true);
|
||||
break;
|
||||
@@ -699,7 +699,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
ft = Formatter();
|
||||
PeepThoughtSetFormatArgs(&thought, ft);
|
||||
DrawTextEllipsised(rt, { 118, y }, 329, format, ft, { FontStyle::Small });
|
||||
DrawTextEllipsised(rt, { 118, y }, 329, format, ft, { FontStyle::small });
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -744,7 +744,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Draw small font if displaying guests
|
||||
if (_selectedView == GuestViewType::Thoughts)
|
||||
{
|
||||
DrawTextEllipsised(rt, { 0, y }, 414, format, ft, { FontStyle::Small });
|
||||
DrawTextEllipsised(rt, { 0, y }, 414, format, ft, { FontStyle::small });
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -755,7 +755,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft = Formatter();
|
||||
ft.Add<StringId>(STR_GUESTS_COUNT_COMMA_SEP);
|
||||
ft.Add<uint32_t>(group.NumGuests);
|
||||
DrawTextBasic(rt, { 326, y }, format, ft, { TextAlignment::RIGHT });
|
||||
DrawTextBasic(rt, { 326, y }, format, ft, { TextAlignment::right });
|
||||
}
|
||||
y += kSummarisedGuestsRowHeight;
|
||||
index++;
|
||||
|
||||
@@ -178,7 +178,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
// Scenery not available
|
||||
DrawTextEllipsised(
|
||||
rt, screenPos, 308, STR_DESIGN_INCLUDES_SCENERY_WHICH_IS_UNAVAILABLE, {}, { TextAlignment::CENTRE });
|
||||
rt, screenPos, 308, STR_DESIGN_INCLUDES_SCENERY_WHICH_IS_UNAVAILABLE, {}, { TextAlignment::centre });
|
||||
screenPos.y -= kListRowHeight;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<uint16_t>(gLandToolSize);
|
||||
screenCoords = { windowPos.x + previewWidget->midX(), windowPos.y + previewWidget->midY() };
|
||||
DrawTextBasic(
|
||||
rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE });
|
||||
rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre });
|
||||
}
|
||||
else if (_landToolMountainMode)
|
||||
{
|
||||
@@ -288,7 +288,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<money64>(_landToolRaiseCost);
|
||||
DrawTextBasic(rt, screenCoords, STR_RAISE_COST_AMOUNT, ft, { TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, screenCoords, STR_RAISE_COST_AMOUNT, ft, { TextAlignment::centre });
|
||||
}
|
||||
screenCoords.y += 10;
|
||||
|
||||
@@ -297,7 +297,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<money64>(_landToolLowerCost);
|
||||
DrawTextBasic(rt, screenCoords, STR_LOWER_COST_AMOUNT, ft, { TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, screenCoords, STR_LOWER_COST_AMOUNT, ft, { TextAlignment::centre });
|
||||
}
|
||||
screenCoords.y += 50;
|
||||
|
||||
@@ -321,7 +321,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<money64>(price);
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(gLandToolSize);
|
||||
DrawTextBasic(
|
||||
rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE });
|
||||
rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre });
|
||||
}
|
||||
|
||||
// Draw cost amount
|
||||
@@ -419,7 +419,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
screenCoords = { widgets[WIDX_PREVIEW].midX() + windowPos.x,
|
||||
widgets[WIDX_PREVIEW].bottom + windowPos.y + offset };
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/localisation/Localisation.Date.h>
|
||||
#include <openrct2/network/Network.h>
|
||||
@@ -319,7 +320,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// Check how this date is represented (e.g. 2000-02-20, or 00/02/20)
|
||||
std::string date = Platform::FormatShortDate(long_time);
|
||||
maxDateWidth = GfxGetStringWidth(date.c_str(), FontStyle::Medium) + kDateTimeGap;
|
||||
maxDateWidth = GfxGetStringWidth(date.c_str(), FontStyle::medium) + kDateTimeGap;
|
||||
|
||||
// Some locales do not use leading zeros for months and days, so let's try October, too.
|
||||
tm.tm_mon = 10;
|
||||
@@ -328,12 +329,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// Again, check how this date is represented (e.g. 2000-10-20, or 00/10/20)
|
||||
date = Platform::FormatShortDate(long_time);
|
||||
maxDateWidth = std::max(maxDateWidth, GfxGetStringWidth(date.c_str(), FontStyle::Medium) + kDateTimeGap);
|
||||
maxDateWidth = std::max(maxDateWidth, GfxGetStringWidth(date.c_str(), FontStyle::medium) + kDateTimeGap);
|
||||
|
||||
// Time appears to be universally represented with two digits for minutes, so 12:00 or 00:00 should be
|
||||
// representable.
|
||||
std::string time = Platform::FormatTime(long_time);
|
||||
maxTimeWidth = GfxGetStringWidth(time.c_str(), FontStyle::Medium) + kDateTimeGap;
|
||||
maxTimeWidth = GfxGetStringWidth(time.c_str(), FontStyle::medium) + kDateTimeGap;
|
||||
}
|
||||
|
||||
void LoadPreview()
|
||||
@@ -431,7 +432,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<const char*>(_preview.parkName.c_str());
|
||||
DrawTextEllipsised(
|
||||
rt, namePos, previewPaneSize.width - kPadding * 2, STR_WINDOW_COLOUR_2_STRINGID, ft,
|
||||
{ TextAlignment::CENTRE });
|
||||
{ TextAlignment::centre });
|
||||
}
|
||||
|
||||
const bool drawFrame = image != nullptr || targetType == PreviewImageType::screenshot;
|
||||
@@ -476,7 +477,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
DrawTextBasic(
|
||||
rt, textPos, previewText, {},
|
||||
{ ColourWithFlags{ COLOUR_WHITE }.withFlag(ColourFlag::withOutline, true), TextAlignment::CENTRE });
|
||||
{ ColourWithFlags{ COLOUR_WHITE }.withFlag(ColourFlag::withOutline, true), TextAlignment::centre });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -705,7 +706,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// Get 'Save' button string width
|
||||
auto saveLabel = LanguageGetString(STR_FILEBROWSER_SAVE_BUTTON);
|
||||
auto saveLabelWidth = GfxGetStringWidth(saveLabel, FontStyle::Medium) + 12;
|
||||
auto saveLabelWidth = GfxGetStringWidth(saveLabel, FontStyle::medium) + 12;
|
||||
|
||||
widgets[WIDX_SAVE].type = WidgetType::button;
|
||||
widgets[WIDX_SAVE].top = height - paddingBottom - 15;
|
||||
@@ -715,7 +716,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// Get 'Filename:' string width
|
||||
auto filenameLabel = LanguageGetString(STR_FILENAME_LABEL);
|
||||
auto filenameLabelWidth = GfxGetStringWidth(filenameLabel, FontStyle::Medium);
|
||||
auto filenameLabelWidth = GfxGetStringWidth(filenameLabel, FontStyle::medium);
|
||||
|
||||
widgets[WIDX_FILENAME_TEXTBOX].type = WidgetType::textBox;
|
||||
widgets[WIDX_FILENAME_TEXTBOX].top = height - paddingBottom - 15;
|
||||
@@ -740,7 +741,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
const auto& widget = widgets[WIDX_PARENT_FOLDER];
|
||||
const auto pathWidth = widget.left - 8;
|
||||
const auto shortPath = ShortenPath(_directory, pathWidth, FontStyle::Medium);
|
||||
const auto shortPath = ShortenPath(_directory, pathWidth, FontStyle::medium);
|
||||
|
||||
// Format text
|
||||
std::string buffer;
|
||||
@@ -771,7 +772,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
auto cdpi = const_cast<const RenderTarget&>(rt);
|
||||
DrawTextEllipsised(
|
||||
cdpi, windowPos + ScreenCoordsXY{ widget.left + 5, widget.top + 1 }, widget.width(), strId, ft,
|
||||
cdpi, windowPos + ScreenCoordsXY{ widget.left + 5, widget.top + 1 }, widget.width() - 1, strId, ft,
|
||||
{ COLOUR_GREY });
|
||||
};
|
||||
|
||||
@@ -1081,7 +1082,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
Rectangle::fill(
|
||||
rt, { { rt.x, rt.y }, { rt.x + rt.width - 1, rt.y + rt.height - 1 } }, ColourMapA[colours[1].colour].mid_light);
|
||||
|
||||
const int32_t listWidth = widgets[WIDX_SCROLL].width();
|
||||
const int32_t listWidth = widgets[WIDX_SCROLL].width() - 1;
|
||||
const auto sizeColumnLeft = widgets[WIDX_SORT_SIZE].left;
|
||||
const auto dateColumnLeft = widgets[WIDX_SORT_DATE].left;
|
||||
const int32_t dateAnchor = dateColumnLeft + maxDateWidth + kDateTimeGap;
|
||||
@@ -1123,7 +1124,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(STR_STRING);
|
||||
ft.Add<char*>(_listItems[i].name.c_str());
|
||||
int32_t max_file_width = widgets[WIDX_SORT_NAME].width() - 15;
|
||||
int32_t max_file_width = widgets[WIDX_SORT_NAME].width() - 16;
|
||||
DrawTextEllipsised(rt, { 15, y }, max_file_width, stringId, ft);
|
||||
|
||||
// Print formatted modified date, if this is a file
|
||||
@@ -1145,7 +1146,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<StringId>(STR_STRING);
|
||||
ft.Add<char*>(_listItems[i].dateFormatted.c_str());
|
||||
DrawTextEllipsised(
|
||||
rt, { dateAnchor - kDateTimeGap, y }, maxDateWidth, stringId, ft, { TextAlignment::RIGHT });
|
||||
rt, { dateAnchor - kDateTimeGap, y }, maxDateWidth, stringId, ft, { TextAlignment::right });
|
||||
|
||||
ft = Formatter();
|
||||
ft.Add<StringId>(STR_STRING);
|
||||
|
||||
@@ -533,7 +533,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// Adjust for hidden scrollbars if needed
|
||||
auto& mapArea = widgets[WIDX_MAP];
|
||||
if (size.width >= mapArea.width())
|
||||
if (size.width >= mapArea.width() - 1)
|
||||
size.width -= kScrollBarWidth;
|
||||
if (size.height >= mapArea.height())
|
||||
size.height -= kScrollBarWidth;
|
||||
@@ -738,7 +738,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// calculate width and height of minimap
|
||||
auto& widget = widgets[WIDX_MAP];
|
||||
auto mapWidth = widget.width() - kScrollBarWidth - 1;
|
||||
auto mapWidth = widget.width() - 1 - kScrollBarWidth - 1;
|
||||
auto mapHeight = widget.height() - kScrollBarWidth - 1;
|
||||
|
||||
centreX = std::max(centreX - (mapWidth >> 1), 0);
|
||||
@@ -1233,7 +1233,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
for (uint32_t i = 0; i < 4; i++)
|
||||
{
|
||||
const auto* labelStr = LanguageGetString(MapLabels[i]);
|
||||
_firstColumnWidth = std::max(textOffset + GfxGetStringWidth(labelStr, FontStyle::Medium), _firstColumnWidth);
|
||||
_firstColumnWidth = std::max(textOffset + GfxGetStringWidth(labelStr, FontStyle::medium), _firstColumnWidth);
|
||||
}
|
||||
|
||||
textOffset += _firstColumnWidth + 4;
|
||||
@@ -1242,7 +1242,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
const auto* labelStr = LanguageGetString(MapLabels[i]);
|
||||
minWidth = std::max(
|
||||
static_cast<int16_t>(textOffset + GfxGetStringWidth(labelStr, FontStyle::Medium)), minWidth);
|
||||
static_cast<int16_t>(textOffset + GfxGetStringWidth(labelStr, FontStyle::medium)), minWidth);
|
||||
}
|
||||
width = std::max(minWidth, width);
|
||||
_recalculateScrollbars = true;
|
||||
|
||||
@@ -462,7 +462,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
Widget* ddWidget = &widgets[widgetIndex - 1];
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + ddWidget->left, windowPos.y + ddWidget->top }, ddWidget->height() + 1, colours[1], 0,
|
||||
Dropdown::Flag::StayOpen, std::size(items), ddWidget->width() - 2);
|
||||
Dropdown::Flag::StayOpen, std::size(items), ddWidget->width() - 3);
|
||||
|
||||
gDropdown.items[EnumValue(_settings.algorithm)].setChecked(true);
|
||||
break;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
|
||||
auto stringCoords = windowPos + ScreenCoordsXY{ width / 2, height / 2 };
|
||||
DrawTextWrapped(rt, stringCoords, width, STR_MAP_TOOLTIP_STRINGID, _mapTooltipArgs, { TextAlignment::CENTRE });
|
||||
DrawTextWrapped(rt, stringCoords, width, STR_MAP_TOOLTIP_STRINGID, _mapTooltipArgs, { TextAlignment::centre });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/drawing/Text.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/network/Network.h>
|
||||
#include <openrct2/ui/WindowManager.h>
|
||||
|
||||
@@ -289,7 +290,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
_buffer += Network::GetPlayerName(player);
|
||||
}
|
||||
screenCoords.x = 0;
|
||||
GfxClipString(_buffer.data(), 230, FontStyle::Medium);
|
||||
GfxClipString(_buffer.data(), 230, FontStyle::medium);
|
||||
DrawText(rt, screenCoords, { colour }, _buffer.c_str());
|
||||
|
||||
// Draw group name
|
||||
@@ -300,7 +301,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
_buffer += "{BLACK}";
|
||||
screenCoords.x = 173;
|
||||
_buffer += Network::GetGroupName(group);
|
||||
GfxClipString(_buffer.data(), 80, FontStyle::Medium);
|
||||
GfxClipString(_buffer.data(), 80, FontStyle::medium);
|
||||
DrawText(rt, screenCoords, { colour }, _buffer.c_str());
|
||||
}
|
||||
|
||||
@@ -359,8 +360,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<const char*>(_buffer.c_str());
|
||||
DrawTextEllipsised(
|
||||
rt, windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top }, widget->width() - 8, STR_STRING, ft,
|
||||
{ TextAlignment::CENTRE });
|
||||
rt, windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top }, widget->width() - 9, STR_STRING, ft,
|
||||
{ TextAlignment::centre });
|
||||
}
|
||||
|
||||
auto screenPos = windowPos
|
||||
@@ -383,8 +384,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<const char*>(_buffer.c_str());
|
||||
DrawTextEllipsised(
|
||||
rt, windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top }, widget->width() - 8, STR_STRING, ft,
|
||||
{ TextAlignment::CENTRE });
|
||||
rt, windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top }, widget->width() - 9, STR_STRING, ft,
|
||||
{ TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,7 +466,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
assert(!_windowInformationSize.has_value());
|
||||
|
||||
int32_t lineHeight = FontGetLineHeight(FontStyle::Medium);
|
||||
int32_t lineHeight = FontGetLineHeight(FontStyle::medium);
|
||||
|
||||
// Base dimensions.
|
||||
const int32_t baseWidth = 450;
|
||||
@@ -474,7 +475,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Server name is displayed word-wrapped, so figure out how high it will be.
|
||||
{
|
||||
int32_t numLines;
|
||||
GfxWrapString(Network::GetServerName(), baseWidth, FontStyle::Medium, nullptr, &numLines);
|
||||
GfxWrapString(Network::GetServerName(), baseWidth, FontStyle::medium, nullptr, &numLines);
|
||||
baseHeight += (numLines + 1) * lineHeight + (kListRowHeight / 2);
|
||||
}
|
||||
|
||||
@@ -483,7 +484,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (!descString.empty())
|
||||
{
|
||||
int32_t numLines;
|
||||
GfxWrapString(descString, baseWidth, FontStyle::Medium, nullptr, &numLines);
|
||||
GfxWrapString(descString, baseWidth, FontStyle::medium, nullptr, &numLines);
|
||||
baseHeight += (numLines + 1) * lineHeight + (kListRowHeight / 2);
|
||||
}
|
||||
|
||||
|
||||
@@ -93,10 +93,10 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
_buffer.assign("{WHITE}");
|
||||
_buffer += _windowNetworkStatusText;
|
||||
GfxClipString(_buffer.data(), widgets[WIDX_BACKGROUND].right - 50, FontStyle::Medium);
|
||||
GfxClipString(_buffer.data(), widgets[WIDX_BACKGROUND].right - 50, FontStyle::medium);
|
||||
|
||||
ScreenCoordsXY screenCoords(windowPos.x + (width / 2), windowPos.y + (height / 2));
|
||||
screenCoords.x -= GfxGetStringWidth(_buffer, FontStyle::Medium) / 2;
|
||||
screenCoords.x -= GfxGetStringWidth(_buffer, FontStyle::medium) / 2;
|
||||
DrawText(rt, screenCoords, { COLOUR_BLACK }, _buffer.c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top },
|
||||
dropdownWidget->height() + 1, colours[1], 0, Dropdown::Flag::StayOpen, numItems,
|
||||
dropdownWidget->width() - 3);
|
||||
dropdownWidget->width() - 4);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -242,7 +242,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top },
|
||||
dropdownWidget->height() + 1, colours[1], 0, Dropdown::Flag::StayOpen, numItems,
|
||||
dropdownWidget->width() - 3);
|
||||
dropdownWidget->width() - 4);
|
||||
}
|
||||
break;
|
||||
// In RCT2, the maximum was 6 weeks
|
||||
|
||||
@@ -45,11 +45,21 @@ using namespace OpenRCT2::TrackMetaData;
|
||||
namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
static constexpr StringId WindowTitle = kStringIdNone;
|
||||
static constexpr ScreenSize kWindowSize = { 601, 382 };
|
||||
static constexpr int32_t kWindowHeightResearch = 194;
|
||||
static constexpr int32_t RideListItemsMax = 384;
|
||||
static constexpr int32_t RideTabCount = 6;
|
||||
static constexpr int32_t GroupByTrackTypeWidth = 172;
|
||||
static constexpr int32_t kScrollItemSize = 116;
|
||||
static constexpr int32_t kMinColCount = 5;
|
||||
static constexpr int32_t kMaxColCount = 15;
|
||||
static constexpr int32_t kMinRowCount = 2;
|
||||
static constexpr int32_t kMaxRowCount = 7;
|
||||
static constexpr int32_t kHorizontalPadding = 21;
|
||||
static constexpr int32_t kVerticalPadding = 150;
|
||||
static constexpr ScreenSize kWindowSize = { (kMinColCount * kScrollItemSize) + kHorizontalPadding,
|
||||
(kMinRowCount * kScrollItemSize) + kVerticalPadding };
|
||||
static constexpr ScreenSize kWindowMaxSize = { (kMaxColCount * kScrollItemSize) + kHorizontalPadding,
|
||||
(kMaxRowCount * kScrollItemSize) + kVerticalPadding };
|
||||
|
||||
#pragma region Ride type view order
|
||||
|
||||
@@ -415,7 +425,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
const auto& ls = OpenRCT2::GetContext()->GetLocalisationService();
|
||||
auto string = ls.GetString(STR_GROUP_BY_TRACK_TYPE);
|
||||
auto strWidth = GfxGetStringWidth(string, FontStyle::Medium);
|
||||
auto strWidth = GfxGetStringWidth(string, FontStyle::medium);
|
||||
auto localizedGroupByTrackTypeWidth = strWidth + 14;
|
||||
widgets[WIDX_GROUP_BY_TRACK_TYPE].left = width - 8 - localizedGroupByTrackTypeWidth;
|
||||
}
|
||||
@@ -447,7 +457,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
count++;
|
||||
listItem++;
|
||||
}
|
||||
return { widgets[WIDX_RIDE_LIST].width(), ((count + 4) / 5) * 116 };
|
||||
auto itemsPerRow = getNumImagesPerRow();
|
||||
return { widgets[WIDX_RIDE_LIST].width() - 1, ((count + (itemsPerRow - 1)) / itemsPerRow) * kScrollItemSize };
|
||||
}
|
||||
|
||||
void onScrollMouseOver(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override
|
||||
@@ -496,8 +507,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
const auto borderStyle = isSelected ? Rectangle::BorderStyle::inset : Rectangle::BorderStyle::outset;
|
||||
Rectangle::fillInset(
|
||||
rt, { coords, coords + ScreenCoordsXY{ 115, 115 } }, colours[1], borderStyle,
|
||||
Rectangle::FillBrightness::dark);
|
||||
rt, { coords, coords + ScreenCoordsXY{ kScrollItemSize - 1, kScrollItemSize - 1 } }, colours[1],
|
||||
borderStyle, Rectangle::FillBrightness::dark);
|
||||
}
|
||||
|
||||
// Draw ride image with feathered border
|
||||
@@ -506,11 +517,11 @@ namespace OpenRCT2::Ui::Windows
|
||||
GfxDrawSpriteRawMasked(rt, coords + ScreenCoordsXY{ 2, 2 }, mask, rideImage);
|
||||
|
||||
// Next position
|
||||
coords.x += 116;
|
||||
if (coords.x >= 116 * 5 + 1)
|
||||
coords.x += kScrollItemSize;
|
||||
if (coords.x >= kScrollItemSize * getNumImagesPerRow() + 1)
|
||||
{
|
||||
coords.x = 1;
|
||||
coords.y += 116;
|
||||
coords.y += kScrollItemSize;
|
||||
}
|
||||
|
||||
// Next item
|
||||
@@ -809,8 +820,6 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
void RefreshWidgetSizing()
|
||||
{
|
||||
int32_t newWidth{}, newHeight{};
|
||||
|
||||
if (_currentTab < SHOP_TAB)
|
||||
{
|
||||
disabledWidgets &= ~(1 << WIDX_GROUP_BY_TRACK_TYPE);
|
||||
@@ -831,6 +840,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
widgets[WIDX_GROUP_BY_TRACK_TYPE].type = WidgetType::empty;
|
||||
}
|
||||
|
||||
ScreenSize newMinSize{}, newMaxSize{};
|
||||
if (_currentTab != RESEARCH_TAB)
|
||||
{
|
||||
widgets[WIDX_RIDE_LIST].type = WidgetType::scroll;
|
||||
@@ -841,8 +851,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WidgetType::empty;
|
||||
widgets[WIDX_RESEARCH_FUNDING_BUTTON].type = WidgetType::empty;
|
||||
|
||||
newWidth = kWindowSize.width;
|
||||
newHeight = kWindowSize.height;
|
||||
newMinSize = kWindowSize;
|
||||
newMaxSize = kWindowMaxSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -855,24 +865,35 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (!(getGameState().park.flags & PARK_FLAGS_NO_MONEY))
|
||||
widgets[WIDX_RESEARCH_FUNDING_BUTTON].type = WidgetType::flatBtn;
|
||||
|
||||
newWidth = 300;
|
||||
newHeight = kWindowHeightResearch;
|
||||
newMinSize = { 300, kWindowHeightResearch };
|
||||
newMaxSize = newMinSize;
|
||||
}
|
||||
|
||||
// Handle new window size
|
||||
if (width != newWidth || height != newHeight)
|
||||
if (width != newMinSize.width || height != newMinSize.height)
|
||||
{
|
||||
ScreenSize newSize = { newWidth, newHeight };
|
||||
WindowSetResize(*this, newSize, newSize);
|
||||
WindowSetResize(*this, newMinSize, newMaxSize);
|
||||
onResize();
|
||||
|
||||
widgets[WIDX_GROUP_BY_TRACK_TYPE].left = newWidth - 8 - GroupByTrackTypeWidth;
|
||||
widgets[WIDX_GROUP_BY_TRACK_TYPE].right = newWidth - 8;
|
||||
}
|
||||
|
||||
initScrollWidgets();
|
||||
}
|
||||
|
||||
void onResize() override
|
||||
{
|
||||
widgets[WIDX_GROUP_BY_TRACK_TYPE].left = width - 8 - GroupByTrackTypeWidth;
|
||||
widgets[WIDX_GROUP_BY_TRACK_TYPE].right = width - 8;
|
||||
widgets[WIDX_RIDE_LIST].right = width - 3 - 1;
|
||||
widgets[WIDX_RIDE_LIST].bottom = height - 65;
|
||||
}
|
||||
|
||||
uint8_t getNumImagesPerRow()
|
||||
{
|
||||
const Widget& listWidget = widgets[WIDX_RIDE_LIST];
|
||||
auto scrollWidth = listWidget.width();
|
||||
return scrollWidth / kScrollItemSize;
|
||||
}
|
||||
|
||||
RideSelection ScrollGetRideListItemAt(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
RideSelection result;
|
||||
@@ -882,12 +903,13 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (screenCoords.x <= 0 || screenCoords.y <= 0)
|
||||
return result;
|
||||
|
||||
int32_t column = screenCoords.x / 116;
|
||||
int32_t row = screenCoords.y / 116;
|
||||
if (column >= 5)
|
||||
auto itemsPerRow = getNumImagesPerRow();
|
||||
int32_t column = screenCoords.x / kScrollItemSize;
|
||||
int32_t row = screenCoords.y / kScrollItemSize;
|
||||
if (column >= itemsPerRow)
|
||||
return result;
|
||||
|
||||
int32_t index = column + (row * 5);
|
||||
int32_t index = column + (row * itemsPerRow);
|
||||
|
||||
RideSelection* listItem = _windowNewRideListItems;
|
||||
while (listItem->Type != kRideTypeNull || listItem->EntryIndex != kObjectEntryIndexNull)
|
||||
@@ -978,7 +1000,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
ft = Formatter();
|
||||
ft.Add<money64>(price);
|
||||
DrawTextBasic(rt, screenPos + ScreenCoordsXY{ textWidth, 51 }, stringId, ft, { TextAlignment::RIGHT });
|
||||
DrawTextBasic(rt, screenPos + ScreenCoordsXY{ textWidth - 14, 51 }, stringId, ft, { TextAlignment::right });
|
||||
}
|
||||
|
||||
// Draw object author(s) if debugging tools are active
|
||||
@@ -1001,7 +1023,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
DrawTextEllipsised(
|
||||
rt, screenPos + ScreenCoordsXY{ textWidth, 0 }, kWindowSize.width - 2, STR_WINDOW_COLOUR_2_STRINGID, ft,
|
||||
{ TextAlignment::RIGHT });
|
||||
{ TextAlignment::right });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1086,7 +1108,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
windowMgr->CloseByClass(WindowClass::trackDesignPlace);
|
||||
|
||||
window = windowMgr->Create<NewRideWindow>(
|
||||
WindowClass::constructRide, kWindowSize, { WindowFlag::higherContrastOnPress, WindowFlag::autoPosition });
|
||||
WindowClass::constructRide, kWindowSize,
|
||||
{ WindowFlag::higherContrastOnPress, WindowFlag::autoPosition, WindowFlag::resizable });
|
||||
return window;
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
static int32_t CalculateNewsItemHeight()
|
||||
{
|
||||
return 4 * FontGetLineHeight(FontStyle::Small) + 2;
|
||||
return 4 * FontGetLineHeight(FontStyle::small) + 2;
|
||||
}
|
||||
|
||||
void initNewsWidgets()
|
||||
@@ -443,7 +443,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
void onScrollDraw(int32_t scrollIndex, RenderTarget& rt) override
|
||||
{
|
||||
int32_t lineHeight = FontGetLineHeight(FontStyle::Small);
|
||||
int32_t lineHeight = FontGetLineHeight(FontStyle::small);
|
||||
int32_t itemHeight = CalculateNewsItemHeight();
|
||||
int32_t y = 0;
|
||||
int32_t i = 0;
|
||||
@@ -476,7 +476,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(DateDayNames[newsItem.day - 1]);
|
||||
ft.Add<StringId>(DateGameMonthNames[DateGetMonth(newsItem.monthYear)]);
|
||||
DrawTextBasic(rt, { 2, y }, STR_NEWS_DATE_FORMAT, ft, { COLOUR_WHITE, FontStyle::Small });
|
||||
DrawTextBasic(rt, { 2, y }, STR_NEWS_DATE_FORMAT, ft, { COLOUR_WHITE, FontStyle::small });
|
||||
}
|
||||
// Item text
|
||||
{
|
||||
@@ -484,7 +484,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<const char*>(newsItem.text.c_str());
|
||||
DrawTextWrapped(
|
||||
rt, { 2, y + lineHeight }, 325, STR_BOTTOM_TOOLBAR_NEWS_TEXT, ft,
|
||||
{ COLOUR_BRIGHT_GREEN, FontStyle::Small });
|
||||
{ COLOUR_BRIGHT_GREEN, FontStyle::small });
|
||||
}
|
||||
// Subject button
|
||||
if ((newsItem.typeHasSubject()) && !(newsItem.hasButton()))
|
||||
|
||||
@@ -516,7 +516,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
Rectangle::fill(
|
||||
rt, { rtCoords, rtCoords + ScreenCoordsXY{ rt.width - 1, rt.height - 1 } },
|
||||
ColourMapA[colours[1].colour].mid_light);
|
||||
const int32_t listWidth = widgets[WIDX_SCROLL].width();
|
||||
const int32_t listWidth = widgets[WIDX_SCROLL].width() - 1;
|
||||
|
||||
for (int32_t i = 0; i < numListItems; i++)
|
||||
{
|
||||
|
||||
@@ -1803,7 +1803,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], 0,
|
||||
Dropdown::Flag::StayOpen, numItems, widget->width() - 3);
|
||||
Dropdown::Flag::StayOpen, numItems, widget->width() - 4);
|
||||
|
||||
gDropdown.items[static_cast<int32_t>(ThemeManagerGetAvailableThemeIndex())].setChecked(true);
|
||||
invalidateWidget(WIDX_THEMES_DROPDOWN);
|
||||
@@ -1934,7 +1934,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], 0,
|
||||
Dropdown::Flag::StayOpen, numItems, widget->width() - 3);
|
||||
Dropdown::Flag::StayOpen, numItems, widget->width() - 4);
|
||||
|
||||
gDropdown.items[Config::Get().interface.scenarioPreviewScreenshots].setChecked(true);
|
||||
break;
|
||||
@@ -2187,7 +2187,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// Get 'Clear' button string width
|
||||
auto clearLabel = LanguageGetString(STR_CLEAR_BUTTON);
|
||||
auto clearLabelWidth = GfxGetStringWidth(clearLabel, FontStyle::Medium) + 12;
|
||||
auto clearLabelWidth = GfxGetStringWidth(clearLabel, FontStyle::medium) + 12;
|
||||
|
||||
widgets[WIDX_PATH_TO_RCT1_CLEAR].right = widgets[WIDX_PAGE_BACKGROUND].right - 12;
|
||||
widgets[WIDX_PATH_TO_RCT1_CLEAR].left = widgets[WIDX_PATH_TO_RCT1_BROWSE].right - clearLabelWidth;
|
||||
@@ -2200,7 +2200,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// Get 'Browse' button string width
|
||||
auto browseLabel = LanguageGetString(STR_BROWSE);
|
||||
auto browseLabelWidth = GfxGetStringWidth(browseLabel, FontStyle::Medium) + 12;
|
||||
auto browseLabelWidth = GfxGetStringWidth(browseLabel, FontStyle::medium) + 12;
|
||||
|
||||
widgets[WIDX_PATH_TO_RCT1_BROWSE].right = widgets[WIDX_PAGE_BACKGROUND].right - 12;
|
||||
widgets[WIDX_PATH_TO_RCT1_BROWSE].left = widgets[WIDX_PATH_TO_RCT1_BROWSE].right - browseLabelWidth;
|
||||
@@ -2241,11 +2241,11 @@ namespace OpenRCT2::Ui::Windows
|
||||
int32_t widgetHeight = pathWidget.bottom - pathWidget.top;
|
||||
|
||||
// Apply vertical alignment if font height requires it
|
||||
int32_t lineHeight = FontGetLineHeight(FontStyle::Medium);
|
||||
int32_t lineHeight = FontGetLineHeight(FontStyle::medium);
|
||||
int32_t padding = widgetHeight > lineHeight ? (widgetHeight - lineHeight) / 2 : 0;
|
||||
|
||||
auto screenCoords = windowPos + ScreenCoordsXY{ pathWidget.left + 1, pathWidget.top + padding };
|
||||
DrawTextEllipsised(rt, screenCoords, pathWidget.width(), STR_BLACK_STRING, ft);
|
||||
DrawTextEllipsised(rt, screenCoords, pathWidget.width() - 1, STR_BLACK_STRING, ft);
|
||||
}
|
||||
|
||||
OpenRCT2String AdvancedTooltip(WidgetIndex widgetIndex, StringId fallback)
|
||||
@@ -2297,7 +2297,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// helper function, all dropdown boxes have similar properties
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], 0,
|
||||
Dropdown::Flag::StayOpen, num_items, widget->width() - 3);
|
||||
Dropdown::Flag::StayOpen, num_items, widget->width() - 4);
|
||||
}
|
||||
|
||||
void DrawTabImages(RenderTarget& rt)
|
||||
@@ -2352,7 +2352,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
uint8_t GetScrollPercentage(const Widget& widget, const ScrollArea& scroll)
|
||||
{
|
||||
uint8_t w = widget.width() - 1;
|
||||
uint8_t w = widget.width() - 2;
|
||||
return static_cast<float>(scroll.contentOffsetX) / (scroll.contentWidth - w) * 100;
|
||||
}
|
||||
|
||||
@@ -2361,7 +2361,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
const auto& widget = widgets[widgetIndex];
|
||||
auto& scroll = scrolls[scrollId];
|
||||
|
||||
int32_t widgetSize = scroll.contentWidth - (widget.width() - 1);
|
||||
int32_t widgetSize = scroll.contentWidth - (widget.width() - 2);
|
||||
scroll.contentOffsetX = ceil(volume / 100.0f * widgetSize);
|
||||
|
||||
widgetScrollUpdateThumbs(*this, widgetIndex);
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<char*>(_name.c_str());
|
||||
|
||||
ScreenCoordsXY stringCoords(windowPos.x + width / 2, windowPos.y + (height / 2) - 3);
|
||||
DrawTextWrapped(rt, stringCoords, width - 4, STR_FILEBROWSER_OVERWRITE_PROMPT, ft, { TextAlignment::CENTRE });
|
||||
DrawTextWrapped(rt, stringCoords, width - 4, STR_FILEBROWSER_OVERWRITE_PROMPT, ft, { TextAlignment::centre });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -604,8 +604,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
auto* labelWidget = &widgets[WIDX_STATUS];
|
||||
DrawTextEllipsised(
|
||||
rt, windowPos + ScreenCoordsXY{ labelWidget->midX(), labelWidget->top }, labelWidget->width(), STR_BLACK_STRING,
|
||||
ft, { TextAlignment::CENTRE });
|
||||
rt, windowPos + ScreenCoordsXY{ labelWidget->midX(), labelWidget->top }, labelWidget->width() - 1,
|
||||
STR_BLACK_STRING, ft, { TextAlignment::centre });
|
||||
}
|
||||
|
||||
void initViewport()
|
||||
@@ -646,7 +646,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
Widget* viewportWidget = &widgets[WIDX_VIEWPORT];
|
||||
ViewportCreate(
|
||||
*this, windowPos + ScreenCoordsXY{ viewportWidget->left + 1, viewportWidget->top + 1 },
|
||||
viewportWidget->width() - 1, viewportWidget->height() - 1, focus.value());
|
||||
viewportWidget->width() - 2, viewportWidget->height() - 1, focus.value());
|
||||
flags |= WindowFlag::noScrolling;
|
||||
invalidate();
|
||||
}
|
||||
@@ -692,7 +692,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
char buffer[64]{};
|
||||
FormatStringToBuffer(buffer, sizeof(buffer), "{BLACK}{COMMA32}", _ratingProps.max);
|
||||
int32_t maxGraphWidth = GfxGetStringWidth(buffer, FontStyle::Small) + Graph::kYTickMarkPadding + 1;
|
||||
int32_t maxGraphWidth = GfxGetStringWidth(buffer, FontStyle::small) + Graph::kYTickMarkPadding + 1;
|
||||
const ScreenCoordsXY dynamicPadding{ std::max(maxGraphWidth, kGraphTopLeftPadding.x), kGraphTopLeftPadding.y };
|
||||
|
||||
_ratingProps.RecalculateLayout(
|
||||
@@ -773,7 +773,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
char buffer[64]{};
|
||||
FormatStringToBuffer(buffer, sizeof(buffer), "{BLACK}{COMMA32}", _guestProps.max);
|
||||
int32_t maxGraphWidth = GfxGetStringWidth(buffer, FontStyle::Small) + Graph::kYTickMarkPadding + 1;
|
||||
int32_t maxGraphWidth = GfxGetStringWidth(buffer, FontStyle::small) + Graph::kYTickMarkPadding + 1;
|
||||
const ScreenCoordsXY dynamicPadding{ std::max(maxGraphWidth, kGraphTopLeftPadding.x), kGraphTopLeftPadding.y };
|
||||
|
||||
_guestProps.RecalculateLayout(
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(gLandToolSize);
|
||||
DrawTextBasic(
|
||||
rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE });
|
||||
rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -390,7 +390,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
widgets[WIDX_VIEWPORT].right = width - 26;
|
||||
widgets[WIDX_VIEWPORT].bottom = height - 14;
|
||||
|
||||
int32_t groupDropdownWidth = widgets[WIDX_GROUP].width();
|
||||
int32_t groupDropdownWidth = widgets[WIDX_GROUP].width() - 1;
|
||||
widgets[WIDX_GROUP].left = (width - groupDropdownWidth) / 2;
|
||||
widgets[WIDX_GROUP].right = widgets[WIDX_GROUP].left + groupDropdownWidth;
|
||||
widgets[WIDX_GROUP_DROPDOWN].left = widgets[WIDX_GROUP].right - 10;
|
||||
@@ -403,7 +403,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
Widget* viewportWidget = &widgets[WIDX_VIEWPORT];
|
||||
|
||||
viewport->pos = windowPos + ScreenCoordsXY{ viewportWidget->left, viewportWidget->top };
|
||||
viewport->width = viewportWidget->width();
|
||||
viewport->width = viewportWidget->width() - 1;
|
||||
viewport->height = viewportWidget->height();
|
||||
}
|
||||
|
||||
@@ -439,8 +439,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<const char*>(_buffer.c_str());
|
||||
|
||||
DrawTextEllipsised(
|
||||
rt, windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top }, widget->width() - 8, STR_STRING, ft,
|
||||
{ TextAlignment::CENTRE });
|
||||
rt, windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top }, widget->width() - 9, STR_STRING, ft,
|
||||
{ TextAlignment::centre });
|
||||
}
|
||||
|
||||
// Draw ping
|
||||
@@ -466,7 +466,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
ft.Add<StringId>(STR_ACTION_NA);
|
||||
}
|
||||
DrawTextEllipsised(rt, screenCoords, updatedWidth, STR_LAST_ACTION_RAN, ft, { TextAlignment::CENTRE });
|
||||
DrawTextEllipsised(rt, screenCoords, updatedWidth, STR_LAST_ACTION_RAN, ft, { TextAlignment::centre });
|
||||
|
||||
if (viewport != nullptr && _drawViewport)
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<money64>(_demolishRideCost / 2);
|
||||
|
||||
ScreenCoordsXY stringCoords(windowPos.x + kWindowSize.width / 2, windowPos.y + (kWindowSize.height / 2) - 3);
|
||||
DrawTextWrapped(rt, stringCoords, kWindowSize.width - 4, stringId, ft, { TextAlignment::CENTRE });
|
||||
DrawTextWrapped(rt, stringCoords, kWindowSize.width - 4, stringId, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -483,7 +483,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ w->windowPos.x + dropdownWidget->left, w->windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1,
|
||||
w->colours[1], 0, Dropdown::Flag::StayOpen, 4, dropdownWidget->width() - 3);
|
||||
w->colours[1], 0, Dropdown::Flag::StayOpen, 4, dropdownWidget->width() - 4);
|
||||
|
||||
int32_t currentResearchLevel = gameState.researchFundingLevel;
|
||||
gDropdown.items[currentResearchLevel].setChecked(true);
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <openrct2/entity/Staff.h>
|
||||
#include <openrct2/localisation/Currency.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/localisation/Formatting.h>
|
||||
#include <openrct2/localisation/Localisation.Date.h>
|
||||
#include <openrct2/localisation/LocalisationService.h>
|
||||
#include <openrct2/network/Network.h>
|
||||
@@ -624,7 +625,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
ride_type_t RideTypeId;
|
||||
StringId LabelId;
|
||||
u8string_view LabelString;
|
||||
u8string LabelString;
|
||||
};
|
||||
|
||||
// Used for sorting the vehicle type dropdown.
|
||||
@@ -1582,7 +1583,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
const auto& viewWidget = widgets[WIDX_VIEWPORT];
|
||||
|
||||
auto screenPos = windowPos + ScreenCoordsXY{ viewWidget.left + 1, viewWidget.top + 1 };
|
||||
int32_t viewWidth = viewWidget.width() - 1;
|
||||
int32_t viewWidth = viewWidget.width() - 2;
|
||||
int32_t viewHeight = viewWidget.height() - 1;
|
||||
|
||||
ViewportCreate(*this, screenPos, viewWidth, viewHeight, focus.value());
|
||||
@@ -1877,29 +1878,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
static constexpr StringId GetRideTypeNameForDropdown(ride_type_t rideType)
|
||||
{
|
||||
switch (rideType)
|
||||
auto stringId = GetRideTypeDescriptor(rideType).Naming.Name;
|
||||
if (stringId == STR_UNKNOWN_RIDE)
|
||||
{
|
||||
case RIDE_TYPE_1D:
|
||||
return STR_RIDE_NAME_1D;
|
||||
case RIDE_TYPE_1F:
|
||||
return STR_RIDE_NAME_1F;
|
||||
case RIDE_TYPE_22:
|
||||
return STR_RIDE_NAME_22;
|
||||
case RIDE_TYPE_50:
|
||||
return STR_RIDE_NAME_50;
|
||||
case RIDE_TYPE_52:
|
||||
return STR_RIDE_NAME_52;
|
||||
case RIDE_TYPE_53:
|
||||
return STR_RIDE_NAME_53;
|
||||
case RIDE_TYPE_54:
|
||||
return STR_RIDE_NAME_54;
|
||||
case RIDE_TYPE_55:
|
||||
return STR_RIDE_NAME_55;
|
||||
case RIDE_TYPE_59:
|
||||
return STR_RIDE_NAME_59;
|
||||
default:
|
||||
return GetRideTypeDescriptor(rideType).Naming.Name;
|
||||
stringId = STR_RIDE_NAME_UNKNOWN_INT32;
|
||||
}
|
||||
return stringId;
|
||||
}
|
||||
|
||||
void PopulateRideTypeDropdown()
|
||||
@@ -1912,8 +1896,13 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
for (uint8_t i = 0; i < RIDE_TYPE_COUNT; i++)
|
||||
{
|
||||
// Will return the actual name for most rides, but a special string "Unknown Ride ({INT32})" for unknown ones.
|
||||
// The placeholder will then be filled with the ID.
|
||||
auto name = GetRideTypeNameForDropdown(i);
|
||||
_rideDropdownData.push_back({ i, name, u8string_view{ ls.GetString(name) } });
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(i);
|
||||
auto label = FormatStringIDLegacy(name, ft.Data());
|
||||
_rideDropdownData.push_back({ i, name, label });
|
||||
}
|
||||
|
||||
std::sort(_rideDropdownData.begin(), _rideDropdownData.end(), [](auto& a, auto& b) {
|
||||
@@ -1933,7 +1922,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
for (size_t i = 0; i < _rideDropdownData.size(); i++)
|
||||
{
|
||||
gDropdown.items[i] = Dropdown::MenuLabel(_rideDropdownData[i].LabelId);
|
||||
gDropdown.items[i] = Dropdown::MenuLabel(_rideDropdownData[i].LabelString);
|
||||
}
|
||||
|
||||
Widget* dropdownWidget = widget - 1;
|
||||
@@ -2086,7 +2075,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
Widget* dropdownWidget = widget - 1;
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1,
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, numItems, dropdownWidget->width());
|
||||
colours[1], 0, Dropdown::Flag::StayOpen, numItems, dropdownWidget->width() - 1);
|
||||
|
||||
// Find the current vehicle type in the ordered list.
|
||||
int32_t pos = 0;
|
||||
@@ -2609,15 +2598,15 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto* widget = &widgets[WIDX_VIEW];
|
||||
DrawTextBasic(
|
||||
rt, { windowPos.x + (widget->left + widget->right - 11) / 2, windowPos.y + widget->top },
|
||||
STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::CENTRE });
|
||||
STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::centre });
|
||||
|
||||
// Status
|
||||
ft = Formatter();
|
||||
widget = &widgets[WIDX_STATUS];
|
||||
StringId rideStatus = GetStatus(ft);
|
||||
DrawTextEllipsised(
|
||||
rt, windowPos + ScreenCoordsXY{ (widget->left + widget->right) / 2, widget->top }, widget->width(), rideStatus,
|
||||
ft, { TextAlignment::CENTRE });
|
||||
rt, windowPos + ScreenCoordsXY{ (widget->left + widget->right) / 2, widget->top }, widget->width() - 1,
|
||||
rideStatus, ft, { TextAlignment::centre });
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
@@ -2875,7 +2864,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Description
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(rideEntry->naming.Description);
|
||||
screenCoords.y += DrawTextWrapped(rt, screenCoords, 300, STR_BLACK_STRING, ft, { TextAlignment::LEFT });
|
||||
screenCoords.y += DrawTextWrapped(rt, screenCoords, 300, STR_BLACK_STRING, ft, { TextAlignment::left });
|
||||
screenCoords.y += 2;
|
||||
|
||||
// Capacity
|
||||
@@ -2898,7 +2887,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Intensity Factor
|
||||
if (rideEntry->intensity_multiplier != 0)
|
||||
{
|
||||
int32_t lineHeight = FontGetLineHeight(FontStyle::Medium);
|
||||
int32_t lineHeight = FontGetLineHeight(FontStyle::medium);
|
||||
if (lineHeight != 10)
|
||||
screenCoords.x += 150;
|
||||
else
|
||||
@@ -2957,7 +2946,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
Rectangle::fill(rt, { { rt.x, rt.y }, { rt.x + rt.width, rt.y + rt.height } }, PaletteIndex::pi12);
|
||||
|
||||
Widget* widget = &widgets[WIDX_VEHICLE_TRAINS_PREVIEW];
|
||||
int32_t startX = std::max(2, (widget->width() - ((ride->numTrains - 1) * 36)) / 2 - 25);
|
||||
int32_t startX = std::max(2, (widget->width() - 1 - ((ride->numTrains - 1) * 36)) / 2 - 25);
|
||||
int32_t startY = widget->height() - 4;
|
||||
|
||||
bool isReversed = ride->hasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS);
|
||||
@@ -4120,7 +4109,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
if (stringId == STR_CALLING_MECHANIC || stringId == STR_NO_MECHANICS_ARE_HIRED_MESSAGE)
|
||||
{
|
||||
DrawTextWrapped(rt, screenCoords, 280, stringId, {}, { TextAlignment::LEFT });
|
||||
DrawTextWrapped(rt, screenCoords, 280, stringId, {}, { TextAlignment::left });
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4129,7 +4118,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
ft = Formatter();
|
||||
staff->FormatNameTo(ft);
|
||||
DrawTextWrapped(rt, screenCoords, 280, stringId, ft, { TextAlignment::LEFT });
|
||||
DrawTextWrapped(rt, screenCoords, 280, stringId, ft, { TextAlignment::left });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4890,7 +4879,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (ClipDrawPixelInfo(
|
||||
clippedDpi, rt,
|
||||
windowPos + ScreenCoordsXY{ entrancePreviewWidget.left + 1, entrancePreviewWidget.top + 1 },
|
||||
entrancePreviewWidget.width(), entrancePreviewWidget.height()))
|
||||
entrancePreviewWidget.width() - 1, entrancePreviewWidget.height()))
|
||||
{
|
||||
GfxClear(clippedDpi, PaletteIndex::pi12);
|
||||
|
||||
@@ -5137,7 +5126,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Figure out minimum size
|
||||
ScreenSize size{};
|
||||
size.height = widgets[WIDX_MUSIC_DATA].height() - 2;
|
||||
size.width = widgets[WIDX_MUSIC_DATA].width() - 2;
|
||||
size.width = widgets[WIDX_MUSIC_DATA].width() - 3;
|
||||
|
||||
auto ride = GetRide(rideId);
|
||||
if (ride == nullptr)
|
||||
@@ -5155,8 +5144,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (track->Name.empty())
|
||||
continue;
|
||||
|
||||
auto nameWidth = GfxGetStringWidth(track->Name.c_str(), FontStyle::Small);
|
||||
auto composerWidth = GfxGetStringWidth(track->Composer.c_str(), FontStyle::Small);
|
||||
auto nameWidth = GfxGetStringWidth(track->Name.c_str(), FontStyle::small);
|
||||
auto composerWidth = GfxGetStringWidth(track->Composer.c_str(), FontStyle::small);
|
||||
newWidth = std::max(newWidth, nameWidth + composerWidth + 24);
|
||||
}
|
||||
|
||||
@@ -5241,7 +5230,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// 'Tracks' caption
|
||||
auto trackLabelPos = windowPos + ScreenCoordsXY{ widgets[WIDX_MUSIC_DATA].left, widgets[WIDX_MUSIC_DATA].top - 13 };
|
||||
DrawTextWrapped(rt, trackLabelPos, width, STR_MUSIC_OBJECT_TRACK_HEADER, {}, { TextAlignment::LEFT });
|
||||
DrawTextWrapped(rt, trackLabelPos, width, STR_MUSIC_OBJECT_TRACK_HEADER, {}, { TextAlignment::left });
|
||||
|
||||
// Do we have a preview image to draw?
|
||||
auto musicObj = ride->getMusicObject();
|
||||
@@ -5251,7 +5240,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// Figure out where the image should go
|
||||
const auto& previewWidget = widgets[WIDX_MUSIC_IMAGE];
|
||||
int32_t clipWidth = previewWidget.width() - 1;
|
||||
int32_t clipWidth = previewWidget.width() - 2;
|
||||
int32_t clipHeight = previewWidget.height() - 1;
|
||||
|
||||
// Draw the preview image
|
||||
@@ -5307,7 +5296,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
: STR_MUSIC_OBJECT_TRACK_LIST_ITEM_WITH_COMPOSER;
|
||||
|
||||
// Draw the track
|
||||
DrawTextBasic(rt, { 0, y }, stringId, ft, { FontStyle::Small });
|
||||
DrawTextBasic(rt, { 0, y }, stringId, ft, { FontStyle::small });
|
||||
y += kScrollableRowHeight;
|
||||
}
|
||||
}
|
||||
@@ -5614,9 +5603,9 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
Widget* widget = &widgets[WIDX_PAGE_BACKGROUND];
|
||||
|
||||
ScreenCoordsXY widgetCoords(windowPos.x + widget->width() / 2, windowPos.y + widget->top + 40);
|
||||
ScreenCoordsXY widgetCoords(windowPos.x + widget->midX(), windowPos.y + widget->top + 40);
|
||||
DrawTextWrapped(
|
||||
rt, widgetCoords, width - 8, STR_CLICK_ITEMS_OF_SCENERY_TO_SELECT, {}, { TextAlignment::CENTRE });
|
||||
rt, widgetCoords, width - 8, STR_CLICK_ITEMS_OF_SCENERY_TO_SELECT, {}, { TextAlignment::centre });
|
||||
|
||||
widgetCoords.x = windowPos.x + 4;
|
||||
widgetCoords.y = windowPos.y + widgets[WIDX_SELECT_NEARBY_SCENERY].bottom + 17;
|
||||
@@ -5937,11 +5926,11 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
RideMeasurement* measurement{};
|
||||
std::tie(measurement, std::ignore) = ride->getMeasurement();
|
||||
x = measurement == nullptr ? 0 : measurement->current_item - ((widget->width() / 4) * 3);
|
||||
x = measurement == nullptr ? 0 : measurement->current_item - (((widget->width() - 1) / 4) * 3);
|
||||
}
|
||||
}
|
||||
|
||||
scrolls[0].contentOffsetX = std::clamp(x, 0, scrolls[0].contentWidth - (widget->width() - 2));
|
||||
scrolls[0].contentOffsetX = std::clamp(x, 0, scrolls[0].contentWidth - (widget->width() - 3));
|
||||
widgetScrollUpdateThumbs(*this, WIDX_GRAPH);
|
||||
}
|
||||
|
||||
@@ -5951,7 +5940,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
ScreenSize size{};
|
||||
// Set minimum size
|
||||
size.width = widgets[WIDX_GRAPH].width() - 2;
|
||||
size.width = widgets[WIDX_GRAPH].width() - 3;
|
||||
|
||||
// Get measurement size
|
||||
auto ride = GetRide(rideId);
|
||||
@@ -6072,8 +6061,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
// No measurement message
|
||||
ScreenCoordsXY stringCoords(widget->width() / 2, widget->height() / 2 - 5);
|
||||
int32_t txtWidth = widget->width() - 2;
|
||||
DrawTextWrapped(rt, stringCoords, txtWidth, message.str, message.args, { TextAlignment::CENTRE });
|
||||
int32_t txtWidth = widget->width() - 3;
|
||||
DrawTextWrapped(rt, stringCoords, txtWidth, message.str, message.args, { TextAlignment::centre });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6124,7 +6113,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<int16_t>(scaled_yUnit);
|
||||
|
||||
DrawTextBasic(rt, { scrolls[0].contentOffsetX + 1, y - 4 }, stringID, ft, { FontStyle::Small });
|
||||
DrawTextBasic(rt, { scrolls[0].contentOffsetX + 1, y - 4 }, stringID, ft, { FontStyle::small });
|
||||
}
|
||||
|
||||
// Time marks
|
||||
@@ -6134,7 +6123,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(time);
|
||||
if (x + 80 >= rt.x)
|
||||
DrawTextBasic(rt, { x + 2, 1 }, STR_RIDE_STATS_TIME, ft, { FontStyle::Small });
|
||||
DrawTextBasic(rt, { x + 2, 1 }, STR_RIDE_STATS_TIME, ft, { FontStyle::small });
|
||||
time += 5;
|
||||
}
|
||||
|
||||
@@ -6879,7 +6868,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
stringId = queueTime == 1 ? STR_QUEUE_TIME_MINUTE : STR_QUEUE_TIME_MINUTES;
|
||||
ft = Formatter();
|
||||
ft.Add<int32_t>(queueTime);
|
||||
screenCoords.y += DrawTextWrapped(rt, screenCoords, 308, stringId, ft, { TextAlignment::LEFT });
|
||||
screenCoords.y += DrawTextWrapped(rt, screenCoords, 308, stringId, ft, { TextAlignment::left });
|
||||
screenCoords.y += 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -1705,7 +1705,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// Draw track piece
|
||||
auto screenCoords = ScreenCoordsXY{ windowPos.x + widget->left + 1, windowPos.y + widget->top + 1 };
|
||||
widgetWidth = widget->width() - 1;
|
||||
widgetWidth = widget->width() - 2;
|
||||
widgetHeight = widget->height() - 1;
|
||||
if (ClipDrawPixelInfo(clippedRT, rt, screenCoords, widgetWidth, widgetHeight))
|
||||
{
|
||||
@@ -1716,14 +1716,14 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Draw cost
|
||||
screenCoords = { windowPos.x + widget->midX(), windowPos.y + widget->bottom - 23 };
|
||||
if (_rideConstructionState != RideConstructionState::Place)
|
||||
DrawTextBasic(rt, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::centre });
|
||||
|
||||
screenCoords.y += 11;
|
||||
if (_currentTrackPrice != kMoney64Undefined && !(getGameState().park.flags & PARK_FLAGS_NO_MONEY))
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<money64>(_currentTrackPrice);
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_LABEL, ft, { TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_LABEL, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2626,7 +2626,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
|
||||
// Tune dropdown to the elements it contains
|
||||
auto ddWidth = widget->width();
|
||||
auto ddWidth = widget->width() - 1;
|
||||
auto targetColumnSize = _specialElementDropdownState.PreferredNumRows;
|
||||
if (targetColumnSize < _specialElementDropdownState.Elements.size())
|
||||
ddWidth -= 30;
|
||||
|
||||
@@ -343,7 +343,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
const auto& headerWidget = widgets[WIDX_HEADER_OTHER];
|
||||
const auto& customWidget = widgets[WIDX_HEADER_CUSTOMISE];
|
||||
auto totalWidth = headerWidget.width() + customWidget.width();
|
||||
auto totalWidth = headerWidget.width() - 1 + customWidget.width() - 1;
|
||||
|
||||
WindowDropdownShowTextCustomWidth(
|
||||
{ windowPos.x + headerWidget.left, windowPos.y + headerWidget.top }, headerWidget.height(), colours[1], 0,
|
||||
@@ -526,7 +526,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
widgets[WIDX_HEADER_CUSTOMISE].right = widgets[WIDX_LIST].right - 1;
|
||||
widgets[WIDX_HEADER_CUSTOMISE].left = widgets[WIDX_HEADER_CUSTOMISE].right - 14;
|
||||
|
||||
auto columnWidth = (widgets[WIDX_LIST].width() - widgets[WIDX_HEADER_CUSTOMISE].width()) / 2;
|
||||
auto columnWidth = (widgets[WIDX_LIST].width() - 1 - widgets[WIDX_HEADER_CUSTOMISE].width() - 1) / 2;
|
||||
|
||||
widgets[WIDX_HEADER_OTHER].right = widgets[WIDX_HEADER_CUSTOMISE].left - 1;
|
||||
widgets[WIDX_HEADER_OTHER].left = widgets[WIDX_HEADER_OTHER].right - columnWidth + 1;
|
||||
@@ -603,7 +603,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
auto cdpi = const_cast<const RenderTarget&>(rt);
|
||||
DrawTextEllipsised(
|
||||
cdpi, windowPos + ScreenCoordsXY{ widget.left + 1, widget.top + 1 }, widget.width(),
|
||||
cdpi, windowPos + ScreenCoordsXY{ widget.left + 1, widget.top + 1 }, widget.width() - 1,
|
||||
STR_RIDE_LIST_HEADER_FORMAT, ft, { colours[1] });
|
||||
};
|
||||
|
||||
@@ -659,7 +659,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ridePtr->formatNameTo(ft);
|
||||
|
||||
auto& nameHeader = widgets[WIDX_HEADER_NAME];
|
||||
DrawTextEllipsised(rt, { 0, y - 1 }, nameHeader.width() - 2, format, ft);
|
||||
DrawTextEllipsised(rt, { 0, y - 1 }, nameHeader.width() - 3, format, ft);
|
||||
|
||||
// Ride information
|
||||
ft = Formatter();
|
||||
@@ -866,7 +866,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
|
||||
auto infoHeader = widgets[WIDX_HEADER_OTHER];
|
||||
DrawTextEllipsised(rt, { infoHeader.left - 4, y - 1 }, infoHeader.width() - 2, format, ft);
|
||||
DrawTextEllipsised(rt, { infoHeader.left - 4, y - 1 }, infoHeader.width() - 3, format, ft);
|
||||
y += kScrollableRowHeight;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <openrct2/core/FileStream.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/localisation/Formatting.h>
|
||||
#include <openrct2/localisation/LocalisationService.h>
|
||||
@@ -245,7 +246,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
return;
|
||||
|
||||
auto& objManager = GetContext()->GetObjectManager();
|
||||
if (auto obj = objManager.LoadTempObject(source.textObjectId); obj != nullptr)
|
||||
if (auto obj = objManager.LoadTempObject(source.textObjectId, true); obj != nullptr)
|
||||
{
|
||||
auto& scenarioMetaObj = reinterpret_cast<ScenarioMetaObject&>(*obj);
|
||||
scenarioMetaObj.Load();
|
||||
@@ -306,12 +307,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
drawWidgets(rt);
|
||||
|
||||
StringId format = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
FontStyle fontStyle = FontStyle::Medium;
|
||||
FontStyle fontStyle = FontStyle::medium;
|
||||
|
||||
if (ScenarioSelectUseSmallFont())
|
||||
{
|
||||
format = STR_SMALL_WINDOW_COLOUR_2_STRINGID;
|
||||
fontStyle = FontStyle::Small;
|
||||
fontStyle = FontStyle::small;
|
||||
}
|
||||
|
||||
// Text for each tab
|
||||
@@ -325,7 +326,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<StringId>(kScenarioOriginStringIds[i]);
|
||||
|
||||
auto stringCoords = windowPos + ScreenCoordsXY{ widget.midX(), widget.midY() - 3 };
|
||||
DrawTextWrapped(rt, stringCoords, 87, format, ft, { COLOUR_AQUAMARINE, fontStyle, TextAlignment::CENTRE });
|
||||
DrawTextWrapped(rt, stringCoords, 87, format, ft, { COLOUR_AQUAMARINE, fontStyle, TextAlignment::centre });
|
||||
}
|
||||
|
||||
auto previewPaneWidth = GetPreviewPaneWidth();
|
||||
@@ -341,7 +342,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
+ ScreenCoordsXY{ widgets[WIDX_SCENARIOLIST].right + 4, widgets[WIDX_TABCONTENT].top + 5 };
|
||||
DrawTextEllipsised(
|
||||
rt, screenPos + ScreenCoordsXY{ previewPaneWidth / 2, 0 }, previewPaneWidth, STR_SCENARIO_LOCKED, {},
|
||||
{ TextAlignment::CENTRE });
|
||||
{ TextAlignment::centre });
|
||||
|
||||
DrawTextWrapped(rt, screenPos + ScreenCoordsXY{ 0, 15 }, previewPaneWidth, STR_SCENARIO_LOCKED_DESC);
|
||||
}
|
||||
@@ -359,7 +360,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Scenario path
|
||||
if (Config::Get().general.debuggingTools)
|
||||
{
|
||||
const auto shortPath = ShortenPath(scenario->Path, width - 6 - kTabWidth, FontStyle::Medium);
|
||||
const auto shortPath = ShortenPath(scenario->Path, width - 6 - kTabWidth, FontStyle::medium);
|
||||
|
||||
auto ft = Formatter();
|
||||
ft.Add<utf8*>(shortPath.c_str());
|
||||
@@ -374,7 +375,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<const char*>(scenario->Name.c_str());
|
||||
DrawTextEllipsised(
|
||||
rt, screenPos + ScreenCoordsXY{ previewPaneWidth / 2, 0 }, previewPaneWidth, STR_WINDOW_COLOUR_2_STRINGID, ft,
|
||||
{ TextAlignment::CENTRE });
|
||||
{ TextAlignment::centre });
|
||||
|
||||
// Still loading the preview?
|
||||
if (_previewLoadJob.isValid())
|
||||
@@ -383,7 +384,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<StringId>(STR_LOADING_GENERIC);
|
||||
DrawTextBasic(
|
||||
rt, screenPos + ScreenCoordsXY{ previewPaneWidth / 2, 15 }, STR_BLACK_STRING, ft,
|
||||
{ TextAlignment::CENTRE });
|
||||
{ TextAlignment::centre });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -553,12 +554,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
|
||||
const auto& listWidget = widgets[WIDX_SCENARIOLIST];
|
||||
int32_t listWidth = listWidget.width() - 12;
|
||||
int32_t listWidth = listWidget.width() - 13;
|
||||
|
||||
const int32_t scenarioItemHeight = GetScenarioListItemSize();
|
||||
|
||||
// Scenario title
|
||||
int32_t scenarioTitleHeight = FontGetLineHeight(FontStyle::Medium);
|
||||
int32_t scenarioTitleHeight = FontGetLineHeight(FontStyle::medium);
|
||||
|
||||
int32_t y = 0;
|
||||
for (const auto& listItem : _listItems)
|
||||
@@ -599,18 +600,18 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<const char*>(scenario->Name.c_str());
|
||||
auto colour = isDisabled ? colours[1].withFlag(ColourFlag::inset, true)
|
||||
: ColourWithFlags{ COLOUR_BLACK };
|
||||
auto darkness = isDisabled ? TextDarkness::Dark : TextDarkness::Regular;
|
||||
auto darkness = isDisabled ? TextDarkness::dark : TextDarkness::regular;
|
||||
const auto scrollCentre = widgets[WIDX_SCENARIOLIST].width() / 2;
|
||||
|
||||
DrawTextBasic(
|
||||
rt, { scrollCentre, y + 1 }, format, ft,
|
||||
{ colour, FontStyle::Medium, TextAlignment::CENTRE, darkness });
|
||||
{ colour, FontStyle::medium, TextAlignment::centre, darkness });
|
||||
|
||||
// Check if scenario is completed
|
||||
if (isCompleted)
|
||||
{
|
||||
// Draw completion tick
|
||||
GfxDrawSprite(rt, ImageId(SPR_MENU_CHECKMARK), { widgets[WIDX_SCENARIOLIST].width() - 45, y + 1 });
|
||||
GfxDrawSprite(rt, ImageId(SPR_MENU_CHECKMARK), { widgets[WIDX_SCENARIOLIST].width() - 46, y + 1 });
|
||||
|
||||
// Draw completion score
|
||||
u8string completedByName = "???";
|
||||
@@ -624,7 +625,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<const char*>(completedByName.c_str());
|
||||
DrawTextBasic(
|
||||
rt, { scrollCentre, y + scenarioTitleHeight + 1 }, format, ft,
|
||||
{ FontStyle::Small, TextAlignment::CENTRE });
|
||||
{ FontStyle::small, TextAlignment::centre });
|
||||
}
|
||||
|
||||
y += scenarioItemHeight;
|
||||
@@ -643,13 +644,13 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// Draw string
|
||||
int32_t centreX = (left + right) / 2;
|
||||
DrawTextBasic(rt, { centreX, y }, stringId, {}, { baseColour, TextAlignment::CENTRE });
|
||||
DrawTextBasic(rt, { centreX, y }, stringId, {}, { baseColour, TextAlignment::centre });
|
||||
|
||||
// Get string dimensions
|
||||
utf8 buffer[512];
|
||||
auto bufferPtr = buffer;
|
||||
OpenRCT2::FormatStringLegacy(bufferPtr, sizeof(buffer), stringId, nullptr);
|
||||
int32_t categoryStringHalfWidth = (GfxGetStringWidth(bufferPtr, FontStyle::Medium) / 2) + 4;
|
||||
int32_t categoryStringHalfWidth = (GfxGetStringWidth(bufferPtr, FontStyle::medium) / 2) + 4;
|
||||
int32_t strLeft = centreX - categoryStringHalfWidth;
|
||||
int32_t strRight = centreX + categoryStringHalfWidth;
|
||||
|
||||
@@ -848,10 +849,10 @@ namespace OpenRCT2::Ui::Windows
|
||||
return kTrueFontSize;
|
||||
|
||||
// Scenario title
|
||||
int32_t lineHeight = FontGetLineHeight(FontStyle::Medium);
|
||||
int32_t lineHeight = FontGetLineHeight(FontStyle::medium);
|
||||
|
||||
// 'Completed by' line
|
||||
lineHeight += FontGetLineHeight(FontStyle::Small);
|
||||
lineHeight += FontGetLineHeight(FontStyle::small);
|
||||
|
||||
return lineHeight;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <openrct2/actions/SmallSceneryPlaceAction.h>
|
||||
#include <openrct2/actions/SmallScenerySetColourAction.h>
|
||||
#include <openrct2/actions/WallPlaceAction.h>
|
||||
#include <openrct2/actions/WallRemoveAction.h>
|
||||
#include <openrct2/actions/WallSetColourAction.h>
|
||||
#include <openrct2/audio/Audio.h>
|
||||
#include <openrct2/config/Config.h>
|
||||
@@ -206,6 +207,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
};
|
||||
|
||||
struct ProvisionalWallTile
|
||||
{
|
||||
CoordsXYZD location;
|
||||
int32_t calculatedZ;
|
||||
};
|
||||
|
||||
std::vector<SceneryTabInfo> _tabEntries;
|
||||
int32_t _requiredWidth;
|
||||
int32_t _actualMinHeight;
|
||||
@@ -216,6 +223,18 @@ namespace OpenRCT2::Ui::Windows
|
||||
uint8_t _unkF64F0E{ 0 };
|
||||
int16_t _unkF64F0A{ 0 };
|
||||
|
||||
CoordsXY _dragStartPos{};
|
||||
/**
|
||||
* When placing fences in the air using Shift, the user may shift their mouse to the left or right.
|
||||
* We save this position to avoid detecting a wall drag where there isn’t one.
|
||||
*/
|
||||
CoordsXY _dragStartHoverPos{};
|
||||
CoordsXY _dragEndPos{};
|
||||
uint8_t _startEdge{};
|
||||
GameActions::Result _lastProvisionalError{};
|
||||
bool _inDragMode = false;
|
||||
std::vector<ProvisionalWallTile> _provisionalTiles{};
|
||||
|
||||
public:
|
||||
void onOpen() override
|
||||
{
|
||||
@@ -255,6 +274,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
void onClose() override
|
||||
{
|
||||
SceneryRemoveGhostToolPlacement();
|
||||
removeProvisionalTilesFromMap();
|
||||
HideGridlines();
|
||||
ViewportSetVisibility(ViewportVisibility::standard);
|
||||
|
||||
@@ -849,7 +869,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
// -14
|
||||
DrawTextBasic(
|
||||
rt, windowPos + ScreenCoordsXY{ width - 0x1A, height - 13 }, STR_COST_LABEL, ft, { TextAlignment::RIGHT });
|
||||
rt, windowPos + ScreenCoordsXY{ width - 0x1A, height - 13 }, STR_COST_LABEL, ft, { TextAlignment::right });
|
||||
}
|
||||
|
||||
auto ft = Formatter();
|
||||
@@ -1058,7 +1078,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
int32_t GetNumColumns() const
|
||||
{
|
||||
const auto& listWidget = widgets[WIDX_SCENERY_LIST];
|
||||
const auto contentWidth = listWidget.width() - kScrollBarWidth;
|
||||
const auto contentWidth = listWidget.width() - 1 - kScrollBarWidth;
|
||||
return contentWidth / kSceneryButtonWidth;
|
||||
}
|
||||
|
||||
@@ -1814,6 +1834,13 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
void onToolUpdateWall(WidgetIndex widgetIndex, const ScreenCoordsXY& screenPos, ScenerySelection selection)
|
||||
{
|
||||
bool isLeftMousePressed = gInputFlags.has(InputFlag::leftMousePressed);
|
||||
if (isLeftMousePressed)
|
||||
{
|
||||
gMapSelectFlags.set(MapSelectFlag::enable);
|
||||
return;
|
||||
}
|
||||
|
||||
CoordsXY mapTile = {};
|
||||
uint8_t edge;
|
||||
|
||||
@@ -1826,10 +1853,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
|
||||
gMapSelectFlags.set(MapSelectFlag::enable);
|
||||
gMapSelectPositionA.x = mapTile.x;
|
||||
gMapSelectPositionA.y = mapTile.y;
|
||||
gMapSelectPositionB.x = mapTile.x;
|
||||
gMapSelectPositionB.y = mapTile.y;
|
||||
setMapSelectRange(mapTile);
|
||||
gMapSelectType = getMapSelectEdge(edge);
|
||||
|
||||
MapInvalidateSelectionRect();
|
||||
@@ -2717,6 +2741,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (gridPos.IsNull())
|
||||
return;
|
||||
|
||||
gridPos = gridPos.ToTileStart();
|
||||
|
||||
if (Config::Get().general.virtualFloorStyle != VirtualFloorStyles::Off)
|
||||
{
|
||||
VirtualFloorSetHeight(gSceneryPlaceZ);
|
||||
@@ -3027,6 +3053,31 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto res = GameActions::Execute(&footpathAdditionPlaceAction, gameState);
|
||||
}
|
||||
|
||||
std::optional<CoordsXY> getMapPosFromScreenPos(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
CoordsXY coords;
|
||||
if (gSceneryPlaceZ > 0)
|
||||
{
|
||||
auto candidate = ScreenGetMapXYWithZ(screenCoords, gSceneryPlaceZ);
|
||||
if (!candidate.has_value())
|
||||
return std::nullopt;
|
||||
|
||||
coords = *candidate;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto info = GetMapCoordinatesFromPos(screenCoords, EnumsToFlags(ViewportInteractionItem::terrain));
|
||||
|
||||
if (info.interactionType == ViewportInteractionItem::none)
|
||||
return std::nullopt;
|
||||
|
||||
coords = info.Loc;
|
||||
}
|
||||
|
||||
coords = coords.ToTileStart();
|
||||
return coords;
|
||||
}
|
||||
|
||||
void onToolDownWall(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords, uint16_t selectedScenery)
|
||||
{
|
||||
CoordsXY gridPos;
|
||||
@@ -3068,19 +3119,165 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
}
|
||||
|
||||
auto wallPlaceAction = GameActions::WallPlaceAction(
|
||||
selectedScenery, { gridPos, gSceneryPlaceZ }, edges, _sceneryPrimaryColour, _scenerySecondaryColour,
|
||||
_sceneryTertiaryColour);
|
||||
_inDragMode = true;
|
||||
_dragStartPos = gridPos;
|
||||
auto hoverPos = getMapPosFromScreenPos(screenCoords);
|
||||
_dragStartHoverPos = hoverPos.has_value() ? *hoverPos : gridPos;
|
||||
_dragEndPos = {};
|
||||
_startEdge = edges;
|
||||
gMapSelectFlags.set(MapSelectFlag::enable);
|
||||
gMapSelectType = getMapSelectEdge(_startEdge);
|
||||
setMapSelectRange(gridPos);
|
||||
}
|
||||
|
||||
wallPlaceAction.SetCallback([](const GameActions::GameAction* ga, const GameActions::Result* result) {
|
||||
if (result->Error == GameActions::Status::Ok)
|
||||
{
|
||||
Audio::Play3D(Audio::SoundId::placeItem, result->Position);
|
||||
}
|
||||
});
|
||||
void dragWallSetEndPos(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
auto endCoords = getMapPosFromScreenPos(screenCoords);
|
||||
if (!endCoords.has_value())
|
||||
return;
|
||||
|
||||
if (endCoords == _dragStartHoverPos)
|
||||
{
|
||||
endCoords = _dragStartPos;
|
||||
}
|
||||
|
||||
const bool onXAxis = (_startEdge == 1 || _startEdge == 3);
|
||||
if (onXAxis)
|
||||
{
|
||||
endCoords->y = _dragStartPos.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
endCoords->x = _dragStartPos.x;
|
||||
}
|
||||
|
||||
if (*endCoords != _dragEndPos)
|
||||
{
|
||||
setMapSelectRange({ _dragStartPos, *endCoords });
|
||||
updateProvisionalTiles();
|
||||
}
|
||||
_dragEndPos = *endCoords;
|
||||
}
|
||||
|
||||
void removeProvisionalTilesFromMap()
|
||||
{
|
||||
auto& gameState = getGameState();
|
||||
auto res = GameActions::Execute(&wallPlaceAction, gameState);
|
||||
for (const auto& tile : _provisionalTiles)
|
||||
{
|
||||
auto location = tile.location;
|
||||
location.z = tile.calculatedZ;
|
||||
auto wallRemoveAction = GameActions::WallRemoveAction(location);
|
||||
wallRemoveAction.SetFlags(
|
||||
GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST);
|
||||
wallRemoveAction.Execute(gameState);
|
||||
}
|
||||
}
|
||||
|
||||
void updateProvisionalTiles()
|
||||
{
|
||||
auto& gameState = getGameState();
|
||||
auto tabSelection = WindowSceneryGetTabSelection();
|
||||
removeProvisionalTilesFromMap();
|
||||
|
||||
_provisionalTiles.clear();
|
||||
_lastProvisionalError = {};
|
||||
|
||||
auto mapRange = getMapSelectRange();
|
||||
for (auto y = mapRange.GetY1(); y <= mapRange.GetY2(); y += kCoordsXYStep)
|
||||
{
|
||||
for (auto x = mapRange.GetX1(); x <= mapRange.GetX2(); x += kCoordsXYStep)
|
||||
{
|
||||
auto wallPlaceAction = GameActions::WallPlaceAction(
|
||||
tabSelection.EntryIndex, { x, y, gSceneryPlaceZ }, _startEdge, _sceneryPrimaryColour,
|
||||
_scenerySecondaryColour, _sceneryTertiaryColour);
|
||||
wallPlaceAction.SetFlags(GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED);
|
||||
|
||||
auto result = GameActions::Execute(&wallPlaceAction, gameState);
|
||||
if (result.Error == GameActions::Status::Ok)
|
||||
{
|
||||
const auto placementData = result.GetData<GameActions::WallPlaceActionResult>();
|
||||
_provisionalTiles.push_back({ CoordsXYZD(x, y, gSceneryPlaceZ, _startEdge), placementData.BaseHeight });
|
||||
}
|
||||
else
|
||||
{
|
||||
_lastProvisionalError = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void onToolDragWall(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
if (!_inDragMode)
|
||||
return;
|
||||
|
||||
dragWallSetEndPos(screenCoords);
|
||||
}
|
||||
|
||||
void onToolUp(WidgetIndex, const ScreenCoordsXY&) override
|
||||
{
|
||||
if (_sceneryPaintEnabled || gWindowSceneryEyedropperEnabled)
|
||||
return;
|
||||
|
||||
auto tabSelection = WindowSceneryGetTabSelection();
|
||||
auto sceneryType = tabSelection.SceneryType;
|
||||
if (sceneryType == SCENERY_TYPE_WALL)
|
||||
{
|
||||
onToolUpWall(tabSelection.EntryIndex);
|
||||
}
|
||||
}
|
||||
|
||||
void onToolUpWall(uint16_t selectedScenery)
|
||||
{
|
||||
removeProvisionalTilesFromMap();
|
||||
|
||||
if (!_inDragMode)
|
||||
{
|
||||
_provisionalTiles.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
if (_provisionalTiles.empty())
|
||||
{
|
||||
auto z = gSceneryPlaceZ > 0 ? gSceneryPlaceZ : TileElementHeight(_dragStartPos);
|
||||
Audio::Play3D(Audio::SoundId::error, { _dragStartPos, z });
|
||||
|
||||
if (_lastProvisionalError.Error != GameActions::Status::Ok)
|
||||
{
|
||||
auto windowManager = Ui::GetWindowManager();
|
||||
windowManager->ShowError(
|
||||
_lastProvisionalError.GetErrorTitle(), _lastProvisionalError.GetErrorMessage(), true);
|
||||
}
|
||||
|
||||
_inDragMode = false;
|
||||
return;
|
||||
}
|
||||
|
||||
auto mapRange = getMapSelectRange();
|
||||
bool anySuccessful = false;
|
||||
CoordsXYZ lastLocation = { mapRange.Point2, gSceneryPlaceZ };
|
||||
for (const auto& tile : _provisionalTiles)
|
||||
{
|
||||
auto wallPlaceAction = GameActions::WallPlaceAction(
|
||||
selectedScenery, tile.location, tile.location.direction, _sceneryPrimaryColour, _scenerySecondaryColour,
|
||||
_sceneryTertiaryColour);
|
||||
|
||||
auto& gameState = getGameState();
|
||||
auto result = GameActions::Execute(&wallPlaceAction, gameState);
|
||||
if (result.Error == GameActions::Status::Ok)
|
||||
{
|
||||
anySuccessful = true;
|
||||
lastLocation = result.Position;
|
||||
}
|
||||
}
|
||||
|
||||
_provisionalTiles.clear();
|
||||
_inDragMode = false;
|
||||
|
||||
if (anySuccessful)
|
||||
{
|
||||
Audio::Play3D(Audio::SoundId::placeItem, lastLocation);
|
||||
}
|
||||
}
|
||||
|
||||
void onToolDownLargeScenery(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords, uint16_t selectedScenery)
|
||||
@@ -3223,6 +3420,13 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
if (_sceneryPaintEnabled || gWindowSceneryEyedropperEnabled)
|
||||
onToolDown(widgetIndex, screenCoords);
|
||||
|
||||
auto tabSelection = WindowSceneryGetTabSelection();
|
||||
auto sceneryType = tabSelection.SceneryType;
|
||||
if (sceneryType == SCENERY_TYPE_WALL)
|
||||
{
|
||||
onToolDragWall(screenCoords);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(gWindowSceneryScatterSize);
|
||||
DrawTextBasic(
|
||||
rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE });
|
||||
rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -248,7 +248,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
else
|
||||
{
|
||||
const int32_t iconX = listWidget.width() - kScrollBarWidth - 7 - 10;
|
||||
const int32_t iconX = listWidget.width() - 1 - kScrollBarWidth - 7 - 10;
|
||||
showNetworkVersionTooltip = screenCoords.x > iconX;
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
GfxClear(rt, paletteIndex);
|
||||
|
||||
auto& listWidget = widgets[WIDX_LIST];
|
||||
int32_t listWidgetWidth = listWidget.width();
|
||||
int32_t listWidgetWidth = listWidget.width() - 1;
|
||||
|
||||
ScreenCoordsXY screenCoords;
|
||||
screenCoords.y = 0;
|
||||
@@ -371,7 +371,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
snprintf(players, sizeof(players), "%d/%d", serverDetails.Players, serverDetails.MaxPlayers);
|
||||
}
|
||||
const int16_t numPlayersStringWidth = GfxGetStringWidth(players, FontStyle::Medium);
|
||||
const int16_t numPlayersStringWidth = GfxGetStringWidth(players, FontStyle::medium);
|
||||
|
||||
// How much space we have for the server info depends on the size of everything rendered after.
|
||||
const int16_t spaceAvailableForInfo = listWidgetWidth - numPlayersStringWidth - kScrollBarWidth - 35;
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<StringId>(STR_STRING);
|
||||
ft.Add<const char*>(_shortcutCustomName.c_str());
|
||||
}
|
||||
DrawTextWrapped(rt, stringCoords, 242, STR_SHORTCUT_CHANGE_PROMPT, ft, { TextAlignment::CENTRE });
|
||||
DrawTextWrapped(rt, stringCoords, 242, STR_SHORTCUT_CHANGE_PROMPT, ft, { TextAlignment::centre });
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Loaded 100 of 203 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user