File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 101
101
-- end --
102
102
103
103
function UILoadingBar :setPercent (percent )
104
+ self .percent_ = percent
104
105
local rect = cc .rect (self .viewRect_ .x , self .viewRect_ .y ,
105
106
self .viewRect_ .width , self .viewRect_ .height )
106
- local newWidth = rect .width * percent / 100
107
+ local newWidth = rect .width * self . percent_ / 100
107
108
108
109
rect .x = 0
109
110
rect .y = 0
128
129
129
130
-- start --
130
131
132
+ ---- ----------------------------
133
+ -- 得到进度控件的进度
134
+ -- @function [parent=#UILoadingBar] getPercent
135
+ -- @return number 进度值
136
+
137
+ -- end --
138
+
139
+ function UILoadingBar :getPercent ()
140
+ return self .percent_
141
+ end
142
+
143
+ -- start --
144
+
131
145
---- ----------------------------
132
146
-- 设置进度控件的方向
133
147
-- @function [parent=#UILoadingBar] setDirction
You can’t perform that action at this time.
0 commit comments