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
Line 1: Line 1:
{{subst:#if:|||{{LAuto/t}}
{{wip}}{{translating}}
 
--- DON'T JUST BLINDLY DELETE THIS PART. DO REPLACE THE LINKS AND CATEGORIES. THE PICTURE SHOWS HOW TO USE IT ! ---
 
SEARCH FOR:
\[\[(?!#|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:
{{subst:LAuto|$1$2}}
 
}}{{wip}}{{translating}}
{{LanguageBar|title = Adding your logo to the menu}}
{{LanguageBar|title = Adding your logo to the menu}}


Line 17: Line 7:
Instead of displaying your mod's name as a string of characters, you can have a logo image. To do this:
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.).
# Add <code>gamelogo 1</code> to the top of {{L|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:
# Create <code><mod>\resource\GameLogo.res</code>, a text file, with this template:


Line 63: Line 53:
{{tip|Removing your text from the gameinfo.txt under the name '''title''' will remove the font title and will only provide the logo.}}
{{tip|Removing your text from the gameinfo.txt under the name '''title''' will remove the font title and will only provide the logo.}}


{{tip|When [[Creating a Material|creating your logo]], use the [[UnlitGeneric]] shader, do not generate mipmaps, and disable LOD.}}
{{tip|When {{L|Creating a Material|creating your logo}}, use the {{L|UnlitGeneric}} shader, do not generate mipmaps, and disable 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|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.}}
[[Category:Modding]]
{{ACategory|Modding}}
[[Category:Material System]]
{{ACategory|Material System}}

Revision as of 03:13, 24 April 2025

Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.

Info content.png
This page is being translated.
You can help by finishing the translation.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)
English (en)Français (fr)Polski (pl)Русский (ru)中文 (zh)Translate (Translate)


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:

  1. Add gamelogo 1 to the top of gameinfo.txt(en) (same block as game, type, etc.).
  2. Create <mod>\resource\GameLogo.res, a text file, with this template:
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		
	}
}

The path of the image field is relative to materials\vgui\. As you can see in the example above, the TF2 logo is actually stored in materials\logo\!

Do not include a file extension in the path.

Tip.png提示:Removing your text from the gameinfo.txt under the name title will remove the font title and will only provide the logo.
Tip.png提示:When creating your logo(en), use the UnlitGeneric(en) shader, do not generate mipmaps, and disable LOD.
Tip.png提示:If your game logo has an alpha channel (transparency) then add "$alphatest" "1" to your game logo's .vmt otherwise it'll look opaque in game.