public Button SearchButtonInstance(int stringId, bool recursive = true) { if (stringId == -1) { return(null); } for (IObject instance = m_instanceHead; instance != null; instance = instance.linkInstance) { if (instance.IsButton() && m_lwf.GetInstanceNameStringId( instance.instanceId) == stringId) { return((Button)instance); } else if (recursive && instance.IsMovie()) { Button i = ((Movie)instance).SearchButtonInstance( stringId, recursive); if (i != null) { return(i); } } } return(null); }
public Button SearchButtonInstanceByInstanceId(int instId) { if (instId < 0 || instId >= m_instances.Length) { return(null); } IObject obj = m_instances[instId]; while (obj != null) { if (obj.IsButton()) { return((Button)obj); } obj = obj.nextInstance; } return(null); }
public Button SearchButtonInstanceByInstanceId(int instId, bool recursive) { for (IObject instance = m_instanceHead; instance != null; instance = instance.linkInstance) { if (instance.IsButton() && instance.instanceId == instId) { return((Button)instance); } else if (recursive && instance.IsMovie()) { Button i = ((Movie)instance).SearchButtonInstanceByInstanceId( instId, recursive); if (i != null) { return(i); } } } return(null); }