Modifying Source GameUI:zh-cn

From Valve Developer Community
Jump to: navigation, search
Underlinked - Logo.png
This article needs more links to other articles to help integrate it into the encyclopedia. Please help improve this article by adding links that are relevant to the context within the existing text.
January 2024
English (en)français (fr)русский (ru)Türkçe (tr)中文 (zh)
... Icon-Important.png

改变 Source 游戏用户界面只需要使用任何 文本编辑器 改变 SteamApps\SourceMods\YourMod\Resource\SourceScheme.res 文件内容. 如果您还没有制作您自己的 MOD, 您需要从 SteamApps 目录下的 source engine.gcf 文件中提取出 SourceScheme.res 文件. 在这个 root\hl2\resource\SourceScheme.res 目录下可以找到此文件. 您需要把 SourceScheme.res 文件提取到游戏或 MOD 里面的 resource 文件夹下面.

让我们看看怎样把游戏中的改变界面改成蓝色的吧. 先打开 SourceScheme.res 文件, 滚动到大约第 63 行, 您将会看到一些这样的东西...

	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"

现在把 Frame.BgColor 的值改变为 160 160 255 128. 颜色格式为 'RGBA' (红-绿-蓝-Alpha值)(Red-Green-Blue-Alpha). 保存文件, 运行 MOD 看看吧. GUI 变成蓝色的了.