Skip to content

Commit

Permalink
Merge pull request #2314 from brean/june18_dev
Browse files Browse the repository at this point in the history
Better example for custom Icons for AppBar
  • Loading branch information
David Kline authored Jun 26, 2018
2 parents 08addb6 + c92d1b8 commit 79d2666
Show file tree
Hide file tree
Showing 16 changed files with 550 additions and 9 deletions.
9 changes: 6 additions & 3 deletions Assets/HoloToolkit/UX/Materials/ButtonIconMaterial.mat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Material:
m_Name: ButtonIconMaterial
m_Shader: {fileID: 4800000, guid: d45c0efca53019e43891b0f610f8146e, type: 3}
m_ShaderKeywords: _ALPHATEST_ON _BORDER_LIGHT_USES_HOVER_COLOR _DIRECTIONAL_LIGHT
_SPECULAR_HIGHLIGHTS _USECOLOR_ON _USEMAINTEX_ON
_EMISSION _SPECULAR_HIGHLIGHTS _USECOLOR_ON _USEMAINTEX_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
Expand Down Expand Up @@ -81,7 +81,8 @@ Material:
- _DirectionalLight: 1
- _DstBlend: 0
- _EdgeSmoothingValue: 0.002
- _EnableEmission: 0
- _EnableEmission: 1
- _EnableHoverColorOpaqueOverride: 0
- _EnableHoverColorOverride: 0
- _EnableNormalMap: 0
- _EnvironmentColorIntensity: 0.5
Expand All @@ -93,6 +94,7 @@ Material:
- _Glossiness: 0.5
- _GlossyReflections: 1
- _HoverLight: 0
- _HoverLightOpaque: 0
- _InnerGlow: 0
- _Metallic: 0
- _Mode: 1
Expand Down Expand Up @@ -122,10 +124,11 @@ Material:
- _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissiveColor: {r: 1, g: 1, b: 1, a: 1}
- _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1}
- _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1}
- _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1}
- _HoverColorOpaqueOverride: {r: 1, g: 1, b: 1, a: 1}
- _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1}
- _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75}
- _RimColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ MeshRenderer:
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_Materials:
- {fileID: 0}
m_StaticBatchInfo:
Expand Down Expand Up @@ -217,6 +218,7 @@ MeshRenderer:
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_Materials:
- {fileID: 2100000, guid: 1017ef825d041c749bab30bf03aca0d3, type: 2}
m_StaticBatchInfo:
Expand Down Expand Up @@ -251,6 +253,7 @@ MeshRenderer:
m_MotionVectors: 2
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RenderingLayerMask: 4294967295
m_Materials:
- {fileID: 2100000, guid: 1c018e76b2657e041976bfa8486880aa, type: 2}
m_StaticBatchInfo:
Expand Down Expand Up @@ -285,6 +288,7 @@ MeshRenderer:
m_MotionVectors: 2
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RenderingLayerMask: 4294967295
m_Materials:
- {fileID: 2100000, guid: df4abdb025f6c11489a7f77f9fba8659, type: 2}
m_StaticBatchInfo:
Expand Down Expand Up @@ -398,6 +402,7 @@ MonoBehaviour:
DisableIcon: 0
OverrideIcon: 0
iconName: ObjectCollectionScatter
PrefabFromProfile: 0
iconOverride: {fileID: 0}
alpha: 1
--- !u!114 &114549673379926378
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 235c7917337f78f4b853694125a79865, type: 3}
m_Name: DefaultButtonIconProfileTexture
m_EditorClassIdentifier: Assembly-CSharp:HUX.Buttons:ButtonIconProfileTexture
_IconNotFound_: {fileID: 2800000, guid: 2adc8135dd936004db37d5cead85f951, type: 3}
_IconNotFound: {fileID: 0}
AlphaTransitionSpeed: 0.25
IconMaterial: {fileID: 2100000, guid: 4f37668d794e3694c9ee36b62447d99b, type: 2}
IconMesh: {fileID: 4300010, guid: c68a88ae5c5b91f41b94c83aa4c4196e, type: 3}
Expand Down Expand Up @@ -56,3 +56,8 @@ MonoBehaviour:
- {fileID: 2800000, guid: fa5e3c121495d23458245aacbc4cc29b, type: 3}
- {fileID: 2800000, guid: e2d1418e284d6a84791331a768e88c69, type: 3}
- {fileID: 2800000, guid: 517a5268112b8854e8d807547081e670, type: 3}
- {fileID: 2800000, guid: fdac2bce952169d46986bf702e00f2e6, type: 3}
- {fileID: 2800000, guid: 5cf198fae044fae47bde3da22d5de95a, type: 3}
- {fileID: 2800000, guid: 8867ef317bf86c142897904dbb7a1ac6, type: 3}
- {fileID: 2800000, guid: 1756676fd64b61e4a914ffa70233b9a6, type: 3}
- {fileID: 2800000, guid: 7029cbbbce5f0ac4dbc4e93267bfddf4, type: 3}
10 changes: 5 additions & 5 deletions Assets/HoloToolkit/UX/Scripts/AppBar/AppBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ private static ButtonTemplate GetDefaultButtonTemplateFromType(ButtonTypeEnum ty
return new ButtonTemplate(
ButtonTypeEnum.Adjust,
"Adjust",
"ObjectCollectionScatter", // Replace with your custom icon texture name in HolographicButton prefab
"AppBarAdjust",
"Adjust",
adjustPosition, // Always next-to-last to appear
0);
Expand All @@ -496,7 +496,7 @@ private static ButtonTemplate GetDefaultButtonTemplateFromType(ButtonTypeEnum ty
return new ButtonTemplate(
ButtonTypeEnum.Done,
"Done",
"ObjectCollectionScatter", // Replace with your custom icon texture name in HolographicButton prefab
"AppBarDone",
"Done",
0,
0);
Expand All @@ -505,7 +505,7 @@ private static ButtonTemplate GetDefaultButtonTemplateFromType(ButtonTypeEnum ty
return new ButtonTemplate(
ButtonTypeEnum.Hide,
"Hide",
"ObjectCollectionScatter", // Replace with your custom icon texture name in HolographicButton prefab
"AppBarHide",
"Hide Menu",
0, // Always the first to appear
0);
Expand All @@ -525,7 +525,7 @@ private static ButtonTemplate GetDefaultButtonTemplateFromType(ButtonTypeEnum ty
return new ButtonTemplate(
ButtonTypeEnum.Remove,
"Remove",
"ObjectCollectionScatter", // Replace with your custom icon texture name in HolographicButton prefab
"KeyboardKeyGlyphs_Close",
"Remove",
removePosition, // Always the last to appear
1);
Expand All @@ -534,7 +534,7 @@ private static ButtonTemplate GetDefaultButtonTemplateFromType(ButtonTypeEnum ty
return new ButtonTemplate(
ButtonTypeEnum.Show,
"Show",
"ObjectCollectionScatter", // Replace with your custom icon texture name in HolographicButton prefab
"AppBarShow",
"Show Menu",
0,
0);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 94 additions & 0 deletions Assets/HoloToolkit/UX/Textures/Icons/AppBarAdjust.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 94 additions & 0 deletions Assets/HoloToolkit/UX/Textures/Icons/AppBarDone.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 79d2666

Please sign in to comment.