Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework text replacements to allow %#.variable #913

Merged
merged 1 commit into from Jul 7, 2019

Conversation

Projects
None yet
5 participants
@InfusOnWoW
Copy link
Contributor

commented Nov 1, 2018

Where # is a trigger number.

@Stanzilla Stanzilla added this to the 2.10.0 milestone Nov 4, 2018

@Stanzilla Stanzilla referenced this pull request Nov 7, 2018

Closed

[Use-Case] Healthstone #929

@Stanzilla Stanzilla requested a review from emptyrivers Nov 7, 2018

@InfusOnWoW InfusOnWoW force-pushed the InfusOnWoW:smallpatches branch 3 times, most recently from cd978a1 to 696af4d Nov 17, 2018

@Stanzilla Stanzilla modified the milestones: 2.10.0, 2.11.0 Nov 27, 2018

@InfusOnWoW InfusOnWoW force-pushed the InfusOnWoW:smallpatches branch 3 times, most recently from 3de965a to 98ea586 Dec 2, 2018

@InfusOnWoW InfusOnWoW force-pushed the InfusOnWoW:smallpatches branch from 98ea586 to e35c426 Dec 21, 2018

@InfusOnWoW InfusOnWoW force-pushed the InfusOnWoW:smallpatches branch from 51802c9 to 5002156 Jan 4, 2019

@Stanzilla

This comment has been minimized.

Copy link
Contributor

commented Jan 7, 2019

What's the status here? I guess we'll move it to 2.12 anyway, right?

@InfusOnWoW

This comment has been minimized.

Copy link
Contributor Author

commented Jan 7, 2019

Yes it's not yet ready.

Made quite a bit of progress in my winter vacation, but also was a under the weather for a week or so, so didn't finish it.

There are only few remaining issues left, and obviously a bunch of testing.

@Stanzilla Stanzilla modified the milestones: 2.11.0, 2.12 Jan 7, 2019

@InfusOnWoW InfusOnWoW force-pushed the InfusOnWoW:smallpatches branch from 5002156 to c4fd607 Feb 10, 2019

@InfusOnWoW InfusOnWoW force-pushed the InfusOnWoW:smallpatches branch from c4fd607 to b25f76e Feb 17, 2019

@Stanzilla Stanzilla modified the milestones: 2.12.0, 2.13.0 Feb 22, 2019

@InfusOnWoW InfusOnWoW force-pushed the InfusOnWoW:smallpatches branch 2 times, most recently from 4bb7c40 to f4f6ace Mar 17, 2019

@InfusOnWoW InfusOnWoW force-pushed the InfusOnWoW:smallpatches branch from f4f6ace to 2f02177 Apr 7, 2019

@InfusOnWoW InfusOnWoW force-pushed the InfusOnWoW:smallpatches branch from 7e9e7b7 to 2f1016d Jun 10, 2019

@Causese

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

WAs that had a condition and text 1 - color - alpha as property change (2.12.4.2) are blank with branch
try https://wago.io/M28UoTFSh

@Causese

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

Create a new bar and immediately convert it to icon
3x WeakAuras\RegionTypes\Icon.lua:247: <unnamed>:SetPoint(): Unknown region point

error doesn't happen when converting a non-bar region to bar and then to icon

@InfusOnWoW

This comment has been minimized.

Copy link
Contributor Author

commented Jun 10, 2019

@Causese Gift of N'Zoth having no icon is expected now. There's no a fake OPTIONS event sent to a aura, to which the aura should respond with what it wants to be shown in the options.

@InfusOnWoW

This comment has been minimized.

Copy link
Contributor Author

commented Jun 10, 2019

On https://wago.io/M28UoTFSh I get a " Error: page_not_accessible "

@Causese

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

odd behaviour: https://i.gyazo.com/bfcef5e836f244f0ad3d25549c913a8d.gif
import: https://wago.io/buffchecker'
same thing for all other auras

@Causese

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

make: (region type: icon)

error:
1x ...aceWeakAuras\RegionTypes\RegionPrototype.lua:214: attempt to index local 'options' (a nil value)

@Causese

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

display doesn't show "anchor-related-display-settings" when selecting group and visiting display tab
to reproduce just make a dynamic group with 2 icons, select the group and visit display tab.

@Causese

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

text is anchored left/center-ish instead of bottom right. (similar to the issue where things anchored to the center instead of bottom right)
however this time around it's not fixed by changing it to a different anchor position and then back.

duplicating/importing the aura fixes it therefore u need my SV to reproduce.

Aura name is: Ice Barrier
WeakAuras.zip

@Causese

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2019

condition fire when clicking the aura while in options so it could probably also use the WeakAuras.IsOptionsOpen() treatment that you recently added to trigger.

To reproduce:

  1. make an icon aura
  2. add condition if active true then run custom code
  3. add SendChatMessage("Hi" , "SAY") in custom code field
  4. every time u select the aura and it's visible, the message will fire.

this does not happen on 2.12.4.2

@Causese

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2019

the change you did to stop trigger update from spamming also has to be done for text region.
to reproduce:

  1. Make a text type aura
  2. add %c with following code (trigger update)
function()
    if aura_env.state then
print("spam")
    end
end

@Causese

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2019

Deleting big groups with text-rewrite branch causes
1x ...aceWeakAuras\RegionTypes\RegionPrototype.lua:87: script ran too long
and only deletes about 20 auras per attempt to delete the entire group, and causes the error for each attempt until 117 ish auras are left.

it works in one go on 2.12.4.2

example aura:
https://wago.io/kR7bGhWG5

feel like u might not be able to do something about this when it reaches a certain amount of auras, but still wanted to mention it since it's a popular package.

@InfusOnWoW

This comment has been minimized.

Copy link
Contributor Author

commented Jun 15, 2019

I can't reproduce the problem with the Ice Barrier aura. Even with your settings the text is in the bottom right.

Yes, we now run the custom text functions while the options are open. That's a intended change. If you use print in there, you get what you asked for...

I've disabled the built-in SendChat/Play Sound/Run Code though.

I've made deleting groups faster so that the script run to long should not appear.

@InfusOnWoW InfusOnWoW force-pushed the InfusOnWoW:smallpatches branch from a86a18e to 6bce65d Jun 15, 2019

@InfusOnWoW

This comment has been minimized.

Copy link
Contributor Author

commented Jun 15, 2019

Also rebaed now.

@@ -1293,15 +1293,15 @@ function WeakAuras.DeleteOption(data)
thumbnails[id] = nil;
displayButtons[id] = nil;

if(parentData and parentData.controlledChildren) then
if(parentData and parentData.controlledChildren and not massDelete) then

This comment has been minimized.

Copy link
@emptyrivers

emptyrivers Jun 15, 2019

Contributor

cute

@InfusOnWoW

This comment has been minimized.

Copy link
Contributor Author

commented Jun 15, 2019

Text placement and custom functions in trigger update mode for text auras is fixed.

iconHeight = region:GetHeight()
end

print("UpdateInnerOuterSize ", iconWidth, iconHeight)

This comment has been minimized.

Copy link
@Stanzilla

Stanzilla Jun 15, 2019

Contributor

todo

@Causese

This comment has been minimized.

Copy link
Contributor

commented Jun 16, 2019

%p from text auras doesn't update anymore, stuck at max duration
simply make a text aura, use %p and apply a buff to yourself that has a duration

@Causese

This comment has been minimized.

Copy link
Contributor

commented Jun 20, 2019

import: https://wago.io/EJ-oJ_8tb
error: Message: [string "--[[ Error in 'Combo Points - Feral' ]] ret..."]:3: attempt to perform arithmetic on field 'cloneId' (a string value)
line 3 in animation code probably causese the error

@InfusOnWoW

This comment has been minimized.

Copy link
Contributor Author

commented Jun 20, 2019

@Causese There's a change in that we now run the trigger functions with a special OPTIONS event from the options, so that TSU auras can adjust their states as they wish. That'll break some auras, and thus I've opted to hide errors from various places for that code path. I've added the same hiding of errors for animations now.

@InfusOnWoW

This comment has been minimized.

Copy link
Contributor Author

commented Jun 30, 2019

I need to test the "in game update" problem. That is, if the user upgrades while wow is running SubText won't be loaded and I need to figure out what that means for the modernize code.

@InfusOnWoW InfusOnWoW force-pushed the InfusOnWoW:smallpatches branch from 2c55f4f to 0111562 Jul 6, 2019

@InfusOnWoW

This comment has been minimized.

Copy link
Contributor Author

commented Jul 6, 2019

And there was indeed a problem with not restarting where all texts would have been lost...

Rework text handling and introduce the concept of sub regions
* This merges the text handling from both icons and aurabars.
* And adds it to Textures and Progress Textures
* Texts still use their own handling
* It adds multiple new anchor options:
  * For icons a option to anchor directly on the edge
  * For aurabars a middle and spark option
  * X/Y Offsets can be set
* This removes a feature where progress bar texts would elide instead of
  overlapping.
* This adds shadow options to all texts, that is color, x/y offset
* This adds infinite number of texts to each region
* This adds a way for custom triggers to provide fake states for the
  options
* This adds text replacements from all triggers via e.g. %2.p
* This allows hiding/showing texts via conditions
* The Options now show fake states which are created by the trigger
   systems. This allows custom triggers to create custom states for the
   options via the OPTIONS event

Ticket-Nr: 944
Ticket-Nr: 934
Ticket-Nr: 550
Ticket-Nr: 307
Ticket-Nr: 59
Fixes: #1245
Fixes: #929

@InfusOnWoW InfusOnWoW force-pushed the InfusOnWoW:smallpatches branch from 0111562 to cd29af5 Jul 7, 2019

@Stanzilla Stanzilla merged commit a753a5d into WeakAuras:master Jul 7, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.