| <?xml version="1.0" encoding="UTF-8" ?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| --> |
| <library> |
| |
| <class name="meetingTimer" extends="labelExplorerBox" labelid="638" |
| docking="true" resizeable="false" closable="false" width="260" |
| x="$once{ canvas.width - this.width - 10 }" y="10" height="160"> |
| |
| <attribute name="roomobj" value="null" /> |
| <attribute name="refObj" value="null" /> |
| |
| <attribute name="demoTime" value="0" type="number" /> |
| |
| <handler name="oninit"> |
| this.dText = canvas.getLabelName(639); |
| this.demoTime = this.roomobj.demoTime; |
| this.fadeText(null); |
| </handler> |
| |
| <method name="fadeText" args="item"> |
| <![CDATA[ |
| if (this.demoTime > 0) { |
| var min = Math.floor(this.demoTime/60); |
| var restSeconds = this.demoTime - (min * 60); |
| if (restSeconds < 10) { |
| restSeconds = "0"+restSeconds; |
| } |
| var tString = this.dText + min + "min " + restSeconds + "sec"; |
| |
| this._text._text.setAttribute("text",tString); |
| this.demoTime--; |
| lz.Timer.addTimer( new LzDelegate( this, "fadeText" ), 1000 ); |
| } else { |
| if ($debug) Debug.write("DEMO IS OVER "); |
| canvas.sendViaLocalConnection(canvas.vid_lc_name, "immediateExitRoom", [true,null]); |
| } |
| ]]> |
| </method> |
| |
| <!-- |
| this.roomobj.demoTime |
| --> |
| |
| <view name="_text" x="2" width="$once{ parent.width -4 }" clip="true" |
| y="24" height="$once{ parent.height-25 }"> |
| <labelText name="_text" text="" |
| width="$once{ parent.width }" multiline="true" resize="false"/> |
| </view> |
| |
| </class> |
| |
| </library> |