Modifying Source GameUI: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Undo revision 181244 by SmeRT (talk))
Line 5: Line 5:
|tr=Modifying Source GameUI Source GameUI:tr
|tr=Modifying Source GameUI Source GameUI:tr
}}
}}
Изменить интерфейс в игре (GameUI) очень просто. Достаточно только открыть файл <code>SteamApps\SourceMods\YourMod\Resource\SourceScheme.res</code> используя любой [[текстовой редактор]]. Если вы еще не начали создавать свой собственно мод [[Half-Life 2]], то вам необходимо извлечь файл <code>SourceScheme.res</code> из кода <code>source engine. В [[GCF|gcf]]</code> файлах, которые лежат <code>SteamApps</code> папке. Найдите в <code>root\hl2\resource\</code> ваш файл. Вам нужно извлечь его в папку с игрой или в папку с ресурсами вашей игры.
Changing the appearance of Source's GameUI is as easy as changing the values in the <code>SteamApps\SourceMods\YourMod\Resource\SourceScheme.res</code> using any [[text editor]]. If you have not started to create your own [[Half-Life 2]] mod you will need to extract the <code>SourceScheme.res</code> file from the <code>source engine.[[GCF|gcf]]</code> file in the <code>SteamApps</code> folder. Look under <code>root\hl2\resource\SourceScheme.res</code> to find the file. You will need to extract the <code>SourceScheme.res</code> file into a game's resource folder or your mod's folder.


Давайте изменим цвет наших GameUI элементов в голубой оттенок . Открываем <code>SourceScheme.res</code> с помощью текстового редактора и ищем строку 63. Там должно быть что-то вроде этого:
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 63 you should see something like this...


  Frame.TitleTextInsetX 16
  Frame.TitleTextInsetX 16
Line 18: Line 18:
  Frame.AutoSnapRange "0"
  Frame.AutoSnapRange "0"


Просто изменим значение <code>Frame.BgColor</code> на <code>160 160 255 128</code>. Цвет идет в порядке 'RGBA' (Красный-Зеленый-Голубой-Альфа). Теперь сохраните файл и запустить мод. Ваш GUI интерфейс стал голубого оттенка.
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.
[[Category:Tutorials]] [[Category:Modding]]
[[Category:Tutorials]] [[Category:Modding]]

Revision as of 01:16, 5 June 2014

Template:Otherlang2 Changing the appearance of Source's GameUI is as easy as changing the values in the SteamApps\SourceMods\YourMod\Resource\SourceScheme.res using any text editor. If you have not started to create your own Half-Life 2 mod you will need to extract the SourceScheme.res file from the source engine.gcf file in the SteamApps folder. Look under root\hl2\resource\SourceScheme.res to find the file. You will need to extract the SourceScheme.res file into a game's resource folder or your mod's folder.

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 63 you should see something like this...

	Frame.TitleTextInsetX			16
	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"

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.