Skip to content

Commit 1d66b10

Browse files
author
城西
committed
doc: SDK 文档更新
1 parent cc801d9 commit 1d66b10

File tree

119 files changed

+932
-32805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+932
-32805
lines changed

Doc/LuaViewSDK/Animate.lua

Lines changed: 0 additions & 129 deletions
This file was deleted.

Doc/LuaViewSDK/Animation.lua

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
--- 动画API
2+
-- @classmodAnimation Animation
3+
4+
5+
--- 通过这个方法 设置动画的时间,延时,最终状态,结束回调
6+
-- @tparam function animations 动画过程回调 --- 该参数是必填参数
7+
-- @usage --例子五
8+
-- 简单动画
9+
-- btn = Button();
10+
-- btn.size(60, 120)
11+
-- btn.text("按钮");
12+
-- btn.callback({
13+
-- onShow = function()
14+
-- print("show")
15+
-- end,
16+
-- onHide = function()
17+
-- print("hide")
18+
-- end
19+
-- })
20+
-- btn2 = Button();
21+
-- btn2.text("按钮2")
22+
-- btn2.size(60, 120)
23+
-- btn2.xy(100, 300)
24+
-- animator1 = Animation().alpha(0.1).duration(3);
25+
-- animator2 = Animation().translationX(100).duration(2).delay(1);
26+
-- animator3 = Animation().rotation().value(100).duration(2);
27+
-- btn.startAnimation(animator1, animator2, animator3)
28+
-- btn2.startAnimation(animator1, animator2, animator3)
29+
function Animation()
30+
end
31+
32+
33+
--- 克隆动画对象
34+
function clone()
35+
end
36+
37+
--- 动画绑定的View
38+
function with()
39+
end
40+
41+
--- 开始动画
42+
function start()
43+
end
44+
45+
--- 动画播放时间
46+
function duration()
47+
end
48+
49+
--- 动画延时
50+
function delay()
51+
end
52+
53+
--- 动画重复次数
54+
function repeatCount()
55+
end
56+
57+
--- 动画结束后是否回到初始状态
58+
function reverses()
59+
end
60+
61+
--- 设置动画回调
62+
-- @table table 启动回调
63+
-- @usage
64+
-- function bar.animateSixCenter( fx, fy, cx, cy , w0, w2, callback , time)
65+
-- local x,y = self.six.center();
66+
-- local scaleAni = Animation();
67+
-- scaleAni.scaleX((w2 - CATEGORY_BUTTON_DX/2)/Six_W);
68+
-- ani = Animation();
69+
-- if( callback ) then
70+
-- ani.callback( {
71+
-- onEnd = function ()
72+
-- callback();
73+
-- end,
74+
-- OnEnd = function ()
75+
-- callback();
76+
-- end
77+
-- } );
78+
-- end
79+
-- -- 如果已经是目的地时间变短
80+
-- if( time ) then
81+
-- ani.duration(time);
82+
-- scaleAni.duration(time);
83+
-- else
84+
-- ani.duration(0.25);
85+
-- scaleAni.duration(0.25);
86+
-- end
87+
-- ani.translationX( cx-x);
88+
-- self.six.startAnimation(ani, scaleAni);
89+
-- end
90+
function callback()
91+
end
92+
93+
--- 设置动画启动回调
94+
-- @function func 启动回调
95+
function onStart()
96+
end
97+
98+
--- 设置动画结束回调
99+
-- @function func 结束回调
100+
function onEnd()
101+
end
102+
103+
--- 设置动画被取消回调
104+
-- @function func 取消回调
105+
function onCancel()
106+
end
107+
108+
--- alpha值
109+
-- @number alpha 透明度
110+
function alpha()
111+
end
112+
113+
--- 动画旋转
114+
-- @number rotation 旋转角度(0~360)
115+
function rotation()
116+
end
117+
118+
--- scale设置()
119+
-- @number scaleX 缩放比例
120+
-- @number scaleY 缩放比例
121+
function scale()
122+
end
123+
124+
--- X轴缩放比例
125+
-- @number scaleX 缩放比例
126+
function scaleX()
127+
end
128+
129+
--- Y轴缩放比例
130+
-- @number scaleY 缩放比例
131+
function scaleY()
132+
end
133+
134+
--- 位移
135+
-- @number translationX x位移
136+
-- @number translationY y位移
137+
function translation()
138+
end
139+
140+
--- X坐标位移
141+
-- @number translationX x位移
142+
function translationX()
143+
end
144+
145+
--- Y坐标位移
146+
-- @number translationX x位移
147+
-- @number translationY y位移
148+
function translationY()
149+
end
150+
151+
-- --- 克隆动画对象
152+
-- function value()
153+
-- end
154+
155+
156+

Doc/LuaViewSDK/Button.lua

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,29 @@ function font ()
4242
end
4343

4444
--- 设置按钮字体大小
45-
-- @string fontName 可选参数
4645
-- @number fontSize
4746
-- @usage local btn = Button();
4847
function fontSize()
4948
end
5049

50+
--- 获取按钮字体大小
51+
-- @treturn number fontSize
52+
-- @usage local btn = Button();
53+
function fontSize()
54+
end
55+
5156
--- 设置按钮字体大小
52-
-- @string fontName 可选参数
5357
-- @number fontSize
5458
-- @usage local btn = Button();
5559
function textSize()
5660
end
5761

62+
--- 获取按钮字体大小
63+
-- @treturn number fontSize
64+
-- @usage local btn = Button();
65+
function textSize()
66+
end
67+
5868
--- 获取按钮title字体
5969
-- @treturn string fontName
6070
-- @treturn number fontSize

Doc/LuaViewSDK/Mtop.lua

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)