Quantcast
Download
(5 Kb)
Download
Updated: 09/01/18 10:32 PM
Compatibility:
Wolfhunter (4.1)
Summerset (4.0)
Updated:09/01/18 10:32 PM
Created:07/22/18 07:25 PM
Monthly downloads:875
Total downloads:2,294
Favorites:22
MD5:
4.1
LibFeedback
Version: 1.1
by: Dolgubon [More]
This is a library which allows Addon Authors to easily add a feedback window to their addon. The feedback options are pretty open ended. You can do a simple 'Send Note', for if the user wants to just send you a note, a gold amount, a Paypal URL/personal website/charity donation page. If you'd like to have more options, let me know. (Or be like Baertram and code them yourself )

Usage:


local LibFeedback = LibStub:GetLibrary('LibFeedback')
-- The button is returned so you can modify the button if needed
-- ExampleAddonNameSpace.feedbackButton = LibFeedback:initializeFeedbackWindow(
ExampleAddonNameSpace, -- namespace of the addon
"Example Addon", -- The title string for the feedback window and the mails it sends
parentControl, -- The parent control to anchor the feedback button(s) + label(s) to
"@AddonAuthor", -- If this parameter is no table: [1st parameter] like desribed below:
-- The destination for feedback (0 gold attachment) and donation mails, valid for all servers
-- If this parameter is a table:
-- Example: { addonVars.addonAuthorDisplayNameEU, addonVars.addonAuthorDisplayNameNA, addonVars.addonAuthorDisplayNamePTS },
-- [1st parameter]Addon author name or character name at the EU Megaserver
-- [2nd parameter]Addon author name or character name at the NA Megaserver
-- [3rd parameter]Addon author name or character name at the PTS (Testserver)
{TOPLEFT, owningWindow, TOPLEFT, x, y}, -- The position of the mail button icon. owningWindow: Parent control for the button. x and y: Integer values for the offsets
{0,5000,50000, "https://www.genericexampleurl.com/somemoregenericiness"} -- The button info:
-- Can theoretically do any number of options, it *should* handle them
-- If this parameter is no table: [1st parameter] like desribed below:
-- If 0: Will not attach any gold, and will say 'Send Note'
-- If non zero: Will auto attach that amount of gold
-- If URL: Will show a dialog box and ask the user if they want to go to the URL.
-- If this parameter is a table:
-- Example: [index]= {[1st parameter] [2nd parameter] [3rd parameter] },
-- [1] = { 0, localization.feedbackSendNote, false }, -- Send ingame mail
-- [2] = { 10000, localization.feedbackSendGold, true }, -- Send 10000 gold
-- [3] = { addonVars.authorPortal, localization.feedbackOpenAddonAuthorWebsite, false }, -- Open URL
-- [4] = { addonVars.FAQwebsite, localization.feedbackOpenAddonFAQ, false } -- Open URL
-- [1st parameter]Integer. When >0: Gold value to send/Integer. Gold will only be send if 3rd parameter is true. / When Integer==0: Show the 2nd parameter string as button text and send ingame mail. / When String <> "": Show the 2nd parameter string as button text and open the URL from 1st parameter in Webbrowser
-- [2nd parameter]String to show as button text.
-- [3rd parameter]Boolean send gold. True: Send mail with attached gold value from 1st parameter/False: Send normal mail without gold attached


"If you found a bug, have a request or a suggestion, or simply wish to donate, send a mail.", -- Will be displayed as a message below the title.
600, -- The default width of the feedback window. If more than 4 buttons this should be increased.
150 -- The default height of the feedback window
150, -- The default width of the feedback window's buttons
28 -- The default height of the feedback window's buttons
)


Addons currently using the library:
Dolgubon's Lazy Writ Crafter

Dolgubon's Lazy Set Crafter


This Library is based on code from Master Merchant.
Version 1.1: (reupload)

Added a text file so that minion will recognize it

Version 1.1:

Contributions from Baetram: (Thanks!)
- Support for different destinations for mail on different servers
- Default values and error messages added
- More options available for the buttons and windows, but still backwards compatible
- Support for translations
- Debug messages added
- Detailed description of parameters

Contributions from me
- Closes itself if the user chooses to send a mail

Version 1.0:

Initial release
Optional Files (0)


Archived Files (2)
File Name
Version
Size
Author
Date
1.1
4kB
Dolgubon
07/23/18 09:56 PM
0.1
44kB
Dolgubon
07/22/18 07:25 PM


Post A Reply Comment Options
Unread 09/08/18, 12:50 AM  
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view AddOns

Forum posts: 314
File comments: 523
Uploads: 12
Originally Posted by Marazota
i was curious why i cant find LibFeedback in minion
but i need space between words

you may want to rename it to be consistent with all other libs
they all havent space in title

Cheers!
Thanks for the heads-up. I've removed the space so it should be easier to find.
Report comment to moderator  
Reply With Quote
Unread 09/04/18, 08:46 AM  
Marazota

Forum posts: 76
File comments: 636
Uploads: 0
i was curious why i cant find LibFeedback in minion
but i need space between words

you may want to rename it to be consistent with all other libs
they all havent space in title

Cheers!
Report comment to moderator  
Reply With Quote
Unread 09/02/18, 06:32 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1768
File comments: 1865
Uploads: 48
Thanks!
Report comment to moderator  
Reply With Quote
Unread 08/30/18, 11:33 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1768
File comments: 1865
Uploads: 48
LibFeedback won't be found on Minion. Please add the txt file!

Just wanted to provide you the contents of a LibFeedback.txt file for the dependency to LibStub:
Code:
## Title: LibFeedback
## Author: Dolgubon
## APIVersion: 100024 100025
## Version: 1.1
## Description: This is a library which allows Addon Authors to easily add a feedback window to their addon
## DependsOn: LibStub

## This Add-On is not created by, affiliated with or sponsored by ZeniMax Media Inc. or its affiliates. The Elder Scrolls® and related logos are registered trademarks or trademarks of ZeniMax Media Inc. in the United States and/or other countries. All rights reserved.

libs/LibStub.lua
feedback.lua
I've build a package zip for version 1.1 too including libstub so one can add this lib as standalone too:
LibFeedback v1.1 with LibStub
Last edited by Baertram : 09/01/18 at 04:37 PM.
Report comment to moderator  
Reply With Quote
Unread 07/23/18, 04:13 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1768
File comments: 1865
Uploads: 48
Thanks Dolgubon, looks promising.
Will try to add it to an addon and check what nonsense ppl will use it for

Edit:
The description is missing the 3rd parameter "parentControl" for the function
LibFeedback:initializeFeedbackWindow(parentAddonNameSpace, parentAddonName, parentControl, mailDestination, mailButtonPosition, buttonInfo, messageText)

Ideas/Questions:
Are we somehow able to specify different @names for the mail attachments, depending on the server name?

And I got some more ideas, will work on them some time I guess and send you an example then.
e.g.
-Change the texture + size + color of the mail icon from function parameters/via a library function (as addition to returning the button as a variable and chaning it afterwards)
-Change the text shown on the buttons
-Preset the text shown in the mail body
...

Edit2:
Added a pull request to github with my changes.
Last edited by Baertram : 07/23/18 at 11:22 AM.
Report comment to moderator  
Reply With Quote
Unread 07/22/18, 09:17 PM  
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view AddOns

Forum posts: 314
File comments: 523
Uploads: 12
Originally Posted by Architecture
Nice job Dolg! I'll try this out Cool concept
Hope you like it! I've had it for some time, but just got around to releasing it.
Report comment to moderator  
Reply With Quote
Unread 07/22/18, 07:53 PM  
Architecture
 
Architecture's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 61
Uploads: 8
Nice job Dolg! I'll try this out Cool concept
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: