Download
(5 MB)
Download
Updated: 05-27-18 01:29 AM
Pictures
File Info
Updated:05-27-18 01:29 AM
Created:05-04-12 03:55 PM
Downloads:48,862
Favorites:152
MD5:
Gadgets  Popular! (More than 5000 hits)
Version: 0.11.01
by: Wildtide, adelea, lifeismystery
Wish List

Write here your thoughts about what you wish to be added or change with Gadgets.

How to...

I create "How to" page, where i'm write frequently asked questions.

Video guide about gadgets configuration and capability

I made it with example of my own UI.

It have five parts:
  1. Part 1. Standart Rift UI setup
  2. Part 2. Addon Gadgets setup ( Heal_profile )
  3. Part 3. Addon Gadgets: Buffs setup ( for Heal_profile )
  4. Part 4. Addon Gadgets setup (how to make DPS profile from our HEAL profile)
  5. Part 5. Addon Gadgets Macros setup

All of them you can find here

Lost Your Button?

If you ever lose your Gadget button, type /gadget reset into chat to put it back in the centre of your screen.

Latest Update

v0.10.15
* Added Black/White List to Raid frames for next template:
** HealFrame,
** LifeRaidFrame1 ,
** LifeRaidFrame2,
** LifeRaidFrameCallingCilor

Included Gadgets
  • Buff Bars
  • Buff Icons
  • CPU Monitor
  • Cast Bar
  • Cast Bar Presets
  • Charge Meter
  • Combo Points
  • CurrenciesTextBar
  • DPS:Encounter
  • DPS:Live
  • DataTextBar
  • FPS Monitor
  • StatTextBar
  • FPS Monitor
  • Faction Panel
  • Free Memory
  • Group Frames
  • HPS:Live
  • HUD Arcs
  • LifeComboPoints
  • Planar Charge
  • Raid Frames
  • Range Finder
  • Range Traker
  • Reload UI
  • Soul Vitality
  • Stat Text Bar
  • System Usage
  • Unit Frame
  • Unit Frame Presets
  • XP Bar
  • XP Percent

See section 2.0 in the readme (below) for more detail on these.


Grid Snapping

Typing "/gadgets grid 8" for example, will snap all movement and resizes to an 8 pixel grid.
Type "/gadgets grid" with no number to reset snapping.


Quick Start



You will see a round button with a Gear icon in the middle of your screen. Drag this button to where you want it by left clicking and dragging.

Right click on the button and choose 'Add Gadget' to add a gadget to your screen.

Left clicking on the button will unlock (and re-lock) all of your gadgets. When unlocked, Gadgets can be moved by dragging their movement handles (the white gear icon at the top corner of each gadget).

To alter an existing gadget, right click on it's movement handle while gadgets are unlocked, and choose 'Modify Gadget'.

When moving gadgets around on the screen, you can align them to another gadget by dragging the move handle over the top of another move handle. The gadget you are dragging will align itself either horizontally or vertically with it. If you move the gadget too far from the horizontal or vertical axes, alignment mode will turn off (it should hopefully become clear when you try it!).

Macros

The raid and group frames allow you to specify macros for various mouse buttons and the mouse wheel. These are standard RIFT macros, with a couple of extra Gadgets features:

Use @unit to refer to the unit the frame is showing. For example "cast @unit Healing Breath".

Use modifer it you want:

Code:
cast [shift] @unit Symbol of the Torch
cast Symbol of the Sun
Use the following syntax to have a macro carry out different actions depending on your current role:

Code:
:if role == 1 or role == 6 then
target @unit
:end
:if role == 2  then
target @unit
cast Healing Spray
:end
:if role == 3 or role == 4 or role == 5 then
cast [shift] @unit Symbol of the Torch
cast @unit Symbol of the Sun
:end
Profiles

Save, load and delete your profiles. How to save, load and delete your profiles you can see on my video guide http://www.youtube.com/watch?v=Tr7bcidyFv8&;

Notes

I have borrowed some images from other people. I believe the licenses on these sources allow this, but if not, I will replace them.

- Various bar textures from LibSharedMedia (WoW addon)
- Orb images from Roth UI (WoW addon)
- A few images from the Rift Fansite Kit
v0.11.01
* fixed mouseover issue for raid frames ( aileen )

v0.11
* Added aileen's changes (http://forums.riftgame.com/technical-discussions/addons-macros-ui/315634-addon-gadgets-67.html#post5353056)
* Change UnitFramePreset (you need to recreate it if you have).
* Add preview to UnitFramePreset.
* Clear code(trim trailing space)
* Delete not necessary images

v0.10.19
* update game version
* fixed error: Currencies Text Bar
* fixed error: XP Bar
* fixed error: get error when open Settings without any layouts

v0.10.17
* just fixed Currencies Text Bar

v0.10.15
* Added Black/White List to Raid frames for next template:
** HealFrame,
** LifeRaidFrame1 ,
** LifeRaidFrame2,
** LifeRaidFrameCallingCilor

v0.10.9
* fixed CastbarPresets
* update LibDraggable

v0.10.8

* CastBarPresets: you see cast after teleport - fixed
* Add callingcolor for primalist
* Fixed bug with delete profile
* Added new UnitFramePresets (Beta version)

v0.10.7
* Added new CastbarPresets
* Added Grid when gadgets unlock (setup it in GadgetsSettings) - grid copied from Align addon, so thanks author to done this
* Added AlertList for RaidFrames (setup it in GadgetsSettings, works with GJK.lua
* Fixed combo points

v0.10.2
* Fixed ui of profile page

v0.10.0

* <<color #ff001d>>Gadgets: Buffs now added to Gadgets addon, no need to separate install it<</color>>
* New Gadgets UI
* LibSimpleWidgets_LifeEdition
* sorted all fonts
* Add option Smart Range Text
* Fixed - Shard name text
* Fixied - add option to show/don't show buffs for SimpleFrame

v0.8.5

* New Combo Points

v0.8.5

1) Combo Points Gadget
* Add option to display it by text, choose text size and font
2) Stat Text Bar
* Add option to choose text size
* Add option to choose text font
* Add option to show light text outline
3) XP Bar
* Add option to choose text size
* Add option to choose text font
* Add option to show light text outline
* Add option to show Text above Bar
4) XP Percent
* Add option to choose text size
* Add option to choose text font
* Add option to show light text outline * Add option to don't show text "EXPERIENCE"
* Add option to don't show background

v0.8.4

* Fixed HideCastBar option.

v0.8.3

* Add option to change font size range text in RangeFinder
* fixed cast bar

v0.8.2

* Fixed CastBar icon error
v0.8.1

* Add options to change font and font size in CastBar, ChargeMater, RangeFinder, DataTextBar, StatTextBar

v0.8.0

* Add new UnitFrames
** HPframe
** Manaframe
* Add new option to CastBar
* Add new option to ChargeMeter
* Change font/text in ChargeMeter * Fix some outline text in DataTextBar

v0.7.2

* Add tier icon to LifeUnitFrame template
* Add option to add specific debuff for LifeRaidFrame template, yellow color

v0.7.1
* fix XPBarGadget

v0.7.0

* fix StatTextBar for 3.0
* fix marks icon

v0.6.2

* D3 combo point fix

v0.6.0

* Added new currencies type "Promotions"
* Range finder - Add option to select from where will be range to target calculating, from centre or from edge of hit box.
* Diablo combo points

v0.5.9

1. DataTextBar
* Fixed. Shard Name

2. Added CurrenciesTextBar.

3. Unit Frame
* Added options to display combo points.

4. Raid frames
* Visible in Group: Solo - now it's work.

v0.5.7

1. DataTextBar:
* Added options to turn on/off each item on the DataTextBar.
* Added Shard Name - Added options disable Background.
* Added options to change Background color.
* Fixed money position

2. Unit Frame
* Added options to turn on/off short name on frame.
* Added options to turn on/off unit's HitBox on frame.

3. Raid Frame
* Added option to change growthDirection="up"/"down" in game.
* Fixed out of range bug.

4. Fps-gadget
* Added options disable Title.
* Added options disable Background.
* Added options to make font smaller.
* Added options to change FPS font color.

5. StatTextBar
* Added StatTextBar with all player stats. Look like DataTextBar
* Added options to turn on/off any Stat.
* Added options disable Background.
* Added options to change Background color.

6. Group Frame
* Fixed Debuff position on LifeGroupFrame2
* Fixed Absorb position on LifeGroupFrame2

v0.5.61

* Added all new raid mark.

v0.5.6

* Added new template LifeUnitFrame1 - with green health
* Added new template LifeUnitFrame2 - with green health and big resource bar
* Added new template LifeMageFrame - with charge bar for mage
* Added new template LifeGroupFrame - with green health
* Added new template LifeGroupFrame2 - with green health and big resource bar
* Added new template LifeTargetOfTarget - with green health
* Added new template LifeRaidFrame1 - with green health
* Added new template LifeRaidFrameCallingColor - with calling color health
* Added cast bar to all unit frame
* Changed color level, now it's look like standart frame
* Changed color name, now it's look like standart frame
* Added icon boss on unit frame when target/focus, now it's look like standart frame
* Added icon mentor level on unit frames, now it's look like standart frame

v0.5.51

Added new texture pack from WoW SharedMedia (all of them can colorize). Change menu for texture select.(Now you can select texture by using keys up/down on your keybord)
Some VirtualProperty move from Lifeismystery frames
Fixed Vitality in DataTexBar

v0.5.4

Change RangeFinder:

Add options Small Font, Change font color.

Change XPBar:

Fixed bug with wrong illustration reputation bar when text off.
Add options: Change bar color, Change bar Texture, Change background bar in Transparent background.

v0.5.3

Change Fraction Panel:

Added option to tracks specific fraction reputation
Added option to change bar texture
Added option to change bar color
Added option to change background bar color
Added option to unshow background frame
Added option to doing Transparent background frame

Update which could manage and show the life % debuff(HealthCap)
fix bug: After i doing reloadui in raid i can't target any unit. When i moving mouse on unit i see tooltip, but when i do left click nothing happens, unit cant selected. Only logout help me, or teleporting or die.
Fix Gadgets bug affecting gadgets:outfitter
fix HealthCap

v0.5.1
fix DataTextBar_name/desc
v0.5.1
Author: lifeismystery
Change cast bar:
Add :Checkbox("TransparentCastBar", "Transparent cast bar", false) - doing Transparent cast bar
Add :Checkbox("Border", "Show cast bar border", false) - it make visible cast bar border
Add :Checkbox("largeCastFont", "Larger cast font", false) - doing Larger cast font
Add outline font

Add new gadget - DataTextBar
- This gadget displays DataText bar with FRS, CPU, Planar charge, Soul vitality, Money and button 'ReloadUI'

v0.4.92
Author: lifeismystery
Added possibility save, load and delete your profiles.
How to save, load and delete your profiles you can see on my video guide http://www.youtube.com/watch?v=Tr7bcidyFv8&;

Author: Adelea
Convert frame events: KeyDown, TextfieldChange, ScrollbarChange, Size
Convert all button LeftPress
Convert all frame UpOutside
Convert all frame MouseIn MouseOut MouseMove WheelForward WheelBack
Convert all frame Mouse4Down + Mouse5Down
Convert all frame RightDown + MiddleDown
Convert all frame RightClick
Convert all frame LeftUp
Convert all frame LeftDown
Convert all frame LeftClick

v0.3.104
- Updated range finder to use built in range calculation
- Altered range property to take radius into account
- Increased frequency of range calculation
- Updates to cast bar to add option for small cast time text
- Added mask to cast bar so that spell names are cut off before timer
- Added Adelea's gradient textures

v0.3.103
- Stored the owning addon for each registered Gadget so that calls can be dispatched. Fixed nil element id error in resizable code.
- Fixed rename issue with adCastbar -> Castbar

v0.3.102
- Added Adelea's updates to castbar and XP bar gadgets
- Updated to latest version of LibSimpleWidgets
- Updated LibUnitChange's toc
- Updated to latest LibUnitChange
- Removed list of Gadgets on initialisation
- Fixed incorrectly sized role icon on standard frame
- Removed spurious debug message when enabling an animation
- Fixed scaling in ImageSet when height/width set
Optional Files (0)


Archived Files (51)
File Name
Version
Size
Author
Date
0.11
5MB
Wildtide
05-26-18 04:46 PM
0.10.19
10MB
Wildtide
05-13-18 01:09 PM
0.10.17
10MB
Wildtide
08-20-16 07:16 AM
0.10.16
10MB
Wildtide
12-27-15 06:44 AM
0.10.15
10MB
Wildtide
12-26-15 07:50 AM
0.10.9
10MB
Wildtide
11-30-15 02:10 AM
0.10.8
10MB
Wildtide
10-04-15 01:49 PM
0.10.7
10MB
Wildtide
08-30-15 11:35 AM
0.10.2
9MB
Wildtide
07-20-15 02:05 PM
0.10.0
9MB
Wildtide
07-18-15 02:49 AM
0.8.6
8MB
Wildtide
05-12-15 07:00 AM
0.8.5
8MB
Wildtide
05-05-15 05:28 AM
0.8.4
8MB
Wildtide
04-22-15 05:59 AM
0.8.3
8MB
Wildtide
04-10-15 01:52 AM
0.8.2
8MB
Wildtide
04-09-15 06:12 AM
0.8.0
6MB
Wildtide
04-08-15 01:30 PM
0.7.2
4MB
Wildtide
12-07-14 03:05 AM
0.7.1
4MB
Wildtide
10-22-14 12:26 PM
0.7.0
4MB
Wildtide
10-22-14 09:10 AM
0.6.3
4MB
Wildtide
06-24-14 12:32 AM
0.6.2
4MB
Wildtide
05-04-14 10:09 AM
0.6.0
4MB
Wildtide
05-01-14 11:13 PM
0.5.91
4MB
Wildtide
01-03-14 11:31 AM
0.5.9
4MB
Wildtide
01-03-14 09:22 AM
0.5.7
4MB
Wildtide
12-01-13 03:04 AM
0.5.61
4MB
Wildtide
11-08-13 04:28 AM
0.5.6
4MB
Wildtide
11-03-13 02:45 AM
0.5.51
4MB
Wildtide
10-16-13 06:11 AM
0.5.4
4MB
Wildtide
10-06-13 03:37 AM
0.5.3
4MB
Wildtide
10-01-13 02:39 PM
0.5.2
4MB
Wildtide
09-23-13 01:21 AM
0.5.1
4MB
Wildtide
09-22-13 11:58 PM
0.4.92
4MB
Wildtide
09-17-13 01:25 PM
0.4.8
3MB
Wildtide
07-04-13 05:39 PM
0.4.7
3MB
Wildtide
07-04-13 02:44 PM
0.4.6
3MB
Wildtide
06-21-13 03:37 PM
0.4.5
3MB
Wildtide
06-17-13 11:56 AM
0.4.4
3MB
Wildtide
06-16-13 05:45 PM
0.4.3
3MB
Wildtide
06-15-13 06:02 AM
0.4.2-beta
3MB
Wildtide
06-15-13 03:11 AM
0.4.1-beta
3MB
Wildtide
06-14-13 12:25 AM
0.4.0-beta
3MB
Wildtide
06-13-13 05:17 PM
0.3.104
3MB
Wildtide
03-15-13 02:29 AM
0.3.103
3MB
Wildtide
03-12-13 12:40 PM
0.3.102
3MB
Wildtide
03-11-13 04:58 PM
0.3.101
3MB
Wildtide
03-06-13 02:35 AM
0.3.100
3MB
Wildtide
02-28-13 06:17 PM
0.3.99
3MB
Wildtide
02-28-13 02:24 AM
0.3.98
3MB
Wildtide
02-18-13 03:25 AM
0.3.97
3MB
Wildtide
02-18-13 02:19 AM
0.3.96
3MB
Wildtide
02-16-13 03:34 AM


Post A Reply Comment Options
Unread 03-13-13, 06:16 AM  
Omenpapa

Forum posts: 0
File comments: 32
Uploads: 0
@Adelea

I really like the castbar on the pic u posted a few posts ago. What do i have to do to get that blue wonder in my game too ?
Omenpapa is offline Report comment to moderator  
Reply With Quote
Unread 03-11-13, 04:21 AM  
Wildtide
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 155
Uploads: 6
Quote:
Originally Posted by Erein
First of all, great addon, keep up the good work.

Now I got a bit of a problem that I cant seem to fix, when using the "standard frame" unit frame template in the new version the role icon gets distorted -->



So wondered if you had a fix for it?
Sorry about that. I broke it with some "fixes" to the way elements resize. I'm getting a fix out for that in the next release, which should be in the next day or two.
Wildtide is offline Report comment to moderator  
Reply With Quote
Unread 03-10-13, 08:36 AM  
Erein

Forum posts: 0
File comments: 1
Uploads: 0
First of all, great addon, keep up the good work.

Now I got a bit of a problem that I cant seem to fix, when using the "standard frame" unit frame template in the new version the role icon gets distorted -->



So wondered if you had a fix for it?
Last edited by Erein : 03-10-13 at 08:48 AM.
Erein is offline Report comment to moderator  
Reply With Quote
Unread 03-08-13, 04:42 PM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Quote:
Originally Posted by Wildtide
D'oh, didn't see these before releasing 0.3.101... I'll get these incorporated into the next release.

Looking awesome as ever
No problem! I've made some changes to the code posted for the XP Bar also.

- Stopped the XP bar behaving like a PA bar.

- Added an option that only affects the PA2Cap bar - where it shows XP relative to T3 - assuming the 0 point is capped T2 - shown:



Not sure if I prefer being 39.60% done of the total, or 6.25% done of the extra that T3 brought along!
adelea is offline Report comment to moderator  
Reply With Quote
Unread 03-06-13, 02:43 AM  
Wildtide
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 155
Uploads: 6
D'oh, didn't see these before releasing 0.3.101... I'll get these incorporated into the next release.

Looking awesome as ever
Wildtide is offline Report comment to moderator  
Reply With Quote
Unread 03-01-13, 06:23 AM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
I've also modified the cast bar a bit.

- Shows the icon next to the bar
- Allows the colors to be set (only really works on alpha based textures)
- Resized text of spell and timer, and moved timer to bottom right

Added some new textures which I use (if you want to include them in gadgets, feel free):

Light - Dark :
Dark - Light :

And this is what the bar looks like using the L2D texture, tinted 0,0,1



Code:
--[[
                                G A D G E T S
      -----------------------------------------------------------------
                            [email protected]
                           DoomSprout: Rift Forums 
      -----------------------------------------------------------------
      Gadgets Framework   : v0.3.91
      Project Date (UTC)  : 2012-12-12T21:27:16Z
      File Modified (UTC) : 2012-12-08T18:16:51Z (Wildtide)
      -----------------------------------------------------------------     
--]]

local toc, data = ...
local AddonId = toc.identifier

local PHICON = "Data/\\UI\\texture\\global\\placeholder_icon.dds"

-- wtCastBar provides a simple bar for the player's charge
-- Only useful for mages, and it only exists because I didn't want to add a charge bar to the standard frame

local function OnCastName(unitFrame, castname)
	if castname then
		local unit = unitFrame.Unit
		if unitFrame.icon then
			local cbd = Inspect.Unit.Castbar(unit.id)
			if cbd and cbd.abilityNew then
				local ad = Inspect.Ability.New.Detail(cbd.abilityNew)
				if ad and ad.icon then
					unitFrame.icon:SetTexture("Rift", ad.icon)
				else
					unitFrame.icon:SetTexture("Rift", PHICON)
				end
			else
				unitFrame.icon:SetTexture("Rift", PHICON)
			end
		end
		if unit.castUninterruptible then
			unitFrame.barCast.Image:SetTexture(unitFrame.mediaNoInterrupt.addonId, unitFrame.mediaNoInterrupt.filename)  
			unitFrame.barCast.Image:SetBackgroundColor(unitFrame.colorNoInterrupt[1], unitFrame.colorNoInterrupt[2], unitFrame.colorNoInterrupt[3], unitFrame.colorNoInterrupt[4])
		else
			unitFrame.barCast.Image:SetTexture(unitFrame.mediaInterrupt.addonId, unitFrame.mediaInterrupt.filename)  
			unitFrame.barCast.Image:SetBackgroundColor(unitFrame.colorInterrupt[1], unitFrame.colorInterrupt[2], unitFrame.colorInterrupt[3], unitFrame.colorInterrupt[4])
		end
	end
end

local function Create(configuration)

	local castBar = WT.UnitFrame:Create(configuration.unitSpec)
	castBar:SetWidth(170)
	castBar:SetHeight(24)
	if not configuration.hideNotCasting then
		castBar:SetBackgroundColor(0,0,0,0.4)
	end
	
	if configuration.cbColorInt == nil then configuration.cbColorInt = {0,0,1,0.5} end
	if configuration.cbColorNonInt == nil then configuration.cbColorNonInt = {1,0.75,0.16,0.5} end

	castBar.mediaInterrupt = Library.Media.GetTexture(configuration.texture)
	castBar.mediaNoInterrupt = Library.Media.GetTexture(configuration.textureNoInterrupt)

	castBar.colorInterrupt = configuration.cbColorInt
	castBar.colorNoInterrupt = configuration.cbColorNonInt
	
	castBar.barCast = castBar:CreateElement(
	{
		id="barCast", type="Bar", parent="frame", layer=25,
		attach = {
			{ point="TOPLEFT", element="frame", targetPoint="TOPLEFT" },
			{ point="BOTTOMRIGHT", element="frame", targetPoint="BOTTOMRIGHT" },
		},
		visibilityBinding="castName",
		binding="castPercent",
		media=configuration.texture, --colorBinding="castColor",
		backgroundColor={r=0, g=0, b=0, a=1}
	})

	castBar.labelCast = castBar:CreateElement(
	{
		id="labelCast", type="Label", parent="frame", layer=26,
		attach = {{ point="CENTERLEFT", element="barCast", targetPoint="CENTERLEFT", offsetX=6, offsetY=0 }},
		visibilityBinding="castName",
		text="{castName}", default="", fontSize=12
	})

	if configuration.showCastTime then
		castBar.labelTime = castBar:CreateElement(
		{
			id="labelTime", type="Label", parent="frame", layer=26,
			attach = {{ point="BOTTOMRIGHT", element="barCast", targetPoint="BOTTOMRIGHT", offsetX=-4, offsetY=-4 }},
			visibilityBinding="castName",
			text="{castTime}", default="", fontSize=10
		})
	end

	if configuration.showIcon then
		castBar.icon = castBar:CreateElement({
			id="abilityIcon", type="Image", parent="frame", layer=30,
			attach = {{ point = "TOPRIGHT", element="barCast", targetPoint = "TOPLEFT", offsetX=-2, offsetY=0 }},
			visibilityBinding="castName", texAddon="Rift", texFile=PHICON
		})
	end
	
	castBar.barCast.Event.Size = 
		function(frame)
			local fh = frame:GetHeight()
			local s = math.floor(fh * 0.4)
			if s > 24 then
				s = 24
			end
			castBar.labelCast:SetFontSize(s)
			if castBar.labelTime then
				local l = math.floor(fh * 0.2)
				if l < 8 then
					l = 8
				end			
				castBar.labelTime:SetFontSize(l)
			end
			if configuration.showIcon then
				castBar.icon:SetHeight(fh)
				castBar.icon:SetWidth(fh)
			end
		end

	castBar:CreateBinding("castName", castBar, OnCastName, nil)

	castBar.barCast:SetVisible(false)

	return castBar, { resizable = { 140, 15, 1000, 300 } }
end

local dialog = false

local function ConfigDialog(container)

	local lMedia = Library.Media.FindMedia("bar")
	local listMedia = {}
	for mediaId, media in pairs(lMedia) do
		table.insert(listMedia, { ["text"]=mediaId, ["value"]=mediaId })
	end
	
	dialog = WT.Dialog(container)
		:Label("The cast bar gadget shows a cast bar for the unit selected.")
		:Combobox("unitSpec", "Unit to track", "player",
			{
				{text="Player", value="player"},
				{text="Target", value="player.target"},
				{text="Target's Target", value="player.target.target"},
				{text="Focus", value="focus"},
				{text="Focus's Target", value="focus.target"},
				{text="Pet", value="player.pet"},
			}, false) 
		:TexSelect("texture", "Texture", "wtCastInterruptable", "bar")
		:ColorPicker("cbColorInt", "Interruptible color", 0,0,1,0.5)
		:TexSelect("textureNoInterrupt", "Noninterruptable Texture", "wtCastUninterruptable", "bar")
		:ColorPicker("cbColorNonInt", "Non-Interruptible color", 1,0.75,0.16,0.5)
		:Checkbox("hideNotCasting", "Hide when inactive", true)
		:Checkbox("showCastTime", "Show cast time", true)
		:Checkbox("showIcon", "Show ability icon", false)
end

local function GetConfiguration()
	return dialog:GetValues()
end

local function SetConfiguration(config)
	dialog:SetValues(config)
end

local function Reconfigure(config)

	assert(config.id, "No id provided in reconfiguration details")
	
	local gadgetConfig = wtxGadgets[config.id]
	local gadget = WT.Gadgets[config.id]
	
	assert(gadget, "Gadget id does not exist in WT.Gadgets")
	assert(gadgetConfig, "Gadget id does not exist in wtxGadgets")
	assert(gadgetConfig.type == "adCastBar", "Reconfigure Gadget is not a castbar")
	
	-- Detect changes to config and apply them to the gadget
	
	local requireRecreate = false
	
	if gadgetConfig.unitSpec ~= config.unitSpec then
		gadgetConfig.unitSpec = config.unitSpec
		requireRecreate = true
	end

	if gadgetConfig.texture ~= config.texture then
		gadgetConfig.texture = config.texture
		gadget.mediaInterrupt = Library.Media.GetTexture(config.texture)
	end

	if gadgetConfig.textureNoInterrupt ~= config.textureNoInterrupt then
		gadgetConfig.textureNoInterrupt = config.textureNoInterrupt
		gadget.mediaNoInterrupt = Library.Media.GetTexture(config.textureNoInterrupt)
	end
	
	if gadgetConfig.hideNotCasting ~= config.hideNotCasting then
		gadgetConfig.hideNotCasting = config.hideNotCasting
		if not config.hideNotCasting then
			gadget:SetBackgroundColor(0,0,0,0.4)
		else
			gadget:SetBackgroundColor(0,0,0,0)
		end
	end

	if gadgetConfig.showCastTime ~= config.showCastTime then
		gadgetConfig.showCastTime = config.showCastTime
		requireRecreate = true
	end

	if gadgetConfig.showIcon ~= config.showIcon then
		gadgetConfig.showIcon = config.showIcon
		requireRecreate = true
	end

	if requireRecreate then
		WT.Gadget.Delete(gadgetConfig.id)
		WT.Gadget.Create(gadgetConfig)
	end		
	
end

WT.Gadget.RegisterFactory("adCastBar",
	{
		name="adCastbar",
		description="Castbar",
		author="Wildtide",
		version="1.1.0",
		iconTexAddon=AddonId,
		iconTexFile="img/wtCastBar.png",
		["Create"] = Create,
		["ConfigDialog"] = ConfigDialog,
		["GetConfiguration"] = GetConfiguration, 
		["SetConfiguration"] = SetConfiguration, 
		["Reconfigure"] = Reconfigure,
	})
Last edited by adelea : 03-02-13 at 07:08 AM.
adelea is offline Report comment to moderator  
Reply With Quote
Unread 03-01-13, 06:12 AM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Ive been tinkering again.. And made a change to the XP Bar, adding a new type. (Also, converted the standard rift events to the new Command.Event.Attach model)

PA XP to Cap.

For the masochists amongst us!

[PA#: 637] 556,282,709/1,525,794,478 [0] (36.46%)

Code:
--[[
                                G A D G E T S
      -----------------------------------------------------------------
                            [email protected]
                           DoomSprout: Rift Forums 
      -----------------------------------------------------------------
      Gadgets Framework   : v0.3.100
      Project Date (UTC)  : 2013-03-01T00:08:19Z
      File Modified (UTC) : 2013-02-28T08:20:03Z (Wildtide)
      -----------------------------------------------------------------     
--]]

local toc, data = ...
local AddonId = toc.identifier
local TXT = Library.Translate

local XBG = {}

-- wtXPPercent Gadget - a simple % display of current XP

local xpGadgets = {}
local paGadgets = {}
local prGadgets = {}

local prDetails = nil
local paDetails = nil

local iconRestedAddon = "Rift"
local iconRestedFile = "indicator_friendlyNPC.png.dds"

local MAX_CH_LEVEL = 60

local PA_T2_CAP = 628
local PA_T3_CAP = 1079

local PA_T2_EXP = PA_T2_CAP*((PA_T2_CAP*1219)+98781)
local PA_T3_EXP = PA_T3_CAP*((PA_T3_CAP*1219)+98781)

local PA_T3_ONLY = PA_T3_EXP - PA_T2_EXP

local MAX_PA_LEVEL = PA_T3_CAP
local MAX_PAXP_REQ = PA_T3_EXP

function XBG.OnPAChange(h, accum)
	if not accum then return end
	if paDetails == nil then
		paDetails = Inspect.Attunement.Progress()
	end
	if paDetails.needed == nil then
		for idx, gadget in ipairs(paGadgets) do
			gadget.bar:SetPoint("BOTTOMRIGHT", gadget, 1.0, 1.0)
			if gadget.text then
				gadget.text:SetText(string.format("MAX Planar Attunement Points: %d", paDetails.available+paDetails.spent))
			end
		end
	else
		local percent
		local percentRested = 0
		if paDetails.rested and paDetails.rested > accum then percentRested = (paDetails.rested / paDetails.needed) end

		for idx, gadget in ipairs(paGadgets) do
			if percentRested > 0 then
				if gadget.barRested then
					gadget.barRested:SetPoint("BOTTOMRIGHT", gadget, percentRested, 1.0)
					gadget.barRested:SetVisible(true)
				end
			else
				if gadget.barRested then gadget.barRested:SetVisible(false) end
			end		
			if gadget.text then
				local unspent = ""	
				local pa_cur = 0
				local pa_req = 0
				if paDetails.available then
					unspent = string.format("[%d] ", paDetails.available)
				end
				if gadget.xpType == "PAXP" then
					pa_cur = accum
					pa_req = paDetails.needed
				else
					local pa_pts = paDetails.spent+paDetails.available					
					pa_cur = (pa_pts*((pa_pts*1219)+98781))+accum
					
					if gadget.pat3 then
						pa_req = PA_T3_ONLY
						if pa_cur >= PA_T2_EXP then
							pa_cur = pa_cur - PA_T2_EXP
						else
							pa_cur = 0
						end
					else
						pa_req = MAX_PAXP_REQ
					end
				end
				
				percent = (pa_cur / pa_req)
				gadget.bar:SetPoint("BOTTOMRIGHT", gadget, percent, 1.0)
				percent = percent*100
				if gadget.textType then
					gadget.text:SetText(string.format("[PA#: %d] %s/%s %s(%.2f%%)", paDetails.spent+paDetails.available+1, WT.Utility.NumberComma(pa_cur), WT.Utility.NumberComma(pa_req), unspent, percent))
				else
					gadget.text:SetText(string.format("[PA#: %d] %s/%s %s(%.2f%%)", paDetails.spent+paDetails.available+1, WT.Utility.NumberDesc(pa_cur), WT.Utility.NumberDesc(pa_req), unspent, percent))
				end				
			end
		end
	end
end

function XBG.PAPtChange(h)
	paDetails = Inspect.Attunement.Progress()
	XBG.OnPAChange(0, paDetails.accumulated)
end

function XBG.OnPrestige(h, accum)
	if not accum then return end
	if prDetails == nil then
		prDetails = Inspect.Pvp.Prestige()
		if prDetails.rank == 1 and prDetails.needed == nil and accum==0 then
			prDetails.needed=1
		end
	end
	-- Fix for strange error with nil needed value (API bug?)
	prDetails.needed = prDetails.needed or 1
	
	local percent = (accum/prDetails.needed) * 100
	for idx, gadget in ipairs(prGadgets) do
		gadget.bar:SetPoint("BOTTOMRIGHT", gadget, accum/prDetails.needed, 1.0)
		if gadget.text then
			if gadget.textType then
				gadget.text:SetText(string.format("[Rank: %d] %s/%s (%.2f%%)", prDetails.rank, WT.Utility.NumberComma(accum), WT.Utility.NumberComma(prDetails.needed), percent))
			else
				gadget.text:SetText(string.format("[Rank: %d] %s/%s (%.2f%%)", prDetails.rank, WT.Utility.NumberDesc(accum), WT.Utility.NumberDesc(prDetails.needed), percent))
			end
		end
	end
end

function XBG.RankChange(h)
	prDetails = Inspect.Pvp.Prestige()
	XBG.OnPrestige(0, prDetails.accumulated)	
end

function XBG.OnExperience(h, accum, rested, needed)
	if not accum then return end
	
	local pLevel = Inspect.Unit.Detail("player").level
	if pLevel == MAX_CH_LEVEL then
		needed = -1
	end
	
	if needed == -1 then
		for idx, gadget in ipairs(xpGadgets) do
			gadget.bar:SetPoint("BOTTOMRIGHT", gadget, 1.0, 1.0)
			if gadget.text then
				gadget.text:SetText(string.format("MAX Level: %d", pLevel))
			end
		end
	else
		local percent = (accum / needed) * 100
		
		local percentRested = 0
		if rested and rested > accum then percentRested = (rested / needed) end
		
		local percentString = string.format("%i", math.floor(percent)) .. "%"
		for idx, gadget in ipairs(xpGadgets) do
			gadget.bar:SetPoint("BOTTOMRIGHT", gadget, accum / needed, 1.0)
			if percentRested > 0 then
				if gadget.barRested then
					gadget.barRested:SetPoint("BOTTOMRIGHT", gadget, percentRested, 1.0)
					gadget.barRested:SetVisible(true)
				end

				gadget.iconRested:SetPoint("TOPCENTER", gadget, percentRested, 1.0, 0, -18)
				-- gadget.iconRested:SetVisible(true)
				-- Icon doesn't look right yet, will fix later
			else
				if gadget.barRested then gadget.barRested:SetVisible(false) end
				gadget.iconRested:SetVisible(false)
			end
			if gadget.text then
				if gadget.textType then
					gadget.text:SetText(string.format("[Level: %d] %s/%s (%.2f%%)", pLevel, WT.Utility.NumberComma(accum), WT.Utility.NumberComma(needed), percent))
				else
					gadget.text:SetText(string.format("[Level: %d] %s/%s (%.2f%%)", pLevel, WT.Utility.NumberDesc(accum), WT.Utility.NumberDesc(needed), percent))
				end
			end
		end
	end
end


function XBG.Create(configuration)
	local wrapper = UI.CreateFrame("Texture", WT.UniqueName("wtXP"), WT.Context)
	wrapper:SetWidth(512)
	wrapper:SetHeight(15)
	wrapper:SetTexture("Gadgets", "img/wtXPBar.tga")

	local bar = UI.CreateFrame("Frame", WT.UniqueName("wtXP"), wrapper)
	bar:SetPoint("TOPLEFT", wrapper, "TOPLEFT")
	bar:SetPoint("BOTTOMRIGHT", wrapper, 0.5, 1.0)
	wrapper.bar = bar
	
	if configuration.xpType == nil then
		configuration.xpType = "XP"
	end
	
	if configuration.colBar == nil then
		configuration.colBar = {0,0.8,0,0.4}
	end
	
	bar:SetBackgroundColor(unpack(configuration.colBar))

	if configuration.tintRested then
		local barRested = UI.CreateFrame("Frame", WT.UniqueName("wtXPRested"), wrapper)
		barRested:SetPoint("TOPLEFT", bar, "CENTERRIGHT")
		barRested:SetPoint("BOTTOMRIGHT", wrapper, 0.5, 1.0)
		barRested:SetBackgroundColor(0.0,0.6,0.0,0.2)
		barRested:SetVisible(false)
		wrapper.barRested = barRested
	end

	local rested = UI.CreateFrame("Texture", "texRested", bar)
	rested:SetPoint("TOPCENTER", wrapper, "BOTTOMLEFT", 0, -18)
	rested:SetTexture(iconRestedAddon, iconRestedFile)
	rested:SetVisible(false)
	wrapper.iconRested = rested
	
	if configuration.showText then
		local txt = UI.CreateFrame("Text", WT.UniqueName("wtXP"), bar)
		txt:SetFontColor(1,1,1,1)
		txt:SetPoint("CENTER", wrapper, "CENTER")
		txt:SetText("-/- (0%)")
		wrapper.textType = configuration.showFullText
		wrapper.text = txt
		bar.Event.Size = 
			function()
				if configuration.largeText then
					txt:SetFontSize(bar:GetHeight() * 0.9)
				else
					txt:SetFontSize(bar:GetHeight() * 0.6)
				end
			end
	end

	if configuration.xpType == "XP" then
		table.insert(xpGadgets, wrapper)
	elseif configuration.xpType == "PAXP" or configuration.xpType == "PAXPCAP" then
		wrapper.xpType = configuration.xpType
		wrapper.pat3 = configuration.pat3
		table.insert(paGadgets, wrapper)
	elseif configuration.xpType == "PRXP" then
		table.insert(prGadgets, wrapper)
	end

	return wrapper, { resizable={100, 8, 1500, 40 } }	
end

local dialog = false

function XBG.ConfigDialog(container)	
	dialog = WT.Dialog(container)
		:Label("Resizable XP Bar Gadget")
		:Checkbox("showText", "Show Text", false)
		:Checkbox("largeText", "Large Text", false)
		:Checkbox("showFullText", "Show Full XP Values", false)
		:Checkbox("tintRested", "Tint Rested XP on Bar", false)
		:Combobox("xpType", "XP Type", "XP",
			{
				{text="XP", value="XP"},
				{text="PA XP", value="PAXP"},
				{text="PA XP to cap", value="PAXPCAP"},
				{text="Prestige", value="PRXP"}
			})
		:Checkbox("pat3", "Show PA Cap for T3 only", false)
		:ColorPicker("colBar", "Bar Color", 0, 0.8, 0, 0.4)
end

function XBG.GetConfiguration()
	return dialog:GetValues()
end

function XBG.SetConfiguration(config)
	dialog:SetValues(config)
end

WT.Gadget.RegisterFactory("XPBar",
	{
		name="XP Bar",
		description="XP Bar",
		author="Wildtide/Adelea",
		version="1.1.0",
		["Create"] = XBG.Create,
		["ConfigDialog"] = XBG.ConfigDialog,
		["GetConfiguration"] = XBG.GetConfiguration, 
		["SetConfiguration"] = XBG.SetConfiguration, 
	})

function XBG.OnPlayerAvailable(h)
	XBG.OnExperience(0, Inspect.TEMPORARY.Experience())
	
	local prestige = Inspect.Pvp.Prestige()
	if prestige and prestige.accumulated then
		XBG.OnPrestige(0,prestige.accumulated)
	else
		XBG.OnPrestige(0,0)
	end
	
	local attunement = Inspect.Attunement.Progress()
	if attunement and attunement.accumulated then
		XBG.OnPAChange(0,attunement.accumulated)
	else
		XBG.OnPAChange(0,0)
	end	
end

table.insert(WT.Event.PlayerAvailable, {XBG.OnPlayerAvailable, AddonId, "XPBarGadget_OnPlayerAvailable"})	

Command.Event.Attach(Event.TEMPORARY.Experience, XBG.OnExperience, "OnExperienceBar")
Command.Event.Attach(Event.Pvp.Prestige.Accumulated, XBG.OnPrestige, "Event.Pvp.Prestige.Accumulated")
Command.Event.Attach(Event.Pvp.Prestige.Rank, XBG.RankChange, "Event.Pvp.Prestige.Rank")
Command.Event.Attach(Event.Attunement.Progress.Accumulated, XBG.OnPAChange, "Inspect.Attunement.Progress")
Command.Event.Attach(Event.Attunement.Progress.Available, XBG.PAPtChange, "Event.Attunement.Progress.Available")
Edit: Fixed barwidth sizing
Edit: Made the XP bar NOT behave like a PA bar + added an option for PAXP to Cap to only show progress relative to T3
Last edited by adelea : 03-08-13 at 04:40 PM.
adelea is offline Report comment to moderator  
Reply With Quote
Unread 02-18-13, 03:04 PM  
topiland

Forum posts: 0
File comments: 45
Uploads: 0
you should update to latesr libsimplewidgets library
topiland is offline Report comment to moderator  
Reply With Quote
Unread 02-14-13, 01:56 AM  
Wildtide
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 155
Uploads: 6
Quote:
Originally Posted by Elaani
It's been a while since I used custom unit frames (for this specific reason) so if you can do all that now with custom ones I need to start using them again.
Yep, you can get right-click context menus for any unit (that's been available for quite a while now)
Wildtide is offline Report comment to moderator  
Reply With Quote
Unread 02-13-13, 11:04 PM  
Elaani
 
Elaani's Avatar

Forum posts: 0
File comments: 46
Uploads: 0
Quote:
Originally Posted by spitfire122
Awesome addon.

Question: How do you disable the default unit frames? I want to use gadgets unit frames. but can't remove the default frames.
Options (ESC) -> Edit Layout. Click the player and target portrait windows and uncheck the "Enable" box then save.

One important note though (unless Trion changed this) is that you won't have the same right-click functionality on those windows like you will the default ones (i.e. right-click self portrait to set mentor level, dungeon difficulty, private/public group and such).

It's been a while since I used custom unit frames (for this specific reason) so if you can do all that now with custom ones I need to start using them again.
Elaani is offline Report comment to moderator  
Reply With Quote
Unread 02-13-13, 08:53 PM  
spitfire122

Forum posts: 0
File comments: 1
Uploads: 0
Awesome addon.

Question: How do you disable the default unit frames? I want to use gadgets unit frames. but can't remove the default frames.
spitfire122 is offline Report comment to moderator  
Reply With Quote
Unread 02-07-13, 06:03 AM  
Wildtide
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 155
Uploads: 6
Quote:
Originally Posted by Shocker74
Any way of colorizing the numbers where it states which level a mob is?
If you mentor down you can't see if a mob is greyed out or not, well until you kill him and notice if you get xp or not.
Since the tooltips of mobs always stays grey. The original UI at least changes the color of the mob in the level numbers on their portrait.
I raised the issue of mentoring before, and Trion have since added a mentoring flag to the API. I should be able to use this to add a mentoring indicator to the frames which should help.

If I can determine the rules for relative XP levels, it should be easy to colour the level number. I'll have a go at this.
Wildtide is offline Report comment to moderator  
Reply With Quote
Unread 02-07-13, 06:01 AM  
Wildtide
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 155
Uploads: 6
Quote:
Originally Posted by adelea
Loads of good stuff!
Wow, you've been busy! Sorry for not spotting all of this sooner. I'll work through it and get it applied to the core addon.
Wildtide is offline Report comment to moderator  
Reply With Quote
Unread 02-07-13, 01:06 AM  
Shocker74

Forum posts: 0
File comments: 14
Uploads: 0
Any way of colorizing the numbers where it states which level a mob is?
If you mentor down you can't see if a mob is greyed out or not, well until you kill him and notice if you get xp or not.
Since the tooltips of mobs always stays grey. The original UI at least changes the color of the mob in the level numbers on their portrait.
Last edited by Shocker74 : 02-07-13 at 01:07 AM.
Shocker74 is offline Report comment to moderator  
Reply With Quote
Unread 02-05-13, 06:23 AM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
I really like the WT.Dialog() method of creating configuration screens.

However, it is lacking the ColorPicker!

I've added the following to wtLibGadget\controls\wtDialog.lua

Code:
function CDialog:ColorPicker(id, label, r, g, b, a)
	local control = WT.Control.ColorPicker.Create(self.container, nil, r, g, b, a)
	control:SetColor(r,g,b,a)
	local frm = self:add(id, label, control)
	frm.getValue = control.GetValue
	frm.setValue = control.SetValue
	return self
end
Any possibility of adding this, or something functionally the same to the default gadgets distribution ?
adelea is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: