--[[----------------------------------------------------------------------------
  ReMinimap.lua
  Author:	phresno
  Version:	1.2 (Light)
  Revision:	3
  Created:	2006.06.27
  Updated:	2006.07.15

  See ChangeLog.txt for changes.

  See Readme.txt for more information.
------------------------------------------------------------------------------]]

RMM_VERSION     = "1.2 Light";
RMM_VERSION_STR = "ReMinimap "..RMM_VERSION;

--------------------------------------------------------------------------------
-- Main Program Control & Config Functions
--------------------------------------------------------------------------------

function Rmm_OnLoad()
   -- register events
   this:RegisterEvent("VARIABLES_LOADED");

   Rmm_Print(RMM_VERSION_STR.." loaded.");
end

function Rmm_OnEvent()
   if ("VARIABLES_LOADED" == event) then
      MinimapZoomIn:Hide();
      MinimapZoomOut:Hide();
      GameTimeFrame:Hide();
      MiniMapWorldMapButton:Hide();
      MinimapToggleButton:Hide();
      MinimapBorderTop:Hide();    
   end
end

-- 미니맵 위치지정 --

	Minimap:ClearAllPoints();
	Minimap:SetPoint("TopRight",UIParent,"TopRight", -20, -35);

-- 텍스쳐 --
	MinimapBorder:SetTexture("Interface\\AddOns\\ReMinimap\\images\\minimapbg");
-- 크기
	MinimapBorder:SetWidth(192);
	MinimapBorder:SetHeight(192);
-- 투명도
	MinimapBorder:SetAlpha(1.0);
-- 위치
	MinimapBorder:ClearAllPoints();
	MinimapBorder:SetPoint("topright", Minimap, "topright", 25, 50);
-- 코드
	MinimapBorder:SetTexCoord(0,1,1,0);

-- 추적아이콘 위치지정



--미니맵 지역 텍스트 변경(윈드미니맵 참조) 알렉zean 얼쑤~---

		MinimapZoneTextButton:SetPoint("TOP","Minimap","TOP", 0, 28);
		MinimapZoneText:SetPoint("TOP","MinimapZoneTextButton","TOP", 0, 5);
		MinimapZoneText:SetFont("Interface\\AddOns\\ReMinimap\\Fonts\\ReMinimap.TTF",16);
		MinimapZoneText:SetShadowOffset(1,-1);

-- mousewheel zoom control (rewritten from Square Minimap; uses Blizz functions)
function Rmm_OnMouseWheel(_chng)
   if (_chng > 0) then
      Minimap_ZoomIn();
   elseif (_chng < 0 ) then
      Minimap_ZoomOut();
   end
end

-- print a message
function Rmm_Print(_text)
   if (_text) then DEFAULT_CHAT_FRAME:AddMessage(_text); end
end

--****** 툴팁이동 *********
-- 툴팁이동 --
function GameTooltip_SetDefaultAnchor(tooltip, parent)
		tooltip:ClearAllPoints();
		tooltip:SetOwner(parent, "ANCHOR_NONE");
		tooltip:SetPoint( "Top", "UIParent", "Top", 0, -80 );  --좌표설정부--
		tooltip.default = 1;
end
