-
Posted by mlejnek on Mon, 04 May 2009 12:39:15
I'm new to addons and trying to learn the techniques by fooling around with the book. I want my texture to be the edge of the entire screen and be able to auto adjust to different resolutions. How would I do that? I currently have a 1080p, 21.6" monitor and want the texture to work with user adjustments to monitor settings. If I do [RelDimension x="1.0" y="1.0"] the image is off the screen on top. Currently, it works as set but if I switch monitors I'll have to readjust. Help would be awesome. Here is the part I need help with. Thanks.
<Frame name="CombatTrackerHealthFrame" parent="UIParent" setTopLevel="false" hidden="true" frameStrata="BACKGROUND" enableMouse="false" setAllPoints="true"> <Size> <RelDimension x="1.0" y="0.56"/> </Size> <Anchors> <Anchor point="CENTER"/> </Anchors> <Layers> <Layer level="BACKGROUND" setAllPoints="true"> <Texture name="$parentBloodBorder" file="Interface\AddOns\CombatTracker\Textures\bloodedge" setAllPoints="true" setBlendMode="ADD"/> <Color r="1" b="0" g="0" a="1"/> </Layer> </Layers> <Scripts> <OnLoad> CombatTracker:OnLoad() </OnLoad> </Scripts> </Frame>
-
Posted by jnwhiteh on Mon, 04 May 2009 16:37:39
Two things.. first you don't need to change your XML code.. just highlight it in the editor and press the code button to turn it into code. I fixed the issue that was happening with the code button.
Second, don't SIZE your frame, ANCHOR your frame.
<Frame parent="UIParent"> <Anchors> <Anchor point="TOPLEFT"/> <Anchor point="BOTTOMRIGHT"/> </Anchors> </Frame>
The texture will then always be the full size of the screen, regardless of what resolution or size the user has.
-
Posted by mlejnek on Mon, 11 May 2009 12:15:41
Works great! Thanks!