Adding Your Logo to the Menu: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(nuh-uh. That's confusing, but required.)
Line 37: Line 37:
visible 1
visible 1
enabled 1
enabled 1
image logo/TF2_Logo
image ../logo/TF2_Logo
scaleImage 1
scaleImage 1
}
}
}
}
</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>!
Do not include a file extension in the path.


{{tip|When [[Creating a Material|creating your logo]], use the [[UnlitGeneric]] shader, do not generate mipmaps, and disable LOD.}}
{{tip|When [[Creating a Material|creating your logo]], use the [[UnlitGeneric]] shader, do not generate mipmaps, and disable LOD.}}
{{note|The path of the <code>image</code> field is relative to <code>materials\vgui\</code>. Do not include a file extension.}}


[[Category:Modding]]
[[Category:Modding]]
[[Category:Material System]]
[[Category:Material System]]

Revision as of 08:08, 31 July 2009

TF2's logo 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 gameinfo.txt.
  2. Create \resource\GameLogo.res 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.pngTip:When creating your logo, use the UnlitGeneric shader, do not generate mipmaps, and disable LOD.