WoW:XML/RelDimension: Difference between revisions

From AddOn Studio
< XML
Jump to navigation Jump to search
(Created page with "{{uixml}} RelDimension")
 
mNo edit summary
Line 1: Line 1:
{{uixmltype}}
{{uixmltype}}


[[XML/RelDimension|RelDimension]] is a type used for defining values that relate to the UI coordinate system. See the [[XML/RelValue|RelValue]] and [[XML/Value|Value]] for value pair use types. The RelDimension type can be used for '''Size''', '''Position''' and others, and can be found on [[XML/LayoutFrame|LayoutFrame]], [[XML/Anchor|Anchor]], and others.
[[XML/RelDimension|RelDimension]] is used for defining values that relate to the UI coordinate system. See the [[XML/RelValue|RelValue]] and [[XML/Value|Value]] for value pair use types. The RelDimension type can be used for '''Size''', '''Position''' and others, and can be found on [[XML/LayoutFrame|LayoutFrame]], [[XML/Anchor|Anchor]], and others.


== Inheritance ==
== Inheritance ==

Revision as of 04:00, 18 June 2020

XML UI ← XML types < RelDimension

RelDimension is used for defining values that relate to the UI coordinate system. See the RelValue and Value for value pair use types. The RelDimension type can be used for Size, Position and others, and can be found on LayoutFrame, Anchor, and others.

Inheritance

Inherited by: none, Inherits: none, Defined in: Dimension

Elements

none

Attributes

  • x (float) - defines a scalar value thats horizontally opposed
  • y (float) - defines a scalar value thats vertically opposed

Summary

RelDimension facilitates the 'Layout' mechanism in the WoW UI. RelDimension is differnt from AbsDimension in that it works with a different UI screen coodinate system than AbsDimension does, both of which refer to the same sizes or postions on the same WoW UI screen. AbsDimension uses 'unit based' coodinates, like units -200 through 200 where a value refers to a postion some where in that range. RelDimension uses what can be refered to as 'scalar' coordinates, where there are no 'unit based' coordinates, and values are 'scaled' based on a ratio like 0.0 through 1.0.

Example

<Frame name="MyFrame">
  <Size>
    <RelDimension x="0.5" y="0.5"/>
  </Size>
</Frame>

This example demonstrates use of Dimension with Size and using Rel values.

Details