From 2278178efcda84f2e9f9200595f46311fe7b3d55 Mon Sep 17 00:00:00 2001 From: Ravi Nanjundappa Date: Tue, 25 Oct 2016 19:56:32 +0530 Subject: [PATCH] DALi C# binding - Adding Animation constructor to accept duration in milli seconds Inserted the code for Animation constructor which accept integer value for duration in milli seconds. Now, _animation = new Animation(10000); will create Animation object with duration of 1000 ms (1s). We can still use _animation = new Animation(1.0f); to create the same. We can also use _animation.DurationMillSecs = 10000; // 10 ms Change-Id: Ie194280a9043f395d967f12b8835c66ae22c627f Signed-off-by: Ravi Nanjundappa --- plugins/dali-swig/SWIG/events/animation-event.i | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/dali-swig/SWIG/events/animation-event.i b/plugins/dali-swig/SWIG/events/animation-event.i index 4690317..0581d4e 100644 --- a/plugins/dali-swig/SWIG/events/animation-event.i +++ b/plugins/dali-swig/SWIG/events/animation-event.i @@ -185,6 +185,19 @@ using System.Runtime.InteropServices; } } + public int DurationMilliSecs + { + set + { + SetDuration(value/1000); + } + get + { + int ret = (int) GetDuration() * 1000; + return ret; + } + } + public AlphaFunction DefaultAlphaFunction { set -- 2.7.4