Configuration
Configure Viscery.
To configurate Viscery, you need to edit the VISCERY_CONFIGURATION table without breaking Lua syntax.
Default configuration:
local VISCERY_CONFIGURATION = {
UIConfig = {
AutoAnchorPoint = {
Enabled = true,
Position = Vector2.new(0.5, 0.5) -- Recommending to set the anchor point 0.5 so you don't get the middle point of the UI to be top left. But keep in mind that you would need to set the position of background frame to 0.5, 0.5 if you set this.
},
DefaultPosition = UDim2.new(0.5, 0, 0.5, 0),
DefaultSize = UDim2.new(0.5, 0.5, 0.5, 0.5),
DefaultBackgroundColor = Color3.fromRGB(189, 225, 236),
DefaultTextColor = Color3.fromRGB(3, 0, 32),
DefaultImageColor = Color3.new(1, 1, 1),
DefaultBorderThickness = 2,
DefaultBorderColor = Color3.fromRGB(0, 0, 0),
DefaultBorderRadius = 16,
DefaultImageId = "rbxassetid://9762988755", -- <- Placeholder image id | https://create.roblox.com/store/asset/9762988767/placeholder
DefaultText = "Text",
DefaultPlaceholderText = "Type here..."
},
AddonConfig = {
logEnabled = true,
logV = "number", -- This can be "string", but Roblox doesn't tags numbers so I would recommend to keep it like this.
logCodes = {
viscery = {0, "VISCERY"},
visceryFail = {1, "FAIL"},
visc = {2, "VISC"},
linkSignal = {3, "LINKSIGNAL"},
writeParent = {4, "WRITEPARENT"},
writeDisplay = {5, "WRITEDISPLAY"},
partDoesntExists = {6, "PARTDOESNTEXISTS"},
parentDoesntExists = {7, "PARENTDOESNTEXISTS"},
},
supportsTableColors = true, -- For color tables like {r, g, b}
}
}Here, you can edit configuration for UI, such as default background color, auto anchor point and default position. You can also edit addon settings!
UIConfig
UIConfig includes GUI Configurations such as default properties and automated tasks.
AutoAnchorPoint
AutoAnchorPoint has two properties, one being Enabled and second being Position.
Enabled: boolean toggles automated anchor point being enabled or not.
Position: Vector2 where will be the middle of an UI item gonna be.
When you enable AutoAnchorPoint, and if you have a background frame in a display you made, you should make sure that the background frame should be positioned according to the anchor point.
e.g. if the anchor point is Vector2.new(0.5, 0.5) then the background frame should be at UDim2.new(0.5, 0, 0.5, 0) to make it stay at the center. You can set AnchorPoints yourself when creating a visc if you want it other than each other.
DefaultPosition
DefaultPosition is an UDim2 value, determining the default position where UI gets putted to the parent when no property for Position is given to visc.
DefaultSize
Just like DefaultPosition, this is an UDim2 value too. This determines how big will be the visc if no Size property is given to the visc.
DefaultBackgroundColor
This is a Color3 value, but it can also be a RGB table of 3 numbers, going from R to B. When BackgroundColor or BackgroundColor3 property isn't given to the visc, this color gets setted automaticly.
DefaultTextColor
This is a Color3 value, but it can also be a RGB table of 3 numbers, going from R to B. When TextColor or TextColor3 property isn't given to the visc, this color gets setted automaticly.
DefaultImageColor
This is a Color3 value, but it can also be a RGB table of 3 numbers, going from R to B. When ImageColor property isn't given to the visc, this color gets setted automaticly.
DefaultBorderColor
This is a Color3 value, but it can also be a RGB table of 3 numbers, going from R to B. When BorderColor isn't given, this gets setted up automaticly.
DefaultBorderRadius
This is a number value. It determines the border radius (how smooth the border will be) when it's not given.
DefaultImageId
This is a string value. Roblox asset Id for the default decal when the image property isn't given.
DefaultText
This is a string value. Text when the Text property isn't given.
DefaultPlaceholderText
This is a string value. Text for the default placeholder text when the PlaceholderText property isn't given.
AddonConfig
NOTE: Editing AddonConfig may break your code if you don't know what you're doing.
logEnabled
This is a boolean value. This toggles debug prints being written to logs or not.
logV
This is a string value. This must be "number" or anything else (which would make it "string"). This toggles if logs will be numbers or strings.
logCodes
This is a table (format: {[string]: {number, string}}) where it contains logCodes for Viscery, their numbers if logV is "number" and their strings if logV isn't "number".
supportsTableColors
This is a boolean value. This toggles parseColor function supporting table colors (such as {255, 255, 255}), and when this is false, only Color3 gets supported.