public void RemoveButtonEventHandler(int instId, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null) { if (instId < 0 || instId >= m_instances.Length) { return; } ButtonEventHandlers handlers = m_buttonEventHandlers[instId]; if (handlers == null) { return; } handlers.Remove(load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); Button button = SearchButtonInstanceByInstanceId(instId); if (button != null) { button.SetHandlers(handlers); } }
public void RemoveButtonEventHandler(string instanceName, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null) { int instId = SearchInstanceId(GetStringId(instanceName)); if (instId >= 0) { RemoveButtonEventHandler(instId, load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); return; } if (m_buttonEventHandlersByFullName == null) { return; } ButtonEventHandlers handlers = m_buttonEventHandlersByFullName[instanceName]; if (handlers == null) { return; } handlers.Remove(load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); }
public void ClearButtonEventHandler( string instanceName, ButtonEventHandlers.Type type) { int instId = SearchInstanceId(GetStringId(instanceName)); if (instId >= 0) { ClearButtonEventHandler(instId, type); return; } if (m_buttonEventHandlersByFullName == null) { return; } ButtonEventHandlers handlers = m_buttonEventHandlersByFullName[instanceName]; if (handlers == null) { return; } handlers.Clear(type); }
public void SetButtonEventHandler(int instId, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null) { if (instId < 0 || instId >= m_instances.Length) { return; } ButtonEventHandlers handlers; if (load != null || unload != null || enterFrame != null || update != null || render != null || rollOver != null || rollOut != null || press != null || release != null || keyPress != null) { handlers = new ButtonEventHandlers(load, unload, enterFrame, update, render, rollOver, rollOut, press, release, keyPress); } else { handlers = null; } m_buttonEventHandlers[instId] = handlers; }
public int AddButtonEventHandler(int instId, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null) { interactive = true; if (instId < 0 || instId >= m_instances.Length) { return(-1); } ButtonEventHandlers handlers = m_buttonEventHandlers[instId]; if (handlers == null) { handlers = new ButtonEventHandlers(); m_buttonEventHandlers[instId] = handlers; } handlers.Add(load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); Button button = SearchButtonInstanceByInstanceId(instId); if (button != null) { button.SetHandlers(handlers); } return(++m_eventOffset); }
public Button(LWF lwf, Movie parent, int objId, int instId, int matrixId = -1, int colorTransformId = -1) : base(lwf, parent, Format.Object.Type.BUTTON, objId, instId) { m_matrixId = matrixId; m_colorTransformId = colorTransformId; m_invert = new Matrix(); m_hitX = Int32.MinValue; m_hitY = Int32.MinValue; if (objId >= 0) { m_data = lwf.data.buttons[objId]; m_dataMatrixId = m_data.matrixId; } ButtonEventHandlers handler = lwf.GetButtonEventHandlers(this); if (handler != null) { m_handler = new ButtonEventHandlers(); m_handler.Add(handler); m_handler.Call(EventType.LOAD, this); } }
public void SetHandlers(ButtonEventHandlers handler) { if (m_handler == null) m_handler = new ButtonEventHandlers(); else m_handler.Clear(); m_handler.Add(handler); }
public void SetHandlers(ButtonEventHandlers handler) { if (m_handler != null) { m_handler.Add(handler); } else { m_handler = handler; } }
public void SetHandlers(ButtonEventHandlers handler) { if (m_handler == null) { m_handler = new ButtonEventHandlers(); } else { m_handler.Clear(); } m_handler.Add(handler); }
public int AddButtonEventHandler(string instanceName, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null) { interactive = true; int instId = SearchInstanceId(GetStringId(instanceName)); if (instId >= 0) { return(AddButtonEventHandler(instId, load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress)); } if (!instanceName.Contains(".")) { return(-1); } if (m_buttonEventHandlersByFullName == null) { m_buttonEventHandlersByFullName = new ButtonEventHandlersDictionary(); } ButtonEventHandlers handlers; if (!m_buttonEventHandlersByFullName.TryGetValue( instanceName, out handlers)) { handlers = new ButtonEventHandlers(); m_buttonEventHandlersByFullName[instanceName] = handlers; } int id = GetEventOffset(); handlers.Add(id, load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); Button button = SearchButtonInstance(instanceName); if (button != null) { button.SetHandlers(handlers); } return(id); }
public void Add(ButtonEventHandlers handlers) { if (handlers == null) { return; } foreach (var h in handlers.load) { load.Add(h.Key, h.Value); } foreach (var h in handlers.unload) { unload.Add(h.Key, h.Value); } foreach (var h in handlers.enterFrame) { enterFrame.Add(h.Key, h.Value); } foreach (var h in handlers.update) { update.Add(h.Key, h.Value); } foreach (var h in handlers.render) { render.Add(h.Key, h.Value); } foreach (var h in handlers.press) { press.Add(h.Key, h.Value); } foreach (var h in handlers.release) { release.Add(h.Key, h.Value); } foreach (var h in handlers.rollOver) { rollOver.Add(h.Key, h.Value); } foreach (var h in handlers.rollOut) { rollOut.Add(h.Key, h.Value); } foreach (var h in handlers.keyPress) { keyPress.Add(h.Key, h.Value); } }
public void AddButtonEventHandler(string instanceName, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null) { int instId = SearchInstanceId(GetStringId(instanceName)); if (instId >= 0) { AddButtonEventHandler(instId, load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); return; } if (!instanceName.Contains(".")) { return; } if (m_buttonEventHandlersByFullName == null) { m_buttonEventHandlersByFullName = new ButtonEventHandlersDictionary(); } ButtonEventHandlers handlers = m_buttonEventHandlersByFullName[instanceName]; if (handlers == null) { handlers = new ButtonEventHandlers(); m_buttonEventHandlersByFullName[instanceName] = handlers; } Button button = SearchButtonInstance(instId); if (button != null) { button.SetHandlers(handlers); } handlers.Add(load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); }
public Button(LWF lwf, Movie parent, int objId, int instId) : base(lwf, parent, Format.Object.Type.BUTTON, objId, instId) { m_invert = new Matrix(); m_hitX = Int32.MinValue; m_hitY = Int32.MinValue; if (objId >= 0) { m_data = lwf.data.buttons[objId]; m_dataMatrixId = m_data.matrixId; } m_handler = lwf.GetButtonEventHandlers(this); if (m_handler != null && m_handler.load != null) m_handler.load(this); }
public void ClearButtonEventHandler(int instId) { if (instId < 0 || instId >= m_instances.Length) { return; } ButtonEventHandlers handlers = m_buttonEventHandlers[instId]; if (handlers == null) { return; } handlers.Clear(); }
public void Add(ButtonEventHandlers handlers) { if (handlers == null) { return; } handlers.load.ForEach(h => load.Add(h)); handlers.unload.ForEach(h => unload.Add(h)); handlers.enterFrame.ForEach(h => enterFrame.Add(h)); handlers.update.ForEach(h => update.Add(h)); handlers.render.ForEach(h => render.Add(h)); handlers.press.ForEach(h => press.Add(h)); handlers.release.ForEach(h => release.Add(h)); handlers.rollOver.ForEach(h => rollOver.Add(h)); handlers.rollOut.ForEach(h => rollOut.Add(h)); handlers.keyPress.ForEach(h => keyPress.Add(h)); }
public Button(LWF lwf, Movie parent, int objId, int instId) : base(lwf, parent, Format.Object.Type.BUTTON, objId, instId) { m_invert = new Matrix(); m_hitX = Int32.MinValue; m_hitY = Int32.MinValue; if (objId >= 0) { m_data = lwf.data.buttons[objId]; m_dataMatrixId = m_data.matrixId; } m_handler = lwf.GetButtonEventHandlers(this); if (m_handler != null && m_handler.load != null) { m_handler.load(this); } }
public Button(LWF lwf, Movie parent, int objId, int instId, int matrixId = -1, int colorTransformId = -1) : base(lwf, parent, Format.Object.Type.BUTTON, objId, instId) { m_matrixId = matrixId; m_colorTransformId = colorTransformId; m_invert = new Matrix(); m_hitX = Int32.MinValue; m_hitY = Int32.MinValue; if (objId >= 0) { m_data = lwf.data.buttons[objId]; m_dataMatrixId = m_data.matrixId; } m_handler = lwf.GetButtonEventHandlers(this); if (m_handler != null) m_handler.Call(EventType.LOAD, this); }
public void SetButtonEventHandler(string instanceName, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null) { int instId = SearchInstanceId(GetStringId(instanceName)); if (instId >= 0) { SetButtonEventHandler(instId, press, release, rollOver, rollOut, keyPress, load, unload, enterFrame, update, render); return; } if (!instanceName.Contains(".")) { return; } if (m_buttonEventHandlersByFullName == null) { m_buttonEventHandlersByFullName = new ButtonEventHandlersDictionary(); } if (load != null || unload != null || enterFrame != null || update != null || render != null || rollOver != null || rollOut != null || press != null || release != null || keyPress != null) { m_buttonEventHandlersByFullName[instanceName] = new ButtonEventHandlers(load, unload, enterFrame, update, render, rollOver, rollOut, press, release, keyPress); } else { m_buttonEventHandlersByFullName.Remove(instanceName); } }
public void ClearButtonEventHandler(int instId) { if (instId < 0 || instId >= m_instances.Length) { return; } ButtonEventHandlers handlers = m_buttonEventHandlers[instId]; if (handlers == null) { return; } handlers.Clear(); Button button = SearchButtonInstanceByInstanceId(instId); if (button != null) { button.SetHandlers(handlers); } }
public void ClearButtonEventHandler( string instanceName, ButtonEventHandlers.Type type) { int instId = SearchInstanceId(GetStringId(instanceName)); if (instId >= 0) { ClearButtonEventHandler(instId, type); return; } if (m_buttonEventHandlersByFullName == null) return; ButtonEventHandlers handlers; if (!m_buttonEventHandlersByFullName.TryGetValue( instanceName, out handlers)) return; handlers.Clear(type); Button button = SearchButtonInstance(instanceName); if (button != null) button.SetHandlers(handlers); }
public void SetHandlers(ButtonEventHandlers handler) { if (m_handler != null) m_handler.Add(handler); else m_handler = handler; }
public void ClearButtonEventHandler( string instanceName, ButtonEventHandlers.Type type) { int instId = SearchInstanceId(GetStringId(instanceName)); if (instId >= 0) { ClearButtonEventHandler(instId, type); return; } if (m_buttonEventHandlersByFullName == null) return; ButtonEventHandlers handlers = m_buttonEventHandlersByFullName[instanceName]; if (handlers == null) return; handlers.Clear(type); }
public void ClearButtonEventHandler( int instId, ButtonEventHandlers.Type type) { if (instId < 0 || instId >= m_instances.Length) return; ButtonEventHandlers handlers = m_buttonEventHandlers[instId]; if (handlers == null) return; handlers.Clear(type); }
public void SetHandlers(ButtonEventHandlers handler) { m_handler = handler; }
public void SetButtonEventHandler(int instId, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null) { if (instId < 0 || instId >= m_instances.Length) return; ButtonEventHandlers handlers; if (load != null || unload != null || enterFrame != null || update != null || render != null || rollOver != null || rollOut != null || press != null || release != null || keyPress != null) { handlers = new ButtonEventHandlers(load, unload, enterFrame, update, render, rollOver, rollOut, press, release, keyPress); } else { handlers = null; } m_buttonEventHandlers[instId] = handlers; }
public void SetButtonEventHandler(string instanceName, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null) { int instId = SearchInstanceId(GetStringId(instanceName)); if (instId >= 0) { SetButtonEventHandler(instId, press, release, rollOver, rollOut, keyPress, load, unload, enterFrame, update, render); return; } if (!instanceName.Contains(".")) return; if (m_buttonEventHandlersByFullName == null) m_buttonEventHandlersByFullName = new ButtonEventHandlersDictionary(); if (load != null || unload != null || enterFrame != null || update != null || render != null || rollOver != null || rollOut != null || press != null || release != null || keyPress != null) { m_buttonEventHandlersByFullName[instanceName] = new ButtonEventHandlers(load, unload, enterFrame, update, render, rollOver, rollOut, press, release, keyPress); } else { m_buttonEventHandlersByFullName.Remove(instanceName); } }
public void AddButtonEventHandler(int instId, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null) { if (instId < 0 || instId >= m_instances.Length) return; ButtonEventHandlers handlers = m_buttonEventHandlers[instId]; if (handlers == null) { handlers = new ButtonEventHandlers(); m_buttonEventHandlers[instId] = handlers; } Button button = SearchButtonInstanceByInstanceId(instId); if (button != null) button.SetHandlers(handlers); handlers.Add(load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); }
public void Add(ButtonEventHandlers handlers) { if (handlers == null) return; foreach (var h in handlers.load) load.Add(h.Key, h.Value); foreach (var h in handlers.unload) unload.Add(h.Key, h.Value); foreach (var h in handlers.enterFrame) enterFrame.Add(h.Key, h.Value); foreach (var h in handlers.update) update.Add(h.Key, h.Value); foreach (var h in handlers.render) render.Add(h.Key, h.Value); foreach (var h in handlers.press) press.Add(h.Key, h.Value); foreach (var h in handlers.release) release.Add(h.Key, h.Value); foreach (var h in handlers.rollOver) rollOver.Add(h.Key, h.Value); foreach (var h in handlers.rollOut) rollOut.Add(h.Key, h.Value); foreach (var h in handlers.keyPress) keyPress.Add(h.Key, h.Value); }
public int AddButtonEventHandler(int instId, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null) { interactive = true; if (instId < 0 || instId >= m_instances.Length) return -1; ButtonEventHandlers handlers = m_buttonEventHandlers[instId]; if (handlers == null) { handlers = new ButtonEventHandlers(); m_buttonEventHandlers[instId] = handlers; } int id = GetEventOffset(); handlers.Add(id, load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); Button button = SearchButtonInstanceByInstanceId(instId); if (button != null) button.SetHandlers(handlers); return id; }
public void ClearButtonEventHandler( int instId, ButtonEventHandlers.Type type) { if (instId < 0 || instId >= m_instances.Length) return; ButtonEventHandlers handlers = m_buttonEventHandlers[instId]; if (handlers == null) return; handlers.Clear(type); Button button = SearchButtonInstanceByInstanceId(instId); if (button != null) button.SetHandlers(handlers); }
public void AddButtonEventHandler(string instanceName, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null) { int instId = SearchInstanceId(GetStringId(instanceName)); if (instId >= 0) { AddButtonEventHandler(instId, load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); return; } if (!instanceName.Contains(".")) return; if (m_buttonEventHandlersByFullName == null) m_buttonEventHandlersByFullName = new ButtonEventHandlersDictionary(); ButtonEventHandlers handlers = m_buttonEventHandlersByFullName[instanceName]; if (handlers == null) { handlers = new ButtonEventHandlers(); m_buttonEventHandlersByFullName[instanceName] = handlers; } Button button = SearchButtonInstance(instId); if (button != null) button.SetHandlers(handlers); handlers.Add(load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); }
public void Add(ButtonEventHandlers handlers) { if (handlers == null) return; handlers.load.ForEach(h => load.Add(h)); handlers.unload.ForEach(h => unload.Add(h)); handlers.enterFrame.ForEach(h => enterFrame.Add(h)); handlers.update.ForEach(h => update.Add(h)); handlers.render.ForEach(h => render.Add(h)); handlers.press.ForEach(h => press.Add(h)); handlers.release.ForEach(h => release.Add(h)); handlers.rollOver.ForEach(h => rollOver.Add(h)); handlers.rollOut.ForEach(h => rollOut.Add(h)); handlers.keyPress.ForEach(h => keyPress.Add(h)); }
public int AddButtonEventHandler(string instanceName, ButtonEventHandler load = null, ButtonEventHandler unload = null, ButtonEventHandler enterFrame = null, ButtonEventHandler update = null, ButtonEventHandler render = null, ButtonEventHandler press = null, ButtonEventHandler release = null, ButtonEventHandler rollOver = null, ButtonEventHandler rollOut = null, ButtonKeyPressHandler keyPress = null) { interactive = true; int instId = SearchInstanceId(GetStringId(instanceName)); if (instId >= 0) { return AddButtonEventHandler(instId, load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); } if (!instanceName.Contains(".")) return -1; if (m_buttonEventHandlersByFullName == null) m_buttonEventHandlersByFullName = new ButtonEventHandlersDictionary(); ButtonEventHandlers handlers; if (!m_buttonEventHandlersByFullName.TryGetValue( instanceName, out handlers)) { handlers = new ButtonEventHandlers(); m_buttonEventHandlersByFullName[instanceName] = handlers; } int id = GetEventOffset(); handlers.Add(id, load, unload, enterFrame, update, render, press, release, rollOver, rollOut, keyPress); Button button = SearchButtonInstance(instanceName); if (button != null) button.SetHandlers(handlers); return id; }