vrtc / chorus (public) (License: CC0) (since 2023-08-12) (hash sha1)
World of Warcraft add-on stub. The overall goal is to create a specialized raid frame.

/src/ChorusRaidTargetIconFrameTemplate.lua (444488f7e5cb676d185dab60da00e5d037d7d6ac) (1438 bytes) (mode 100644) (type blob)

local Chorus = Chorus

--[[ See FrameXML/TargetFrame.lua:682 ]]--
local SetRaidTargetIconTexture = SetRaidTargetIconTexture

local function raidTargetIconFrameEventProcessor(self)
	assert(self ~= nil)

	local u = SecureButton_GetUnit(self) or 'none'

	assert(u ~= nil)
	assert('string' == type(u))
	u = string.lower(strtrim(u))
	assert(string.len(u) >= 1)
	assert(string.len(u) <= 256)

	if UnitExists(u) and UnitIsConnected(u) then
		self:Show()
	else
		self:Hide()
		return
	end

	local raidIconIndex = GetRaidTargetIndex(u)
	if not raidIconIndex then
		self:Hide()
		return
	end

	local artwork = self.artwork or _G[self:GetName() .. 'Artwork']
	assert(artwork ~= nil)

	SetRaidTargetIconTexture(artwork, raidIconIndex)
end

function Chorus.raidTargetIconFrameMain(self)
	assert(self ~= nil)

	local artwork = _G[self:GetName() .. 'Artwork']
	assert(artwork ~= nil)
	self.artwork = artwork

	--artwork:SetSize(RAID_TARGET_ICON_DIMENSION, RAID_TARGET_ICON_DIMENSION)
	SetRaidTargetIconTexture(artwork, 0)

	self:SetScript('OnEvent', raidTargetIconFrameEventProcessor)

	self:RegisterEvent('ADDON_LOADED')
	self:RegisterEvent('PARTY_CONVERTED_TO_RAID')
	self:RegisterEvent('PARTY_MEMBERS_CHANGED')
	self:RegisterEvent('PLAYER_FOCUS_CHANGED')
	self:RegisterEvent('PLAYER_LOGIN')
	self:RegisterEvent('PLAYER_TARGET_CHANGED')
	self:RegisterEvent('RAID_ROSTER_UPDATE')
	self:RegisterEvent('RAID_TARGET_UPDATE')

	RegisterUnitWatch(self)
end


Mode Type Size Ref File
100644 blob 22 d7f81b36af99095409dbf9a7a92e18a5c74e5ff5 .gitignore
100644 blob 2761 8660a7b6b158b3d7c82af258020ea93722ae2bee README.md
040000 tree - 386cdd1448b396d67052c9c421df4d307621c280 bin
100644 blob 376 7c6577431ffa8a42b6e2570c37b2e7bbe6f952ce chorus-0.2-1.rockspec
100644 blob 111 b22afedfa744551589b080882fdc70c11ab6b17d chorus.toc
040000 tree - cac8af7ca5d8adc7771598e6faae482998b25fa2 doc
040000 tree - b30875c0405a889b8e1ef8838ccd70adde587bdd etc
040000 tree - 89b0ab39d95faab01a754a25f5a5269d5f5bbcea rocketgit
040000 tree - 5b8dd064c04749cf19281ed90842d3996ad61dc6 share
040000 tree - 17333a2ce6b635748cd2f722d7073f41e6fe79b4 src
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/vrtc/chorus

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/vrtc/chorus

Clone this repository using git:
git clone git://git.rocketgit.com/user/vrtc/chorus

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main