Modifying Source GameUI: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(16 intermediate revisions by 9 users not shown)
Line 1: Line 1:
[[Category:Tutorials]] [[Category:Modding]]
{{LanguageBar}}
Changer l’apparance de « Source Game UI » est aussi facile que de changer les valeurs dans <code>SteamApps\SourceMods\YourMod\Resource\SourceScheme.res</code> en utilisant n’importe quel [[text editor|Éditeur de texte]]. Si vous n’avez pas commencé à créer  votre propre mod de [[Half-Life 2]] vous aurez besoin d’extraire le fichier <code>SourceScheme.res</code> du fichier <code>source engine.[[GCF|GCF]]</code> dans le dossier  <code>SteamApps</code>. Le fichier devrait être dans le dossier <code>root\hl2\resource\SourceScheme.res</code>. Vous devrez extraire le fichier <code>SourceScheme.res</code> dans le dossier du jeu ou dans le dossier de votre mod.
 
{{todo|implement changes in other languages}}
 
Changing the appearance of Source's GameUI is as easy as changing the values in the [[SourceScheme.res]] file using any [[text editor]]. If you have not started to create your own [[Half-Life 2]] mod you will need to [https://pastebin.com/DmfKLEAD download the file from here]. You will need to move the <code>SourceScheme.res</code> file into a game's resource folder or your mod's folder, replacing the file if it already exists.


Essayon de changer la couleur des éléments « Game UI » dans des teintes de bleu. Ouvrez le fichier <code>SourceScheme.res</code> dans votre éditeur de texte et trouvez la ligne 63; vous devriez voir quelque chose du genre de…
Let's take a look at changing the color of all GameUI elements to a blue tint. Open the <code>SourceScheme.res</code> file in notepad and scroll down to about line 70 you should see something like this...


<pre>
Frame.TitleTextInsetX 16
Frame.ClientInsetX 8
Frame.ClientInsetY 6
Frame.BgColor "160 160 160 128" [$WIN32]
Frame.BgColor "80 80 80 192" [$X360]
Frame.OutOfFocusBgColor "160 160 160 32" [$WIN32]
Frame.OutOfFocusBgColor "80 80 80 192" [$X360]
Frame.FocusTransitionEffectTime "0.3" // time it takes for a window to fade in/out on focus/out of focus
</pre>


Frame.TitleTextInsetX 16
Simply change the values for <code>Frame.BgColor</code> to <code>160 160 255 128</code>. Colors are ordered 'RGBA' (Red-Green-Blue-Alpha). Now save the file and run your mod. You now have a blue tinted GUI.
Frame.ClientInsetX 8
Frame.ClientInsetY 6
Frame.BgColor "160 160 160 128"
Frame.OutOfFocusBgColor "160 160 160 32"
Frame.FocusTransitionEffectTime "0.3" // time for a window to fade on focus
Frame.TransitionEffectTime "0.08" // time for a window to fade on open/close
Frame.AutoSnapRange "0"


Simplement changer les valeurs de <code>Frame.BgColor</code> pour <code>160 160 255 128</code>. Les couleurs sont ordonné dans le sens « RVBA » (Rouge-Vert-Bleu-Alpha). Maintenant sauvegarder votre fichier et démarez votre mod. Vous devriez avoir un GUI  de couleur  bleu.
[[Category:Tutorials]] [[Category:Modding]]

Latest revision as of 06:07, 14 July 2024

English (en)Français (fr)Русский (ru)Türkçe (tr)中文 (zh)Translate (Translate)
Todo: implement changes in other languages

Changing the appearance of Source's GameUI is as easy as changing the values in the SourceScheme.res file using any text editor. If you have not started to create your own Half-Life 2 mod you will need to download the file from here. You will need to move the SourceScheme.res file into a game's resource folder or your mod's folder, replacing the file if it already exists.

Let's take a look at changing the color of all GameUI elements to a blue tint. Open the SourceScheme.res file in notepad and scroll down to about line 70 you should see something like this...

Frame.TitleTextInsetX			16
Frame.ClientInsetX				8
Frame.ClientInsetY				6
Frame.BgColor					"160 160 160 128"	[$WIN32]
Frame.BgColor					"80 80 80 192"		[$X360]
Frame.OutOfFocusBgColor			"160 160 160 32"	[$WIN32]
Frame.OutOfFocusBgColor			"80 80 80 192"		[$X360]
Frame.FocusTransitionEffectTime	"0.3"							// time it takes for a window to fade in/out on focus/out of focus

Simply change the values for Frame.BgColor to 160 160 255 128. Colors are ordered 'RGBA' (Red-Green-Blue-Alpha). Now save the file and run your mod. You now have a blue tinted GUI.