Quantcast
Make border for icon. - WoWInterface
Thread Tools Display Modes
11-27-21, 10:07 AM   #1
darhanger
A Deviate Faerie Dragon
 
darhanger's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2017
Posts: 14
Make border for icon.

Wanna make blizzlike border for my addon without any libs. Any can help ? Cuz i try just insert some code from LibDBIcon - but is shouldn work. Like scada icon.



Lua Code:
  1. local mmb_name = ni.utils.GenerateRandomName();
  2. main_ui.minimap_icon = CreateFrame("Button", mmb_name, Minimap);
  3. local mm = main_ui.minimap_icon;
  4. mm:SetHeight(25);
  5. mm:SetWidth(25);
  6. mm:SetFrameStrata("MEDIUM");
  7. mm:SetMovable(true);
  8. mm:SetUserPlaced(true);
  9. main_ui.minimap_toggle = function(bool)
  10.     if bool then
  11.         mm:SetNormalTexture("Interface\\BUTTONS\\UI-GroupLoot-Pass-Up.blp");
  12.         mm:SetPushedTexture("Interface\\BUTTONS\\UI-GroupLoot-Pass-Down.blp");
  13.     else
  14.         mm:SetNormalTexture("Interface\\BUTTONS\\UI-GroupLoot-Coin-Up.blp");
  15.         mm:SetPushedTexture("Interface\\BUTTONS\\UI-GroupLoot-Coin-Down.blp");
  16.     end
  17. end
  18. mm:SetHighlightTexture("Interface\\Minimap\\UI-Minimap-Background.blp");
  19. mm:SetPoint("CENTER", 20, 45);
  20. mm:SetScript("OnMouseDown", function(self, button)
  21.     if button == "LeftButton" then
  22.         if main_ui.main:IsShown() then
  23.             main_ui.main:Hide();
  24.         else
  25.             main_ui.main:Show();
  26.         end
  27.     elseif button == "RightButton" then
  28.         self:SetScript("OnUpdate", moveIcon);
  29.     end
  30. end);
  31. mm:SetScript("OnMouseUp", function(self)
  32.     self:SetScript("OnUpdate", nil);
  33. end);
  Reply With Quote
11-28-21, 03:52 AM   #2
darhanger
A Deviate Faerie Dragon
 
darhanger's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2017
Posts: 14
thats all of i make

  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Make border for icon.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off