--------------------------------
gHUD
--------------------------------
gHUD '''= BETA ='''

''' BEFORE INSTALLING A NEW VERSION CLOSE WOW AND DELETE THE gHUD FOLDER '''

my goal was to create a simple hud where the party is included so i have a better overwiev whats going on.

i have a lot of things on my list which i want to add like clickcasting, options to hide frames at certain conditions (for example if you join a raid, the party will hide), option to hide the original frame and so on.

im at a point where i could use some beta testers for some infos about whats good and whats bad. 

if you have any suggestions about changes or improvements for self addon feel free to write them here.


--------------------------------
Commands
-------------------------------- 
*	/ghud

--------------------------------
Optional
--------------------------------
* 	MobHealth3
	http://wowace.com/wiki/MobHealth3
	
-------------------------------- 
ToDo
-------------------------------- 
/console taintLog 1

*	profiles
*	option to change combo points
*	snap frames to other frames
*	seperate fade option for ooc and full hp/mp
*	display mana for druids if in cat/bear form
		-- is it possible? 
		-- solution to display it?
			--split bar?
			--new bar?
		
		--stance = GetShapeshiftForm(self, elapsed);
		Druid 
		0 = humanoid form 
		1 = Bear/Dire Bear Form 
		2 = Aquatic Form 
		3 = Cat Form 
		4 = Travel Form 
		5 = Moonkin/Tree Form 
		6 = Flight Form 
			
		icon, name, active, castable = GetShapeshiftFormInfo(index);
		
*	add checker for palyer max
*	option to activate/deactivate targettarget and party frames in party/raid
	-- option to hide party when joining a raid
		--tt when solo
*	option for seperate unit flash
*	implement flash to the new fade function
* 	move updates to events for better performace
	-how to solve the frame problem?
		- powertype to event
		- scale to event?
		- names to event 
*	add active check to frames
	-- add a routine to only update if frame is visible
*	activate reset buttons
* 	PVP indicator?
*	debuff indicator
* 	aggro indicator, set highlight color?
*	clickcasting support
		-- ClickCastFrames = ClickCastFrames or {}
		-- ClickCastFrames[frametoadd] = true
*	separate mana/health deficit formating?
*	add tooltip for party and targettarget (name, lvl, class)?
* 	fade lost amount?
*	option to change textures    

--------------------------------
known problems
--------------------------------

tainted: 
2/3 00:16:01.194  An action was blocked in combat because of taint from gHUD - MP_PLAYER_FRAME:Show()
2/3 00:16:01.194      Interface\FrameXML\UIParent.lua:2043 UIFrameFade()
2/3 00:16:01.194      Interface\FrameXML\UIParent.lua:2063 UIFrameFadeIn()
2/3 00:16:01.194      Interface\AddOns\gHUD\gHUDFade.lua:218 gHUDFadeIn()
2/3 00:16:01.194      Interface\AddOns\gHUD\gHUDFade.lua:118 gHUDFadeFrame()
2/3 00:16:01.194      Interface\AddOns\gHUD\gHUDColor.lua:98 ColorMana()
2/3 00:16:01.194      Interface\AddOns\gHUD\frames\gHUD_Player.lua:130 MP_Player()
2/3 00:16:01.194      MP_PLAYER_FRAME:OnUpdate(self, elapsed)

2/3 00:16:01.194  An action was blocked in combat because of taint from gHUD - HP_PLAYER_FRAME:Show()
2/3 00:16:01.194      Interface\FrameXML\UIParent.lua:2043 UIFrameFade()
2/3 00:16:01.194      Interface\FrameXML\UIParent.lua:2063 UIFrameFadeIn()
2/3 00:16:01.194      Interface\AddOns\gHUD\gHUDFade.lua:218 gHUDFadeIn()
2/3 00:16:01.194      Interface\AddOns\gHUD\gHUDFade.lua:118 gHUDFadeFrame()
2/3 00:16:01.194      Interface\AddOns\gHUD\gHUDColor.lua:53 ColorHealth()
2/3 00:16:01.194      Interface\AddOns\gHUD\frames\gHUD_Player.lua:86 HP_Player()
2/3 00:16:01.194      HP_PLAYER_FRAME:OnUpdate(self, elapsed)


* 	flashing: performance problem, alpha not set when deactivating
		-- rewrite flash function

*	frame creation: set points for new frames on creation

*	when frames are inactive and activated while in group they are on the player coordinates, 
	also the bars arent visible
		-- create new module for frame creation and read the coordinates of the frames when created

--------------------------------
Changes
--------------------------------
10041:
	fixed: dropdown menus
10040:
	fixed: event handlers

*	blizzard frames wont show on zone change anymore
10032
*	added:		misc option for menu scale


* 	todo:		party pets wont show if deactivated
*	todo:		party pet options will be saved

10031
*	fixed:		error in version check which gave an errormsg when updating from earlier versions

10030
*	added:		misc option to disable mouse input on frames (targettarget frame not working because is OnUpdate)
*	added:		unused frames show when opening the menu and hide again if menu is closed
*	added:		party pet frames
* 	removed:	range fade sliders
*	changed:	file structure
*	fixed:		partypet frame rescaling
*	fixed:		font size and flags should be loaded correctly
*	changed:	menu layout


10029
* 	changed:	updated toc to 20300
* 	fixed:		blizzard frames should stay hidden while option is active (tainted, and still some anomalies)
* 	changed:	seperated the options file

10028
* 	changed: 	updated toc to 20200
*	added: 		combo points (not finished)

10027
*	changed: 	party scaling function
*	changed:	color function
*	changed:	when grouped and player power type ~= 0 then the current value will be displayed and no longer the deficit
*	fixed:		deficit format and mode will now work for all units
* 	fixed:		font size and flags should no longer reset when menu is loaded
*	removed:	invert function

**	test:		hide party when in raid and visversa	
**	test:		new frame creation	(very basic)

10026
*	added: 		option to hide blizzard frames
*	added:		dropdown menu

10025
*	changed:	selected units will fade in if transparent
*	adderd:		options to change the text frame directions

10024
*	changed:	mp bar wont show for units without mana/rage/energy
*	changed:	target and targettarget bars dont fade
*	fixed: 		options will be saved

10023
*	removed: 	old range check
* 	changed: 	seperated files 
*  	changed: 	new color functions for fade "and" range implementation
*	changed: 	shaman color
*	changed: 	frame parenting
*	changed: 	frame enable/disable
*	changed:	disabled flash functtions (will be aviable again in future versions)
*	added:		options for fade and range (range fade options not active)	

10022
* 	changed: toc to 20100
*	changed: elite, rare, rareelite tags
*	fixed:	player max health and mana no longer show deficit when party is hidden 
*	fixed:	name for worldbosses should show correct

10021
*	fixed: gap value will scale with bar height(the higher the bar the bigger the gap can be)
*	fixed: frame alpha should now reset when targeting a unit with a flashing frame

10020
*	fixed: targettarget mana frame should now show/hide correct
*	fixed: a height problem with party frame 1
*	changed: name functions
*	changed: each frame can now be moved separate
*	added: table values for separate bar positions
*	added: option for party frame gap

10019
*	changed: name function
*	changed: frame enable/disable function
*	changed: removed unused globals
*	changed: name format min from -1 to 1
* 	changed: class/powertype color functions
*	changed: rewrote table based on units
*	changed: added player, target, pet and tt names to name function
*	changed: level will not show if unit is oor
*	changed: name offset to 4px
*	fixed: mana max color should recolor depending on the unitpowertype
*	fixed: typo in pet name function
*	fixed: a problem with frame scaling
*	fixed: targettarget manabar should show again if target has no mana
*	added: fade and rangefade command (do not activate range function!)
*	added: unit check to name functions
*	added: rare (-R-) and elite (-E-) letter to name for target and targettarget

10018
* 	fixed: some values for bar flash corrected which caused strange flash behavior
*	added: frames for selected units will be highlighted
*	fixed: frames should now show after flash ends

10017
*	some code cleanup
*	mana frames should now fade out if unit has 100% mana and is ooc
*	mana frames should now fade in if unit has <100% mana and is inc
*	health frames should now fade out if unit has 100% mana and is ooc
*	health frames should now fade in if unit has <100% mana and is inc
*	deficit and name offset adjusted

10016
*	fixed a typo

10015
*	added option to change max value to current/deficit/max when grouped
*	changed options table
*	fixed a problem with max health/mana display
*	added menu frames
*	made all functions available in the manu (NOT SAVED)
*	menu options will be saved per character
*	fixed a problem with loading options

10014
*	fixed some more anchor issues
*	increased framewidth to 12px
*	max health and mana values will turn into deficit if in party and not max
*	changed party scale code (not tested the combat problem)

10013
*	separated name show/hide and name formating
*	added options to change the min/max value of deficit display for player/target/party/pet/targettarget
*	rearanged name and current frames
*	fixed some anchor issues
*	removed current value
*	deficit for player will now be displayed in the max frame when in party
*	party frames will now rescale depending on the number of party members

10012
*	added unit names
*	names recolor to UnitClass

10011
*	fixed targettarget and pet bar scaling problem
*	optimized color code
*	manabars should now recolor to grey if unit is dead/ghost/disconnected/trivial/tapped by other unit
*	fixed a problem with target and targettarget manaframe
*	added bar and background flash commands
*	fixed bar/background flash problem
*	removed frame lock/ublock
*	fixed party/pet/targettarget frmae show/hide

10010
*	new highlight texture
*	fixed background frame levels

10009
*	fixed party bar scaling when joining bg's (i hope its really fixed self time)
*	removed background textures
*	fixed deficit formating

10008
*	fixed frame flash
*	manabar should now hide again if unit has no mana/rage/energy/focus
*	recoloring for target rage fixed

10007
*	fixed problem with target frame
*	fixed hiding frames

10006
*	added option to change the party mana deficit to current value
*	fix for party bar scaling when joining raids
*	units can now be selected over the frames
* 	frame indicator for mouse over added

10005
*	added commands to show/hide pet, party and targettarget frames
*	if party is hidden player deficit will show when in group
*	added option to change the party healt deficit to current value

10004
*	changed pet parent frame from player to party frame
*	added MobHealth3 support for target and targettarget

10003
* 	targettarget manabar should no be hidden if target selects a target without mana
*	manabar of party and target should now recolor correct
*	added deficit formatsw

10002
*	fixed deficit display
*	disabled low value flash
*	manabar should not show for npc's without mana/rage/focus/energy
*	targettarget should now hide when deselected by target
*	added position variables and load position

10001
*	separated functions
*	separated events and loadings
*	added targettarget
*	separated color functions

--------------------------------
by Mahiro/Grognaz Aegwynn(EU)
--------------------------------