Zh/Adding Your Logo to the Menu: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
(Created page with "{{subst:#if: Translation of 'Adding Your Logo to the Menu' to '中文' via Template:LanguageBar buttons * * * * * * * * * * * * * * * * * * * * * * * * * * * *...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{subst:#if:|||{{LAuto/t}}
{{LanguageBar|title = 在菜单中添加你的Logo}}


--- DON'T JUST BLINDLY DELETE THIS PART. DO REPLACE THE LINKS AND CATEGORIES. THE PICTURE SHOWS HOW TO USE IT ! ---
[[File:Gamelogo.jpg|thumb|《军团要塞2》的Logo(此处显示原始版本)尺寸为512x128像素。]]


SEARCH FOR:
你可以使用Logo图片替代纯文字显示模组名称。具体步骤如下:
\[\[(?!#|File(?:[ _]talk)?:|Image(?:[ _]talk)?:|Media:|Template(?:[ _]talk)?:|MediaWiki(?:[ _]talk)?:|Talk:|Category[ _]talk:|Project[ _]talk:|Valve[ _]Developer[ _]Community[ _]talk:|Help[ _]talk:|User(?:[ _]talk)?:|c:|commons:|Dictionary:|Google:|GoogleGroups:|IMDB:|M:|Meta:|Metawikipedia:|MW:|SdkBug:|SourceForge:|Steampowered:|W:|Wiki:|WikiBooks:|Wikipedia:|Wikiquote:|Wiktionary:|WP:)(:?(?:Category|Category|Help|Project|Valve[ _]Developer[ _]Community|Special|)(?:[^\|\]]+))(\|?.*?)\]\]


REPLACE WITH:
# 在{{L|gameinfo.txt}}文件顶部添加<code>gamelogo 1</code>(与<code>game</code><code>type</code>等参数处于同一代码块)
{{subst:LAuto|$1$2}}
# 使用以下模板创建文本文件<code><mod>\resource\GameLogo.res</code>
 
}}{{wip}}{{translating}}
{{LanguageBar|title = Adding your logo to the menu}}
 
 
[[File:Gamelogo.jpg|thumb|TF2's logo (in the original version shown here) is 512x128px.]]
 
Instead of displaying your mod's name as a string of characters, you can have a logo image. To do this:
 
# Add <code>gamelogo 1</code> to the top of [[gameinfo.txt]] (same block as <code>game</code>, <code>type</code>, etc.).
# Create <code><mod>\resource\GameLogo.res</code>, a text file, with this template:


<source lang=ini>
<source lang=ini>
Line 57: Line 45:
</source>
</source>


The path of the <code>image</code> field is relative to <code>materials\'''vgui\'''</code>. As you can see in the example above, the TF2 logo is actually stored in <code>materials\logo\</code>!
<code>image</code>字段的路径是相对于<code>materials\'''vgui\'''</code>目录的。如上例所示,《军团要塞2》的Logo实际上存储在<code>materials\logo\</code>目录!


Do not include a file extension in the path.
路径中不要包含文件扩展名。


{{tip|Removing your text from the gameinfo.txt under the name '''title''' will remove the font title and will only provide the logo.}}
{{tip|删除'''gameinfo.txt'''文件中'''title'''参数对应的文字内容,可以隐藏文字标题而仅显示Logo。}}


{{tip|When [[Creating a Material|creating your logo]], use the [[UnlitGeneric]] shader, do not generate mipmaps, and disable LOD.}}
{{tip|{{L|创建材质|创建你的Logo}}时,请使用{{L|UnlitGeneric}}着色器,禁用mipmaps生成和LOD。}}


{{tip|If your game logo has an alpha channel (transparency) then add <code>"$alphatest" "1"</code> to your game logo's .vmt otherwise it'll look opaque in game.}}
{{tip|如果你的游戏Logo包含透明通道,请在.vmt文件中添加<code>"$alphatest" "1"</code>参数,否则游戏内会显示为不透明效果。}}
[[Category:Modding]]
{{ACategory|Modding}}
[[Category:Material System]]
{{ACategory|Material System}}

Latest revision as of 03:15, 24 April 2025

English (en)Français (fr)Polski (pl)Русский (ru)中文 (zh)Translate (Translate)
《军团要塞2》的Logo(此处显示原始版本)尺寸为512x128像素。

你可以使用Logo图片替代纯文字显示模组名称。具体步骤如下:

  1. gameinfo.txt(en)文件顶部添加gamelogo 1(与gametype等参数处于同一代码块)
  2. 使用以下模板创建文本文件<mod>\resource\GameLogo.res
Resource/GameLogo.res
{
	GameLogo
	{
		ControlName	EditablePanel
		fieldName	GameLogo
		xpos		0
		ypos		0
		zpos		50
		wide		400
		tall		100
		autoResize	1
		pinCorner	0
		visible		1
		enabled		1
		offsetX		-20
		offsetY		-15
	}

	Logo
	{
		ControlName	ImagePanel
		fieldName	Logo
		xpos		0
		ypos		0
		zpos		50
		wide		400
		tall		100
		visible		1
		enabled		1
		image		../logo/TF2_Logo
		scaleImage	1		
	}
}

image字段的路径是相对于materials\vgui\目录的。如上例所示,《军团要塞2》的Logo实际上存储在materials\logo\目录!

路径中不要包含文件扩展名。

Tip.png提示:删除gameinfo.txt文件中title参数对应的文字内容,可以隐藏文字标题而仅显示Logo。
Tip.png提示:创建你的Logo(en)时,请使用UnlitGeneric(en)着色器,禁用mipmaps生成和LOD。
Tip.png提示:如果你的游戏Logo包含透明通道,请在.vmt文件中添加"$alphatest" "1"参数,否则游戏内会显示为不透明效果。