Categories > Coding > Lua >

RayField UI Library

TJB13022012

JustSomeGuyThatsHere

Posts: 12

Threads: 4

Joined: Jul, 2022

Reputation: 0

Posted

So i created a script with rayfield ui library but when i want to add icons they dont show up can someone help me out?

 

Btw what size does the icon/image be in pixels or whatever?

  • 0

Hello there.

mliny

Mattress kidnapper 3000

Posts: 94

Threads: 14

Joined: Jan, 2023

Reputation: 7

Replied

1. I hate rayfiled ui 

2. 300x300

  • 0

Cyros

Revision

Posts: 1057

Threads: 48

Joined: Feb, 2021

Reputation: 20

Replied

@mliny, agreed, i hate rayfield for some reason (overused)

  • 0

We Hate VOID

TJB13022012

JustSomeGuyThatsHere

Posts: 12

Threads: 4

Joined: Jul, 2022

Reputation: 0

Replied

@Cyros I edited rayfield ui with a cool key system and not the build in one. But thanks anyways!

  • 0

Hello there.

Haruka

STD Testing Center

Posts: 58

Threads: 3

Joined: Feb, 2023

Reputation: 5

Replied

Make sure you have imported the icon library you want to use. For example, if you want to use Font Awesome icons, you should add the following link to the head of your HTML document.

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

 

Verify that the icon element is properly nested inside the element you want to add it to. For example, if you want to add an icon to a button, the icon element should be inside the button element.

 

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
  <button class="ray-btn ray-btn-primary">
    <i class="fa fa-heart"></i> Click me!
  </button>
</body>
</html>



 

 

 

 

  • 0

https://media.discordapp.net/attachments/979069297374671018/1078367228593971362/VelvetSiggy.png

 

 

TJB13022012

JustSomeGuyThatsHere

Posts: 12

Threads: 4

Joined: Jul, 2022

Reputation: 0

Replied

@Haruka i mean the rayfield ui library icon size. For roblox.

  • 0

Hello there.

Haruka

STD Testing Center

Posts: 58

Threads: 3

Joined: Feb, 2023

Reputation: 5

Replied

@TJB13022012, oops my bad, You can adjust the icon size by modifying the css rules of the 'fa' class

-- First, create a new stylesheet object
local stylesheet = game:GetService("InsertService"):LoadAsset(123456789):GetChildren()[1] -- replace 123456789 with the asset ID of your stylesheet
stylesheet.Parent = game:GetService("StarterGui")

-- Then, modify the "fa" class to set the font size to your desired value
local iconSize = 24 -- replace with the desired size
local css = stylesheet.Css:Get()
css[".fa"] = {
  fontSize = tostring(iconSize) .. "px",
}
stylesheet.Css:Set(css)

 

 

  • 0

https://media.discordapp.net/attachments/979069297374671018/1078367228593971362/VelvetSiggy.png

 

 

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )