// Creates a new Virtual Button with the data of the Virtual Button with the // given name that is a child of the Image Target with the name // imageTargetName. // Returns false if Virtual Button does not exist. public void GetVirtualButton(string name, string imageTargetName, out VirtualButtonData vb) { vb = new VirtualButtonData(); try { ImageTargetData it; GetImageTarget(imageTargetName, out it); List <VirtualButtonData> vbs = it.virtualButtons; for (int i = 0; i < vbs.Count; ++i) { if (vbs[i].name == name) { vb = vbs[i]; } } } catch { throw; } }
// Add Virtual Button to the Image Target with the given imageTargetName. public void AddVirtualButton(VirtualButtonData item, string imageTargetName) { try { ImageTargetData it = imageTargets[imageTargetName]; it.virtualButtons.Add(item); } catch { throw; } }
public void GetVirtualButton(string name, string imageTargetName, out VirtualButtonData vb) { vb = new VirtualButtonData(); try { ImageTargetData data; this.GetImageTarget(imageTargetName, out data); List <VirtualButtonData> virtualButtons = data.virtualButtons; for (int i = 0; i < virtualButtons.Count; i++) { if (virtualButtons[i].name == name) { vb = virtualButtons[i]; } } } catch { throw; } }
// Creates a new Virtual Button with the data of the Virtual Button with the // given name that is a child of the Image Target with the name // imageTargetName. // Returns false if Virtual Button does not exist. public void GetVirtualButton(string name, string imageTargetName, out VirtualButtonData vb) { vb = new VirtualButtonData(); try { ImageTargetData it; GetImageTarget(imageTargetName, out it); List<VirtualButtonData> vbs = it.virtualButtons; for (int i = 0; i < vbs.Count; ++i) { if (vbs[i].name == name) { vb = vbs[i]; } } } catch { throw; } }