Kelas Engine
StyleBase
*Konten ini diterjemahkan menggunakan AI (Beta) dan mungkin mengandung kesalahan. Untuk melihat halaman ini dalam bahasa Inggris, klik di sini.
Rangkuman
Metode
InsertStyleRule(rule: StyleRule,priority: number?):() |
SetStyleRules(rules: Instances):() |
Acara
Diwariskan oleh
Referensi API
Metode
InsertStyleRule
SetStyleRules
StyleBase:SetStyleRules(rules:Instances):()
Parameter
rules:Instances |
Memberikan nilai
()
Contoh Kode
Aturan Gaya
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local coreSheet = Instance.new("StyleSheet")
coreSheet.Name = "CoreSheet"
coreSheet.Parent = ReplicatedStorage
local styleRuleA = Instance.new("StyleRule")
styleRuleA.Selector = "Frame"
styleRuleA:SetProperty("BackgroundColor3", Color3.new(1, 0, 0))
local styleRuleB = Instance.new("StyleRule")
styleRuleB.Selector = "Frame"
styleRuleB:SetProperty("BackgroundColor3", Color3.new(0, 1, 0))
coreSheet:SetStyleRules({ styleRuleA, styleRuleB })Acara