StyleBase

사용되지 않는 항목 표시

*이 콘텐츠는 AI(베타)를 사용해 번역되었으며, 오류가 있을 수 있습니다. 이 페이지를 영어로 보려면 여기를 클릭하세요.

만들 수 없음

StyleSheetStyleRule의 기본 클래스.자식 목록 StyleRules 과 토큰 정의를 저장하는 역할을 하는 특성 으로 저장된 토큰 정의를 포함합니다.

요약

메서드

이벤트

속성

메서드

GetStyleRules

Instances

관련된 배열 StyleRules 을 반환합니다.


반환

Instances

배열의 StyleRules .

InsertStyleRule

()

규칙 배열에 새로운 StyleRule 를 삽입하여 그의 Priority 가 이전의 모든 StyleRules 보다 커지도록 합니다.priority 가 지정되면 새 규칙의 Priority 가 지정된 값으로 설정됩니다.

매개 변수

rule: StyleRule

삽입할 StyleRule 입니다.

기본값: ""
priority: number

규칙의 Priority를 설정할 번호.

기본값: ""

반환

()

SetStyleRules

()

InsertStyleRule()와 비슷하지만 한 번에 여러 StyleRules를 선언하고 설정할 수 있습니다.


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 })

매개 변수

rules: Instances

설정할 StyleRules 배열.

기본값: ""

반환

()

이벤트

StyleRulesChanged

예를 들어, InsertStyleRule() 가 호출될 때 연결된 StyleSheet 또는 StyleRule 에서 하나 이상의 StyleRules 가 명시적으로 변경되면 발생합니다.