호출 방법
addon:CreateConditionLabel()
addon을 통해 바로 쓸 수 있으며, 의존성이 필요 없습니다.
하는 일
너비와 글꼴로 높이를 측정하는 기본 줄바꿈 텍스트를 만듭니다. SetText, SetFont, SetFontObject로 내용을 설정합니다. 레이아웃이 측정된 높이를 추적할 수 있도록 parent:AddChild(widget)로 콜백 부모에 추가하세요.
인수
| 이름 | 유형 | 하는 일 |
|---|---|---|
self | RMAddon | Rotation Master 애드온 인스턴스 (콜론 호출에서는 암묵적). |
반환값
| 1 | RMConditionLabel | 글꼴, 색상, 정렬 메서드를 가진 기본 줄바꿈 텍스트 컨트롤. |
|---|
버전
기본 제공 도우미는 모든 버전에 등록됩니다. 다른 점은 읽는 게임 API이며, API가 없으면 도우미는 대체 동작을 하거나 이유와 함께 nil을 반환합니다.
게임 API를 직접 읽지 않습니다.
애드온에서 호출하는 방식
- 인스턴스 (widget)
local note = addon:CreateConditionLabel() - 새긴 룬 (widget)
local label = addon:CreateConditionLabel() - 무기 마법부여 유형 (widget)
local label = addon:CreateConditionLabel() Conditions.bossmod.notelocal label = addon:CreateConditionLabel()Conditions.talent.textlocal label=addon:CreateConditionLabel();label:SetFullWidth(true);label:SetText(message);parent:AddChild(label)Conditions.talent.traitsWidgetlocal note=addon:CreateConditionLabel();note:SetFullWidth(true);parent:AddChild(note)
의존성
labelConstructor→UI.condition_display.labelConstructor
소스
UI/condition_display.lua, 144번째 줄. 게임에서는 읽기 전용이며, 복제하면 편집 가능한 사본이 생깁니다.
UI.condition_display.CreateConditionLabel(self)
return self:AcquireConditionWidget('RM-ConditionLabel',labelConstructor)