1- Legolando_HelpTipCloseButtonMixin = CreateFromMixins (ButtonStateBehaviorMixin );
1+ Legolando_HelpTipCloseButtonMixin_Angleur = CreateFromMixins (ButtonStateBehaviorMixin );
22
33local atlas
44if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then
55 atlas = " uitools-icon-close"
66elseif WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC or WOW_PROJECT_ID == WOW_PROJECT_CLASSIC or WOW_PROJECT_ID == 19 then
77 atlas = " simplecheckout-close-normal-1x"
88end
9- function Legolando_HelpTipCloseButtonMixin :GetAtlas ()
9+ function Legolando_HelpTipCloseButtonMixin_Angleur :GetAtlas ()
1010 if self :IsDown () then
1111 return atlas ;
1212 end
1313 return atlas ;
1414end
1515
16- function Legolando_HelpTipCloseButtonMixin :OnButtonStateChanged ()
16+ function Legolando_HelpTipCloseButtonMixin_Angleur :OnButtonStateChanged ()
1717 self .Texture :SetAtlas (self :GetAtlas (), TextureKitConstants .UseAtlasSize );
1818end
1919
@@ -109,21 +109,21 @@ HelpTip.halfWidth = HelpTip.width / 2;
109109
110110
111111
112- Legolando_HelpTipTemplateMixin = {};
112+ Legolando_HelpTipTemplateMixin_Angleur = {};
113113
114- Legolando_HelpTipTemplateMixin .warningFrame = nil
114+ Legolando_HelpTipTemplateMixin_Angleur .warningFrame = nil
115115
116- Legolando_HelpTipTemplateMixin .acknowledgeThisHide = false
116+ Legolando_HelpTipTemplateMixin_Angleur .acknowledgeThisHide = false
117117
118- Legolando_HelpTipTemplateMixin . savedTable = nil
118+ Legolando_HelpTipTemplateMixin_Angleur . savedVarTable = nil
119119
120- Legolando_HelpTipTemplateMixin .partActive = nil
120+ Legolando_HelpTipTemplateMixin_Angleur .partActive = nil
121121
122- Legolando_HelpTipTemplateMixin .onSkipCallback = nil
122+ Legolando_HelpTipTemplateMixin_Angleur .onSkipCallback = nil
123123
124- Legolando_HelpTipTemplateMixin .parts = {}
124+ Legolando_HelpTipTemplateMixin_Angleur .parts = {}
125125--[[
126- Legolando_HelpTipTemplateMixin .parts[i] = {
126+ Legolando_HelpTipTemplateMixin_Angleur .parts[i] = {
127127 text, -- also acts as a key for various API, MUST BE SET
128128 textColor = HIGHLIGHT_FONT_COLOR,
129129 textJustifyH = "LEFT",
@@ -154,7 +154,7 @@ Legolando_HelpTipTemplateMixin.parts = {}
154154 }
155155]] --
156156
157- function Legolando_HelpTipTemplateMixin :OnLoad ()
157+ function Legolando_HelpTipTemplateMixin_Angleur :OnLoad ()
158158 self .Arrow .Arrow :ClearAllPoints ();
159159 self .Arrow .Arrow :SetPoint (" CENTER" );
160160 self .Arrow .Glow :ClearAllPoints ();
@@ -171,7 +171,7 @@ function Legolando_HelpTipTemplateMixin:OnLoad()
171171 end )
172172end
173173
174- function Legolando_HelpTipTemplateMixin :OnHide ()
174+ function Legolando_HelpTipTemplateMixin_Angleur :OnHide ()
175175 if self .warningFrame then
176176 self .warningFrame :Hide ()
177177 end
@@ -197,7 +197,7 @@ function Legolando_HelpTipTemplateMixin:OnHide()
197197 self :GoToNextPart ()
198198end
199199
200- function Legolando_HelpTipTemplateMixin :AttachWarning (warningFrame )
200+ function Legolando_HelpTipTemplateMixin_Angleur :AttachWarning (warningFrame )
201201 self .warningFrame = warningFrame
202202
203203 warningFrame .noButton :SetScript (" OnClick" , function ()
@@ -208,66 +208,83 @@ function Legolando_HelpTipTemplateMixin:AttachWarning(warningFrame)
208208 end )
209209end
210210
211- function Legolando_HelpTipTemplateMixin :SkipTutorial ()
212- Angleur_BetaPrint (" Skipping Tutorial" )
211+ function Legolando_HelpTipTemplateMixin_Angleur :SkipTutorial ()
212+ local teeburu = self .savedVarTable
213+ if not teeburu then
214+ print (" no saved variable table attached" )
215+ return
216+ end
213217 self .partActive = # self .parts + 1
214- if self .savedTable then
215- self .savedTable . part = self .partActive
218+ if self .reference then
219+ teeburu [ self .reference ] = self .partActive
216220 end
217221 self :Hide ()
218222 if self .onSkipCallback then
219223 self .onSkipCallback ()
220224 end
221225end
222- function Legolando_HelpTipTemplateMixin :CompletePartWithAction (part )
226+ function Legolando_HelpTipTemplateMixin_Angleur :CompletePartWithAction (part )
223227 if part == self .partActive then
224228 self .acknowledgeThisHide = true
225229 self :Hide ()
226- Angleur_BetaPrint (" Completing part with action." )
227230 end
228231end
229232
230- function Legolando_HelpTipTemplateMixin :Activate (startingPart )
233+ function Legolando_HelpTipTemplateMixin_Angleur :Activate (startingPart )
234+ local teeburu = self .savedVarTable
235+ if not teeburu then
236+ print (" no saved variable table attached" )
237+ return
238+ end
239+ if not self .reference then
240+ print (" no checkbox reference string" )
241+ return
242+ end
243+ if teeburu [self .reference ] == nil then
244+ print (" checkbox reference not found in saved variable table" )
245+ return
246+ end
231247 if startingPart > # self .parts then
232- Angleur_BetaPrint (" Tutorial has already been completed." )
233248 return
234249 end
235250 self .partActive = startingPart
236251 if self .warningFrame then self .warningFrame :Hide () end
237252 self :ShowActivePart ()
238253end
239254
240- function Legolando_HelpTipTemplateMixin :GoToNextPart ()
241- Angleur_BetaPrint (" Going to next part: " )
255+ function Legolando_HelpTipTemplateMixin_Angleur :GoToNextPart ()
256+ local teeburu = self .savedVarTable
257+ if not teeburu then
258+ print (" no saved variable table attached" )
259+ return
260+ end
242261 self .partActive = self .partActive + 1
243- if self .savedTable then
244- self .savedTable . part = self .partActive
262+ if self .reference then
263+ teeburu [ self .reference ] = self .partActive
245264 end
246265 if self .parts [self .partActive ] then
247266 self :ShowActivePart ()
248267 else
249268 self .partActive = nil
250- Angleur_BetaPrint (" Iterating through tutorials over." )
251269 end
252270end
253271
254- function Legolando_HelpTipTemplateMixin :ShowActivePart ()
272+ function Legolando_HelpTipTemplateMixin_Angleur :ShowActivePart ()
255273 thisPart = self .parts [self .partActive ]
256- Angleur_BetaPrint (" ShowActivePart: " , thisPart .text )
257274 self :AnchorAndRotate (thisPart )
258275 self :Layout (thisPart )
259276 self :Show ()
260277end
261278
262- function Legolando_HelpTipTemplateMixin .GetTargetPoint (targetPoint )
279+ function Legolando_HelpTipTemplateMixin_Angleur .GetTargetPoint (targetPoint )
263280 return targetPoint or HelpTip .Point .BottomEdgeCenter ;
264281end
265282
266- function Legolando_HelpTipTemplateMixin .GetAlignment (alignment )
283+ function Legolando_HelpTipTemplateMixin_Angleur .GetAlignment (alignment )
267284 return alignment or HelpTip .Alignment .Center ;
268285end
269286
270- function Legolando_HelpTipTemplateMixin .GetButtonInfo (buttonStyle )
287+ function Legolando_HelpTipTemplateMixin_Angleur .GetButtonInfo (buttonStyle )
271288 local buttonStyle = buttonStyle or HelpTip .ButtonStyle .None ;
272289 return HelpTip .Buttons [buttonStyle ];
273290end
282299 offsetY = offsetY * rotationInfo .modOffsetY ;
283300 return offsetX , offsetY ;
284301 end
285- function Legolando_HelpTipTemplateMixin :AnchorAndRotate (partTable , overrideTargetPoint , overrideAlignment )
302+ function Legolando_HelpTipTemplateMixin_Angleur :AnchorAndRotate (partTable , overrideTargetPoint , overrideAlignment )
286303 local baseTargetPoint = self .GetTargetPoint (partTable .targetPoint );
287304 local targetPoint = overrideTargetPoint or baseTargetPoint ;
288305 local alignment = overrideAlignment or self .GetAlignment (partTable .alignment );
@@ -320,12 +337,12 @@ function Legolando_HelpTipTemplateMixin:AnchorAndRotate(partTable, overrideTarge
320337 partTable .appliedTargetPoint = targetPoint ;
321338end
322339
323- function Legolando_HelpTipTemplateMixin .GetHighlightTextureSize (partTable )
340+ function Legolando_HelpTipTemplateMixin_Angleur .GetHighlightTextureSize (partTable )
324341 if not partTable .highlightTextureSizeMultiplierX then partTable .highlightTextureSizeMultiplierX = 1 end
325342 if not partTable .highlightTextureSizeMultiplierY then partTable .highlightTextureSizeMultiplierY = 1 end
326343end
327344
328- function Legolando_HelpTipTemplateMixin :Layout (partTable )
345+ function Legolando_HelpTipTemplateMixin_Angleur :Layout (partTable )
329346 local targetPoint = self .GetTargetPoint (partTable .targetPoint );
330347 local pointInfo = HelpTip .PointInfo [targetPoint ];
331348 local buttonInfo = self .GetButtonInfo (partTable .buttonStyle );
@@ -373,7 +390,7 @@ function Legolando_HelpTipTemplateMixin:Layout(partTable)
373390 self :SetHeight (height );
374391end
375392
376- function Legolando_HelpTipTemplateMixin :SetHighlightTexture (partTable )
393+ function Legolando_HelpTipTemplateMixin_Angleur :SetHighlightTexture (partTable )
377394 if partTable .hideHighlightTexture == true then return end
378395 local multiX = partTable .highlightTextureSizeMultiplierX
379396 local multiY = partTable .highlightTextureSizeMultiplierY
@@ -391,7 +408,7 @@ function Legolando_HelpTipTemplateMixin:SetHighlightTexture(partTable)
391408 self .featureHighlight :Show ()
392409end
393410
394- function Legolando_HelpTipTemplateMixin :ApplyText (partTable )
411+ function Legolando_HelpTipTemplateMixin_Angleur :ApplyText (partTable )
395412 local info = partTable ;
396413 self .Text :SetText (partTable .text );
397414 local color = info .textColor or HIGHLIGHT_FONT_COLOR ;
@@ -407,14 +424,14 @@ function Legolando_HelpTipTemplateMixin:ApplyText(partTable)
407424 self .Text :SetJustifyH (justifyH );
408425end
409426
410- function Legolando_HelpTipTemplateMixin :AnchorArrow (rotationInfo , alignment )
427+ function Legolando_HelpTipTemplateMixin_Angleur :AnchorArrow (rotationInfo , alignment )
411428 local arrowAnchor = rotationInfo .anchors [alignment ];
412429 local offsetX , offsetY = transformOffsetsForRotation (HelpTip .ArrowOffsets [alignment ], rotationInfo );
413430 self .Arrow :ClearAllPoints ();
414431 self .Arrow :SetPoint (" CENTER" , self , arrowAnchor , offsetX , offsetY );
415432end
416433
417- function Legolando_HelpTipTemplateMixin :RotateArrow (rotation )
434+ function Legolando_HelpTipTemplateMixin_Angleur :RotateArrow (rotation )
418435 if self .Arrow .rotation == rotation then
419436 return ;
420437 end
0 commit comments