StyleRuleクラス

クラス日本語解説は準備中

ひとことで言うと

StyleRuleは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。

公式の説明(英語):Defines style properties which override properties on the instances affected by the Class.StyleRule.Selector|Selector property.

クラスの関係

受け継いでいるクラス:Object → Instance → StyleBase → StyleRule

プロパティ(3)

名前と書き方説明
Priority
StyleRule.Priority: int
A number that determines how properties of the StyleRule apply relative to the same properties in other StyleRules. Higher priority values take precedence over lower.
Selector
StyleRule.Selector: string
A string specifying which instances the StyleRule should affect.
SelectorError
StyleRule.SelectorError: string
A read-only string that displays errors from the Class.StyleRule.Selector|Selector property.

メソッド(9)

名前と書き方説明
GetDefaultPropertyTransition
StyleRule:GetDefaultPropertyTransition(): Variant
Returns the default transition applied to all properties of the StyleRule that don't have an explicit transition set.
GetProperties
StyleRule:GetProperties(): Dictionary
Returns a dictionary of key-value pairs describing the properties of the StyleRule.
GetProperty
StyleRule:GetProperty(name: string): Variant
Returns the value of a specific property in the StyleRule.
GetPropertyTransitions
StyleRule:GetPropertyTransitions(): Dictionary
Returns a dictionary of all property transitions set on the StyleRule.
SetDefaultPropertyTransition
StyleRule:SetDefaultPropertyTransition(transitionParams: Variant): ()
Sets or clears a default transition that applies to all properties of the StyleRule that don't have an explicit transition set.
SetProperties
StyleRule:SetProperties(styleProperties: Dictionary): ()
Lets you declare and set multiple properties of the StyleRule at once.
SetProperty
StyleRule:SetProperty(name: string, value: Variant): ()
Sets or updates a single property of the StyleRule.
SetPropertyTransition
StyleRule:SetPropertyTransition(property: string, transitionParams: Variant): ()
Sets or clears the transition for a single property on the StyleRule.
SetPropertyTransitions
StyleRule:SetPropertyTransitions(properties: Dictionary): ()
Lets you declare and set transitions for multiple properties of the StyleRule at once.

受け継いでいるメンバー

StyleBase から受け継いでいるもの(4)

GetStyleRules・InsertStyleRule・SetStyleRules・StyleRulesChanged

Instance から受け継いでいるもの(46)

Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged

Object から受け継いでいるもの(4)

ClassName・GetPropertyChangedSignal・IsA・Changed

英語の説明とメンバーの一覧は、Roblox Creator Documentation(StyleRule)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む