Quantcast
Download
(3 Kb)
Download
Updated: 11/03/19 04:46 PM
Compatibility:
Dragonhold (5.2.5)
Updated:11/03/19 04:46 PM
Created:08/13/19 08:42 PM
Monthly downloads:1,108
Total downloads:7,722
Favorites:4
MD5:
5.2.5
LibFsCommons  Popular! (More than 5000 hits)
Version: 2.0
by: FelipeS11 [More]
This Library have Functions to:
- display messages in the chat using LibChatMessage.
- animate Controls
- validate creations of Addons

Dependencies:
- LibChatMessage - Print system messages

HOW TO USE:
Code:
## DependsOn: LibFsCommons
Code:
[email protected] instance with available functions
local Utils = LibFsCommons(LongAddonName, ShortAddonName)

[email protected] String with format(|c color message |r)
Utils.Colorize(message, color)

--Prints the message in the chat
Utils.PrintMsg(message, tagColor)

--Prints the message in the chat in the color informed
Utils.PrintMsgColorize(message, textColor, tagColor)

--Prints the messages in the chat in the colors informed
--Ex.: Utils.PrintMsgColorizeAr({'first part', 'second part'}, 
--{'color of the first part','color of the second part'}, color)
Utils.PrintMsgColorizeAr(message, textColor, tagColor)

--Make an Animation
Utils.AnimateTextDefault(_control, duration)

--Test if there is another addon, or another version using the same global variable
--If there are problems return [your variable].fsAddonCreated = false
--The test utilize [your variable].version and [your variable].name to check if there are problems
Utils.CanCreateAddon(_IDENTIFIER, _NewConf)

--add a caracter(PadValue) in the left of the string(PadString) till the result reaches value specified(HowMany)
--Ex.: Utils.LeftPad('Test', 3, 'z') return zzzTest
Utils.LeftPad(PadString, HowMany, PadValue)

--convert the seconds to the format HH:MM:SS
--Ex.: Utils.SecondsToStr(4321) return 01:12:01
Utils.SecondsToStr(_Secs)
==================================
Summary of changes: 2.0
==================================
Changed name from FsLibUtils to LibFsCommons for convention's purpose and avoid misunderstands

==================================
Summary of changes: 1.3
==================================
New functions LeftPad and SecondsToStr

==================================
Summary of changes: 1.2
==================================
Fixed bug when using the chat with multiples addons

==================================
Summary of changes: 1.1
==================================
Update to API version 100029 (Dragonhold)

==================================
Summary of changes: 1.0
==================================
Created Library
Archived Files (4)
File Name
Version
Size
Uploader
Date
1.3
3kB
FelipeS11
11/01/19 07:48 PM
1.2
3kB
FelipeS11
10/25/19 08:24 PM
1.1
3kB
FelipeS11
09/25/19 07:06 PM
1.0
3kB
08/13/19 08:42 PM


Post A Reply Comment Options
Unread 11/02/19, 11:28 AM  
FelipeS11
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 3
Uploads: 3
Re: Add-on Naming Convention for Libraries

Originally Posted by Shadowshire
If your contribution contains one or more files which are "library files" used by add-ons, then please begin the name of your uploaded file with "Lib" or "lib". For example: LibFsLibUtils or libFsUtils.

This convention was recommended at the time uploading libraries separately from folders containing only add-on files was adopted. It usually has been followed since. Beginning the folder name with "Lib" or "lib" makes it easier for an add-on programmer to remember the name of the library files upon which their add-on depends.

The rare exception is when someone retains an add-on name for their uploaded file, but the folder in the .ZIP has a name that begins with "Lib" or with "lib". For example, you could use the name FsLibUtils for your uploaded .ZIP file, and name the folder of files that it contains LibFsUtils or libFsUtils.

Then it will be displayed for the .../Addons folder in the same part of the list as other library files. Thank-you for your understanding and cooperation.
Hi, thanks for your input, I'll adjust the name in the convention's format.
Report comment to moderator  
Reply With Quote
Unread 11/02/19, 11:24 AM  
FelipeS11
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 3
Uploads: 3
Re: Lib called LibSFutils already exist

Originally Posted by Anceane
LibSFutils
Author: Shadowfen

Actually i thought that your addons was an update of this libs as the name are very similar.

Happily i could see my error but some people might really do the mistake and replace the other one by yours.
Hi, thanks for your input, I'll take a look to change the name to dont cause any mistake.
Report comment to moderator  
Reply With Quote
Unread 11/02/19, 06:45 AM  
Anceane
 
Anceane's Avatar

Forum posts: 251
File comments: 798
Uploads: 0
Lib called LibSFutils already exist

LibSFutils
Author: Shadowfen

Actually i thought that your addons was an update of this libs as the name are very similar.

Happily i could see my error but some people might really do the mistake and replace the other one by yours.
__________________
Report comment to moderator  
Reply With Quote
Unread 11/01/19, 09:36 PM  
Shadowshire

Forum posts: 1
File comments: 293
Uploads: 0
Exclamation Add-on Naming Convention for Libraries

If your contribution contains one or more files which are "library files" used by add-ons, then please begin the name of your uploaded file with "Lib" or "lib". For example: LibFsLibUtils or libFsUtils.

This convention was recommended at the time uploading libraries separately from folders containing only add-on files was adopted. It usually has been followed since. Beginning the folder name with "Lib" or "lib" makes it easier for an add-on programmer to remember the name of the library files upon which their add-on depends.

The rare exception is when someone retains an add-on name for their uploaded file, but the folder in the .ZIP has a name that begins with "Lib" or with "lib". For example, you could use the name FsLibUtils for your uploaded .ZIP file, and name the folder of files that it contains LibFsUtils or libFsUtils.

Then it will be displayed for the .../Addons folder in the same part of the list as other library files. Thank-you for your understanding and cooperation.
__________________
---- Shadowshire ..... nil carborundum illegitimi
Last edited by Shadowshire : 11/01/19 at 09:43 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: