WoW:UIOBJECT WorldFrame: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:
'''WorldFrame''' is the frame that displays the 3D world. You can have only one instance of WorldFrame. There is not much you can do to a WorldFrame, so it is best to leave the WorldFrame [[object]] in [[WoW]] alone.
'''WorldFrame''' is the frame that displays the 3D world. You can have only one instance of WorldFrame. There is not much you can do to a WorldFrame, so it is best to leave the WorldFrame [[object]] in [[WoW]] alone.


== Pasted from [http://www.wowcompares.com/live/FrameXML/WorldFrame.xml WorldFrame.xml] ==
== Pasted from [http://wow.go-hero.net/framexml/15595/WorldFrame.xml WorldFrame.xml] as of [[Patch 4.3.4]] build 15595 ==
This special frame is used to render the world.
  <!--
There can be only one of these frames!!
    This special frame is used to render the world.
The world is rendered in the background of the frame.
    There can be only one of these frames!!
Children of the world frame are visible even when the UI is turned off.
      The world is rendered in the background of the frame.
    Children of the world frame are visible even when the UI is turned off.
   
   
You can move/resize this frame by doing something like the following:
    You can move/resize this frame by doing something like the following:
/script WorldFrame:ClearAllPoints(); WorldFrame:SetPoint("TOPLEFT", 32, 0); WorldFrame:SetPoint("BOTTOMRIGHT", -32, 32);
    /script WorldFrame:ClearAllPoints(); WorldFrame:SetPoint("TOPLEFT", 32, 0); WorldFrame:SetPoint("BOTTOMRIGHT", -32, 32);
which is wide-screen aware, or...
    which is wide-screen aware, or...
/script WorldFrame:ClearAllPoints(); WorldFrame:SetWidth(960); WorldFrame:SetHeight(736); WorldFrame:SetPoint("CENTER", 0, 32);
    /script WorldFrame:ClearAllPoints(); WorldFrame:SetWidth(960); WorldFrame:SetHeight(736); WorldFrame:SetPoint("CENTER", 0, 32);
which assumes 4x3 aspect ratio...
    which assumes 4x3 aspect ratio...
You also can type:
/script WorldFrame:SetScale(value) Default is 1. This only affects Nameplates and will not be saved through relogs or ui reloads.
   
   
If you want to have the WorldFrame size/position saved, you can do:
    If you want to have the WorldFrame size/position saved, you can do:
/script WorldFrame:SetUserPlaced(true);
    /script WorldFrame:SetUserPlaced(true);
   
   
If you want to reset the WorldFrame's size and position, you can do:
    If you want to reset the WorldFrame's size and position, you can do:
/script WorldFrame:SetUserPlaced(false);
    /script WorldFrame:SetUserPlaced(false);
and then log out or reload the UI
    and then log out or reload the UI
-->

Revision as of 16:14, 2 August 2012

Widget API < WorldFrame

WorldFrame is the frame that displays the 3D world. You can have only one instance of WorldFrame. There is not much you can do to a WorldFrame, so it is best to leave the WorldFrame object in WoW alone.

Pasted from WorldFrame.xml as of Patch 4.3.4 build 15595

 <!--
    This special frame is used to render the world.
    There can be only one of these frames!!
      The world is rendered in the background of the frame.
    Children of the world frame are visible even when the UI is turned off.

    You can move/resize this frame by doing something like the following:
    /script WorldFrame:ClearAllPoints(); WorldFrame:SetPoint("TOPLEFT", 32, 0); WorldFrame:SetPoint("BOTTOMRIGHT", -32, 32);
    which is wide-screen aware, or...
    /script WorldFrame:ClearAllPoints(); WorldFrame:SetWidth(960); WorldFrame:SetHeight(736); WorldFrame:SetPoint("CENTER", 0, 32);
    which assumes 4x3 aspect ratio...

    If you want to have the WorldFrame size/position saved, you can do:
    /script WorldFrame:SetUserPlaced(true);

    If you want to reset the WorldFrame's size and position, you can do:
    /script WorldFrame:SetUserPlaced(false);
    and then log out or reload the UI
-->