Skip to content

Commit

Permalink
Merge pull request #59 from Slivo-fr/release/v2.2.2
Browse files Browse the repository at this point in the history
Release/v2.2.2
  • Loading branch information
Slivo-fr authored Nov 4, 2021
2 parents ae2e8e6 + 05e2356 commit e7ce6c9
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 14 deletions.
6 changes: 3 additions & 3 deletions TranqRotate.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Interface: 11400
## Title: TranqRotate |cff00aa002.2.1|r
## Interface: 11401
## Title: TranqRotate |cff00aa002.2.2|r
## Notes: A tranqshot rotation assistant
## Author: Slivo
## Version: 2.2.1
## Version: 2.2.2
## SavedVariables: TranqRotateDb
## OptionalDeps: Ace3

Expand Down
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## TranqRotate Changelog

#### v2.2.2

- Bump toc for 1.14.1
- Add tooltip to title bar buttons (Thanks Vinny)

#### v2.2.1

- Bump toc for 1.14.0

#### v2.2.0

- Adds several translations
Expand Down
6 changes: 6 additions & 0 deletions locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ local L = {
["LOADED_MESSAGE"] = "TranqRotate loaded, type /tranq for options",
["TRANQ_WINDOW_HIDDEN"] = "Tranqrotate window hidden. Use /tranq toggle to get it back",

-- Buttons tooltips
["BUTTON_CLOSE"] = "Hide window",
["BUTTON_SETTINGS"] = "Settings",
["BUTTON_RESET_ROTATION"] = "Reset Rotation",
["BUTTON_PRINT_ROTATION"] = "Print Rotation",

-- Settings
["SETTING_GENERAL"] = "General",
["SETTING_GENERAL_REPORT"] = "Please report any issue at",
Expand Down
6 changes: 6 additions & 0 deletions locales/frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ local L = {
["LOADED_MESSAGE"] = "TranqRotate chargé, utilisez /tranq pour les options",
["TRANQ_WINDOW_HIDDEN"] = "Tranqrotate window hidden. Use /tranq toggle to get it back",

-- Buttons tooltips
["BUTTON_CLOSE"] = "Hide window",
["BUTTON_SETTINGS"] = "Settings",
["BUTTON_RESET_ROTATION"] = "Reset Rotation",
["BUTTON_PRINT_ROTATION"] = "Print Rotation",

-- Settings
["SETTING_GENERAL"] = "Général",
["SETTING_GENERAL_REPORT"] = "Merci de signaler tout bug rencontré sur",
Expand Down
6 changes: 6 additions & 0 deletions locales/ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ local L = {
["LOADED_MESSAGE"] = "TranqRotate загружен, введите /tranq для настройки",
["TRANQ_WINDOW_HIDDEN"] = "Окно TranqRotate скрыто. Введите /tranq toggle для отображения",

-- Buttons tooltips
["BUTTON_CLOSE"] = "Hide window",
["BUTTON_SETTINGS"] = "Settings",
["BUTTON_RESET_ROTATION"] = "Reset Rotation",
["BUTTON_PRINT_ROTATION"] = "Print Rotation",

-- Settings
["SETTING_GENERAL"] = "Общие",
["SETTING_GENERAL_REPORT"] = "Пожалуйста о всех ошибках сообщайте на",
Expand Down
6 changes: 6 additions & 0 deletions locales/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ local L = {
["LOADED_MESSAGE"] = "TranqRotate 已加载, 输入 /tranq 进入设置",
["TRANQ_WINDOW_HIDDEN"] = "Tranqrotate 窗口隐藏. 输入 /tranq toggle 显示窗口",

-- Buttons tooltips
["BUTTON_CLOSE"] = "Hide window",
["BUTTON_SETTINGS"] = "Settings",
["BUTTON_RESET_ROTATION"] = "Reset Rotation",
["BUTTON_PRINT_ROTATION"] = "Print Rotation",

-- Settings
["SETTING_GENERAL"] = "一般",
["SETTING_GENERAL_REPORT"] = "请报告问题: ",
Expand Down
6 changes: 6 additions & 0 deletions locales/zhTW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ local L = {
["LOADED_MESSAGE"] = "TranqRotate 已加載, 輸入 /tranq 進入設定",
["TRANQ_WINDOW_HIDDEN"] = "Tranqrotate 窗口隱藏. 輸入 /tranq toggle 顯示窗口",

-- Buttons tooltips
["BUTTON_CLOSE"] = "Hide window",
["BUTTON_SETTINGS"] = "Settings",
["BUTTON_RESET_ROTATION"] = "Reset Rotation",
["BUTTON_PRINT_ROTATION"] = "Print Rotation",

-- Settings
["SETTING_GENERAL"] = "General",
["SETTING_GENERAL_REPORT"] = "請報告問題: ",
Expand Down
37 changes: 26 additions & 11 deletions src/frames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,34 +57,38 @@ function TranqRotate:createButtons()

local buttons = {
{
['texture'] = 'Interface/Buttons/UI-Panel-MinimizeButton-Up',
['callback'] = TranqRotate.toggleDisplay,
['textCoord'] = {0.18, 0.8, 0.2, 0.8}
texture = 'Interface/Buttons/UI-Panel-MinimizeButton-Up',
callback = TranqRotate.toggleDisplay,
textCoord = {0.18, 0.8, 0.2, 0.8},
tooltip = L['BUTTON_CLOSE'],
},
{
['texture'] = 'Interface/GossipFrame/BinderGossipIcon',
['callback'] = TranqRotate.openSettings
texture = 'Interface/GossipFrame/BinderGossipIcon',
callback = TranqRotate.openSettings,
tooltip = L['BUTTON_SETTINGS'],
},
{
['texture'] = 'Interface/Buttons/UI-RefreshButton',
['callback'] = TranqRotate.handleResetButton
texture = 'Interface/Buttons/UI-RefreshButton',
callback = TranqRotate.handleResetButton,
tooltip = L['BUTTON_RESET_ROTATION'],
},
{
['texture'] = 'Interface/Buttons/UI-GuildButton-MOTD-Up',
['callback'] = TranqRotate.printRotationSetup
texture = 'Interface/Buttons/UI-GuildButton-MOTD-Up',
callback = TranqRotate.printRotationSetup,
tooltip = L['BUTTON_PRINT_ROTATION'],
},
}

local position = 5

for key, button in pairs(buttons) do
TranqRotate:createButton(position, button.texture, button.callback, button.textCoord)
TranqRotate:createButton(position, button.texture, button.callback, button.textCoord, button.tooltip)
position = position + 13
end
end

-- Create a single button in the title bar
function TranqRotate:createButton(position, texture, callback, textCoord)
function TranqRotate:createButton(position, texture, callback, textCoord, tooltip)

local button = CreateFrame("Button", nil, TranqRotate.mainFrame.titleFrame)
button:SetPoint('RIGHT', -position, 0)
Expand All @@ -107,6 +111,17 @@ function TranqRotate:createButton(position, texture, callback, textCoord)
end

button:SetScript("OnClick", callback)

if tooltip then
button:SetScript("OnEnter", function()
GameTooltip:SetOwner(button, "ANCHOR_RIGHT")
GameTooltip_SetTitle(GameTooltip, tooltip)
GameTooltip:Show()
end)
button:SetScript("OnLeave", function()
GameTooltip:Hide()
end)
end
end

-- Create rotation frame
Expand Down

0 comments on commit e7ce6c9

Please sign in to comment.