shlexware / Rayfield

Rayfield Interface Suite
Apache License 2.0
62 stars 124 forks source link

[Suggestion] Add images #12

Open du-cc opened 1 year ago

du-cc commented 1 year ago

Images is useful for displaying stuff like user avatar or overviews etc...

-- Starts of suggestion

We can spawn image through a function

For individual image:

Tab:CreateImage()

For image but wrapped inside a label:

local Box = Tab:CreateLabel("Images!")
local Image = Box:CreateImage()
By using config inside the createimage() function:
local Image = Box:CreateImage({
    Image = 69420, -- rbxassetid://
    Position = "left/right/background", -- not available for individual
    CornerRadius = "0px" -- Rounded corner for left/right/individual position
    AltText = "Game banner" -- For individual only
})
For image centered on the right:

image

For image centered on the left

image

For the image in the label's background 

image

Example: (Image in left + Individual image + Alt Text)

image

shlexware commented 1 year ago

Will look into this, I can see the use.

du-cc commented 1 year ago

Will look into this, I can see the use.

I've done this in a modded rayfield script https://github.com/duccveloper/ducchub/blob/main/duccfield.lua this is the link if u want (but no animations)

Roblox asset link: https://www.roblox.com/library/11699739809/Duccfield

du-cc commented 1 year ago

Example: image

Code: image

du-cc commented 1 year ago

https://github.com/duccveloper/ducchub/blob/main/hub.lua this for example of my hub with implementation of images and other modded features