internal bool RegisterLinkButton(IObject prim, TouchButton button) { if (!prim.Root.GlobalID.Equals(prim.GlobalID)) { _linkButtons[prim.LocalID] = button; return true; } return false; }
/// <summary> /// Make a linked button. If a prim linked to the given root prim is called name then touching it will trigger the button. /// </summary> /// <param name="name">The name of the button.</param> /// <param name="id">The root primitive of the link set. Any children of this primitive with name 'name' will be listened to as a button.</param> /// <returns>A button object that allows listeners to be attached to the button.</returns> public IButton MakeButton(string name, IPermissions permissions, params UUID[] ids) { IButton button = new TouchButton(this, name, permissions, ids); _logger.Info("Made button " + name + " with " + button.Prims.Count() + " primitives."); return button; }
internal void RegisterChatButton(UUID prim, TouchButton button) { _chatButtons.Add(prim, button); }
/// <summary> /// Make a button tied to a specific name. Any primitives with the given name and the following script embedded in them will trigger this button when touched. /// </summary> /// <param name="name">The name of the button.</param> /// <returns>A button object that allows listeners to be attached to the button.</returns> public IButton MakeButton(string name, IPermissions permissions) { IButton button = new TouchButton(this, name, permissions); _logger.Info("Made button " + name + " with " + button.Prims.ToArray().Length + " primitives."); return button; }