Shader_ShaderForge_NGUI_流光&波纹&消融
- Shader篇
总结:总算解决了NGUI中Shader不能实时更改的问题,原来NGUI中的Texture组件提供了OnRender代码示例如下
/***************************************
Editor: Tason
Version: v1.0
Last Edit Date: 2018-XX-XX
Tel: 328791554@qq.com
Function Doc: ***************************************/ using UnityEngine; public class Test : MonoBehaviour
{
//控制的NGUI组件
public UITexture m_texture;
//需要替换的图片
public Texture m_tex;
//增亮的叠加颜色
public Color m_backGroundColor;
//条纹色
public Color m_noiseColor;
//使用bool量控制 不然性能消耗大
public bool m_change = false;
public void Awake()
{
m_texture.onRender += UpdateMaterial;
} //调用方法
public void OnButtonDown()
{
m_change = true;
} private void UpdateMaterial(Material _m)
{
if (m_change)
{
//m_change = !m_change;
_m.SetTexture("__MainTex", m_tex);
_m.SetColor("_AddColor", m_backGroundColor);
_m.SetColor("Color0", m_noiseColor);
}
}
}
下面总结一下项目中用到的shader部分
流光
资源包链接(鬼知道什么时候失效):链接:https://pan.baidu.com/s/1OU8pQ5myeuXptInuxlTl7A 密码:dt8h
ShaderForge算法图:
参数简要:
Shader代码:
// Shader created with Shader Forge v1.26
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.26;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:3,bdst:7,dpts:2,wrdp:False,dith:0,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False;n:type:ShaderForge.SFN_Final,id:6456,x:33044,y:33111,varname:node_6456,prsc:2|custl-6788-OUT,alpha-3885-A;n:type:ShaderForge.SFN_Tex2d,id:3885,x:32431,y:33336,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:node_3885,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Distance,id:2099,x:31037,y:33156,varname:node_2099,prsc:2|A-4069-OUT,B-8416-OUT;n:type:ShaderForge.SFN_Vector1,id:8416,x:30856,y:33354,varname:node_8416,prsc:2,v1:0.5;n:type:ShaderForge.SFN_OneMinus,id:2559,x:31237,y:33156,varname:node_2559,prsc:2|IN-2099-OUT;n:type:ShaderForge.SFN_Add,id:1289,x:31459,y:33156,varname:node_1289,prsc:2|A-2559-OUT,B-9541-OUT;n:type:ShaderForge.SFN_Slider,id:9541,x:31080,y:33386,ptovrint:False,ptlb:Sub,ptin:_Sub,varname:node_9541,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:-1,cur:-0.154,max:0;n:type:ShaderForge.SFN_Power,id:7763,x:31875,y:33136,varname:node_7763,prsc:2|VAL-5442-OUT,EXP-2491-OUT;n:type:ShaderForge.SFN_Slider,id:2491,x:31492,y:33391,ptovrint:False,ptlb:PowerValue,ptin:_PowerValue,varname:node_2491,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:5.793525,max:10;n:type:ShaderForge.SFN_Clamp01,id:5442,x:31649,y:33156,varname:node_5442,prsc:2|IN-1289-OUT;n:type:ShaderForge.SFN_Add,id:6788,x:32674,y:33205,varname:node_6788,prsc:2|A-3594-OUT,B-3885-RGB;n:type:ShaderForge.SFN_Rotator,id:1622,x:30507,y:33169,varname:node_1622,prsc:2|UVIN-2342-OUT,ANG-150-OUT;n:type:ShaderForge.SFN_ComponentMask,id:4069,x:30734,y:33146,varname:node_4069,prsc:2,cc1:0,cc2:-1,cc3:-1,cc4:-1|IN-1622-UVOUT;n:type:ShaderForge.SFN_Slider,id:150,x:30159,y:33377,ptovrint:False,ptlb:Angle,ptin:_Angle,varname:node_150,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.4102564,max:1;n:type:ShaderForge.SFN_Add,id:2342,x:30238,y:33154,varname:node_2342,prsc:2|A-5168-OUT,B-5842-UVOUT;n:type:ShaderForge.SFN_Color,id:4851,x:32055,y:32879,ptovrint:False,ptlb:MainColor,ptin:_MainColor,varname:node_4851,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_Multiply,id:3594,x:32441,y:33115,varname:node_3594,prsc:2|A-4851-RGB,B-7763-OUT,C-7314-OUT;n:type:ShaderForge.SFN_Time,id:7538,x:31571,y:33735,varname:node_7538,prsc:2;n:type:ShaderForge.SFN_Slider,id:7820,x:31477,y:33631,ptovrint:False,ptlb:Speed,ptin:_Speed,varname:node_7820,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.5,max:2;n:type:ShaderForge.SFN_Multiply,id:8576,x:31865,y:33704,varname:node_8576,prsc:2|A-7820-OUT,B-7538-T;n:type:ShaderForge.SFN_Frac,id:6961,x:32065,y:33704,varname:node_6961,prsc:2|IN-8576-OUT;n:type:ShaderForge.SFN_Subtract,id:5168,x:29948,y:32892,varname:node_5168,prsc:2|A-9989-OUT,B-2123-OUT;n:type:ShaderForge.SFN_Vector1,id:2123,x:29777,y:33056,varname:node_2123,prsc:2,v1:0.5;n:type:ShaderForge.SFN_Multiply,id:9989,x:29771,y:32753,varname:node_9989,prsc:2|A-3231-OUT,B-7454-OUT;n:type:ShaderForge.SFN_TexCoord,id:5842,x:29899,y:33158,varname:node_5842,prsc:2,uv:0;n:type:ShaderForge.SFN_Set,id:6403,x:32251,y:33704,varname:Timer,prsc:2|IN-6961-OUT;n:type:ShaderForge.SFN_Get,id:7454,x:29538,y:32823,varname:node_7454,prsc:2|IN-6403-OUT;n:type:ShaderForge.SFN_ValueProperty,id:7314,x:32145,y:33194,ptovrint:False,ptlb:AddPower,ptin:_AddPower,varname:node_7314,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:2;n:type:ShaderForge.SFN_ValueProperty,id:3231,x:29538,y:32689,ptovrint:False,ptlb:Pinlv,ptin:_Pinlv,varname:node_3231,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:3;proporder:3885-9541-2491-150-4851-7820-7314-3231;pass:END;sub:END;*/ Shader "Custom/JW_ShaoGuang1" {
Properties {
_MainTex ("MainTex", 2D) = "white" {}
_Sub ("Sub", Range(-, )) = -0.154
_PowerValue ("PowerValue", Range(, )) = 5.793525
_Angle ("Angle", Range(, )) = 0.4102564
_MainColor ("MainColor", Color) = (,,,)
_Speed ("Speed", Range(, )) = 0.5
_AddPower ("AddPower", Float ) =
_Pinlv ("Pinlv", Float ) =
[HideInInspector]_Cutoff ("Alpha cutoff", Range(,)) = 0.5
}
SubShader {
Tags {
"IgnoreProjector"="True"
"Queue"="Transparent"
"RenderType"="Transparent"
}
LOD
Pass {
Name "FORWARD"
Tags {
"LightMode"="ForwardBase"
}
Blend SrcAlpha OneMinusSrcAlpha
ZWrite Off CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define UNITY_PASS_FORWARDBASE
#include "UnityCG.cginc"
#pragma multi_compile_fwdbase
#pragma multi_compile_fog
#pragma exclude_renderers gles3 metal d3d11_9x xbox360 xboxone ps3 ps4 psp2
#pragma target 3.0
uniform float4 _TimeEditor;
uniform sampler2D _MainTex; uniform float4 _MainTex_ST;
uniform float _Sub;
uniform float _PowerValue;
uniform float _Angle;
uniform float4 _MainColor;
uniform float _Speed;
uniform float _AddPower;
uniform float _Pinlv;
struct VertexInput {
float4 vertex : POSITION;
float2 texcoord0 : TEXCOORD0;
};
struct VertexOutput {
float4 pos : SV_POSITION;
float2 uv0 : TEXCOORD0;
UNITY_FOG_COORDS()
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput);
o.uv0 = v.texcoord0;
o.pos = mul(UNITY_MATRIX_MVP, v.vertex );
UNITY_TRANSFER_FOG(o,o.pos);
return o;
}
float4 frag(VertexOutput i) : COLOR {
////// Lighting:
float node_1622_ang = _Angle;
float node_1622_spd = 1.0;
float node_1622_cos = cos(node_1622_spd*node_1622_ang);
float node_1622_sin = sin(node_1622_spd*node_1622_ang);
float2 node_1622_piv = float2(0.5,0.5);
float4 node_7538 = _Time + _TimeEditor;
float Timer = frac((_Speed*node_7538.g));
float2 node_1622 = (mul((((_Pinlv*Timer)-0.5)+i.uv0)-node_1622_piv,float2x2( node_1622_cos, -node_1622_sin, node_1622_sin, node_1622_cos))+node_1622_piv);
float4 _MainTex_var = tex2D(_MainTex,TRANSFORM_TEX(i.uv0, _MainTex));
float3 finalColor = ((_MainColor.rgb*pow(saturate(((1.0 - distance(node_1622.r,0.5))+_Sub)),_PowerValue)*_AddPower)+_MainTex_var.rgb);
fixed4 finalRGBA = fixed4(finalColor,_MainTex_var.a);
UNITY_APPLY_FOG(i.fogCoord, finalRGBA);
return finalRGBA;
}
ENDCG
}
}
FallBack "Diffuse"
CustomEditor "ShaderForgeMaterialInspector"
}
案例2:
Shader图:
Shader代码:
不给!(和上面差不多的)
资源链接:
链接:https://pan.baidu.com/s/1aL9rrLI4GL7g0NchOEIhMw 密码:8af2
波纹
效果图:
Shader图:
Shader代码:
// Shader created with Shader Forge v1.26
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.26;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:3,bdst:7,dpts:2,wrdp:False,dith:0,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False;n:type:ShaderForge.SFN_Final,id:7659,x:32935,y:32815,varname:node_7659,prsc:2|custl-8121-OUT,alpha-3255-A;n:type:ShaderForge.SFN_Tex2d,id:163,x:32068,y:32843,ptovrint:False,ptlb:_MainTex,ptin:__MainTex,varname:node_163,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:c6facb50442a7c04f9b5ba8095afcb59,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:1611,x:32129,y:33105,ptovrint:False,ptlb:MaskTex,ptin:_MaskTex,varname:node_1611,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:8c8f3f69aa942e44baa4fadb4b8fdd31,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Add,id:8121,x:32592,y:32846,varname:node_8121,prsc:2|A-163-RGB,B-6403-OUT,C-4092-OUT,D-5441-OUT;n:type:ShaderForge.SFN_Color,id:9959,x:32129,y:33323,ptovrint:False,ptlb:AddColor,ptin:_AddColor,varname:node_9959,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0,c2:0,c3:0,c4:1;n:type:ShaderForge.SFN_Multiply,id:6403,x:32391,y:33162,varname:node_6403,prsc:2|A-1611-A,B-9959-RGB;n:type:ShaderForge.SFN_Tex2d,id:6092,x:32058,y:33579,ptovrint:False,ptlb:Ripple0,ptin:_Ripple0,varname:node_6092,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:02452105858c44340b87d2502a825cd3,ntxv:0,isnm:False|UVIN-2818-OUT;n:type:ShaderForge.SFN_Multiply,id:4092,x:32445,y:33548,varname:node_4092,prsc:2|A-6092-R,B-6593-RGB,C-1611-A;n:type:ShaderForge.SFN_Color,id:6593,x:32148,y:33784,ptovrint:False,ptlb:Color0,ptin:_Color0,varname:node_6593,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.8381984,c2:0.2762219,c3:0.9632353,c4:1;n:type:ShaderForge.SFN_Time,id:8528,x:30838,y:33298,varname:node_8528,prsc:2;n:type:ShaderForge.SFN_Slider,id:7763,x:30733,y:33491,ptovrint:False,ptlb:Speed,ptin:_Speed,varname:node_7763,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:-3,cur:3,max:3;n:type:ShaderForge.SFN_Multiply,id:824,x:31071,y:33402,varname:node_824,prsc:2|A-8528-TSL,B-7763-OUT;n:type:ShaderForge.SFN_TexCoord,id:2477,x:30676,y:33585,varname:node_2477,prsc:2,uv:0;n:type:ShaderForge.SFN_Add,id:6891,x:31292,y:33583,varname:node_6891,prsc:2|A-2477-U,B-824-OUT;n:type:ShaderForge.SFN_Append,id:2818,x:31801,y:33578,varname:node_2818,prsc:2|A-6891-OUT,B-2477-V;n:type:ShaderForge.SFN_Tex2d,id:3255,x:32645,y:33031,ptovrint:False,ptlb:Alpha,ptin:_Alpha,varname:node_3255,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:c6facb50442a7c04f9b5ba8095afcb59,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:9275,x:31808,y:34002,ptovrint:False,ptlb:Ripple1,ptin:_Ripple1,varname:_Ripple1,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:02a272d8b6f1de94d9d5ca824188070c,ntxv:0,isnm:False|UVIN-9013-OUT;n:type:ShaderForge.SFN_Slider,id:2172,x:30604,y:34362,ptovrint:False,ptlb:Speed2,ptin:_Speed2,varname:_Speed_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:-3,cur:-3,max:3;n:type:ShaderForge.SFN_Multiply,id:547,x:30942,y:34176,varname:node_547,prsc:2|A-8388-TSL,B-2172-OUT;n:type:ShaderForge.SFN_TexCoord,id:4734,x:30959,y:33977,varname:node_4734,prsc:2,uv:0;n:type:ShaderForge.SFN_Add,id:4775,x:31141,y:34184,varname:node_4775,prsc:2|A-4734-V,B-547-OUT;n:type:ShaderForge.SFN_Append,id:9013,x:31551,y:34001,varname:node_9013,prsc:2|A-4734-U,B-4775-OUT;n:type:ShaderForge.SFN_Time,id:8388,x:30709,y:34169,varname:node_8388,prsc:2;n:type:ShaderForge.SFN_Multiply,id:5441,x:32372,y:34000,varname:node_5441,prsc:2|A-9275-R,B-6593-RGB,C-1611-A;proporder:163-1611-9959-6092-6593-7763-3255-9275-2172;pass:END;sub:END;*/ Shader "Custom/JW_UV0" {
Properties {
__MainTex ("_MainTex", 2D) = "white" {}
_MaskTex ("MaskTex", 2D) = "white" {}
_AddColor ("AddColor", Color) = (,,,)
_Ripple0 ("Ripple0", 2D) = "white" {}
_Color0 ("Color0", Color) = (0.8381984,0.2762219,0.9632353,)
_Speed ("Speed", Range(-, )) =
_Alpha ("Alpha", 2D) = "white" {}
_Ripple1 ("Ripple1", 2D) = "white" {}
_Speed2 ("Speed2", Range(-, )) = -
[HideInInspector]_Cutoff ("Alpha cutoff", Range(,)) = 0.5
}
SubShader {
Tags {
"IgnoreProjector"="True"
"Queue"="Transparent"
"RenderType"="Transparent"
}
LOD
Pass {
Name "FORWARD"
Tags {
"LightMode"="ForwardBase"
}
Blend SrcAlpha OneMinusSrcAlpha
ZWrite Off CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define UNITY_PASS_FORWARDBASE
#include "UnityCG.cginc"
#pragma multi_compile_fwdbase
#pragma multi_compile_fog
#pragma exclude_renderers gles3 metal d3d11_9x xbox360 xboxone ps3 ps4 psp2
#pragma target 3.0
uniform float4 _TimeEditor;
uniform sampler2D __MainTex; uniform float4 __MainTex_ST;
uniform sampler2D _MaskTex; uniform float4 _MaskTex_ST;
uniform float4 _AddColor;
uniform sampler2D _Ripple0; uniform float4 _Ripple0_ST;
uniform float4 _Color0;
uniform float _Speed;
uniform sampler2D _Alpha; uniform float4 _Alpha_ST;
uniform sampler2D _Ripple1; uniform float4 _Ripple1_ST;
uniform float _Speed2;
struct VertexInput {
float4 vertex : POSITION;
float2 texcoord0 : TEXCOORD0;
};
struct VertexOutput {
float4 pos : SV_POSITION;
float2 uv0 : TEXCOORD0;
UNITY_FOG_COORDS()
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput);
o.uv0 = v.texcoord0;
o.pos = mul(UNITY_MATRIX_MVP, v.vertex );
UNITY_TRANSFER_FOG(o,o.pos);
return o;
}
float4 frag(VertexOutput i) : COLOR {
////// Lighting:
float4 __MainTex_var = tex2D(__MainTex,TRANSFORM_TEX(i.uv0, __MainTex));
float4 _MaskTex_var = tex2D(_MaskTex,TRANSFORM_TEX(i.uv0, _MaskTex));
float4 node_8528 = _Time + _TimeEditor;
float2 node_2818 = float2((i.uv0.r+(node_8528.r*_Speed)),i.uv0.g);
float4 _Ripple0_var = tex2D(_Ripple0,TRANSFORM_TEX(node_2818, _Ripple0));
float4 node_8388 = _Time + _TimeEditor;
float2 node_9013 = float2(i.uv0.r,(i.uv0.g+(node_8388.r*_Speed2)));
float4 _Ripple1_var = tex2D(_Ripple1,TRANSFORM_TEX(node_9013, _Ripple1));
float3 finalColor = (__MainTex_var.rgb+(_MaskTex_var.a*_AddColor.rgb)+(_Ripple0_var.r*_Color0.rgb*_MaskTex_var.a)+(_Ripple1_var.r*_Color0.rgb*_MaskTex_var.a));
float4 _Alpha_var = tex2D(_Alpha,TRANSFORM_TEX(i.uv0, _Alpha));
fixed4 finalRGBA = fixed4(finalColor,_Alpha_var.a);
UNITY_APPLY_FOG(i.fogCoord, finalRGBA);
return finalRGBA;
}
ENDCG
}
}
FallBack "Diffuse"
CustomEditor "ShaderForgeMaterialInspector"
}
资源链接:
链接:https://pan.baidu.com/s/1tMaRiKHymh4KG3lkCvkPRg 密码:7f64
消融
效果图:
原理图:
资源链接:
链接:https://pan.baidu.com/s/1oqyigNzobb0tElIZu-4HEA 密码:lmlc
Shader_ShaderForge_NGUI_流光&波纹&消融的更多相关文章
- jquery ripples水波纹效果( 涟漪效果)
这个效果是我从bootstrap-material-design上面分离下来的,bootstrap-material-design的一些组件样式我不太不喜欢,但是非常喜欢这个水波纹效果,所以就有了这篇 ...
- button按钮波纹,箭头特效css
波纹特效: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <tit ...
- Shader实例:2D流光
准备: 1.一张背景图 2.一张流光图 3.一张过滤图 like this: 效果: 代码: Shader "Custom/2d_flow" { Properties { _Mai ...
- 如何使用 HTML5 Canvas 制作水波纹效果
今天,我们继续分享 JavaScript 实现的效果例子,这篇文章会介绍使用 JavaScript 实现水波纹效果.水波效果以图片为背景,点击图片任意位置都会触发.有时候,我们使用普通的 Javasc ...
- 兼容Android的水波纹效果
Android的水波纹效果只有高版本才有,我们希望自己的应用在低版本用低版本的阴影,高版本用水波纹,这怎么做呢?其实,只要分drawable和drawablev21两个文件夹就好了. 普通情况下的se ...
- android自定义控件(4)-自定义水波纹效果
一.实现单击出现水波纹单圈效果: 照例来说,还是一个自定义控件,观察这个效果,发现应该需要重写onTouchEvent和onDraw方法,通过在onTouchEvent中获取触摸的坐标,然后以这个坐标 ...
- Android Material适配 为控件设置指定背景色和点击波纹效果
Android Material适配 为控件设置指定背景色和点击波纹效果,有需要的朋友可以参考下. 大部分时候,我们都需要为控件设置指定背景色和点击效果 4.x以下可以使用selector,5.0以上 ...
- android 5.0 水波纹 实现
1. 定义一个普通圆角背景的xml; rounded_corners.xml <?xml version="1.0" encoding="utf-8"?& ...
- VC_MFC水波纹控件,开源
代码和效果图: https://github.com/wjx0912/MfcWaterEffect 集成以下5个文件即可: watereffect\DIB.hwatereffect\DIB.cppwa ...
随机推荐
- odoo 数据库到期提醒
- JavaSE基础知识(5)—面向对象(5.7 final关键字)
一.说明 final属于一种修饰符,可以用于修饰类和属性.方法.局部变量 二.特点 1.修饰类 该类不能被继承,如String.Integer等 2.修饰方法 该方法不能被重写 3.修饰变量(属性和局 ...
- 如何让 curl 命令通过代理访问
如何让 curl 命令通过代理访问 Linux.中国 - 开源中文社区 2018-01-18 8909 阅读 技术 我的系统管理员给我提供了如下代理信息: IP: 202.54.1.1 Port: 3 ...
- 关于PHP架构师进阶的一些思考
相信大家都有感觉,就是当程序员写业务写了几年后,就会有想进阶的想法,技术方面当然就是架构师了,然后具体从哪些方面丰富自己才能个达到目的呢?大部分人可能会很迷茫,当然也包括我, 最近和很多大牛交流了一些 ...
- win7系统 LR11 安装与破解
注意一定要以管理员身份运行启动LR程序 Loadrunner11 安装: 1.运行“setup.exe” 2. 点击安装,其中会有提示缺少“Microsoft Visual C++ 2005 SP1等 ...
- 从 Basic Paxos 到 Multi Paxos 到 Raft
在朴素Paxos算法中, 各个节点经过 Prepare 和 Accept 阶段, 会达成一个值, 这个值一旦达成, 就不能被修改, 如下例子: 图示1 上面的操作几乎没有任何实用价值, 于是演变成下面 ...
- MySQL学习入门安装和启动及常见问题解决方法(一)
1.下载MySQL 官网地址:https://www.mysql.com/downloads/ 2.个人学习使用,只有下面这个是免费的 3.下载之后解压到目录中,并加入环境变量,如下 创建MYSQL_ ...
- JavaScript基础函数---李老师的
<!DOCTYPE html><html><head> <title>demo2html</title> <meta ch ...
- AX_SysTableBrowser
sysTableBrowser sysTableBrowser = new sysTableBrowser(); ; sysTableBrowser.setAllowEdit(true); sy ...
- Windows上Kafka运行环境安装
1. 安装JDK 1.1 安装文件:http://www.oracle.com/technetwork/java/javase/downloads/index.html 下载JDK1.2 安装完成后需 ...