Commit c45e9153 authored by Ivaria's avatar Ivaria
Browse files

Adding default profile and key layout to load for characters whose VuhDo...

Adding default profile and key layout to load for characters whose VuhDo settings are not found - closes CurseForge ticket 353
parent ce73dc49
......@@ -147,6 +147,9 @@ function VUHDO_vuhdoInitLocalOverrides()
sTrigger = VUHDO_CONFIG["EMERGENCY_TRIGGER"];
sCurrentMode = VUHDO_CONFIG["MODE"];
VUHDO_DEFAULT_PROFILE = _G["VUHDO_DEFAULT_PROFILE"];
VUHDO_DEFAULT_LAYOUT = _G["VUHDO_DEFAULT_LAYOUT"];
end
----------------------------------------------------
......
......@@ -4,7 +4,7 @@
## Version: 3.65
## Notes: Raid Frames providing click-heal functionality, buff and debuff control, main tank management and much more
## SavedVariablesPerCharacter: VUHDO_CONFIG, VUHDO_PANEL_SETUP, VUHDO_SPELL_ASSIGNMENTS, VUHDO_HOSTILE_SPELL_ASSIGNMENTS, VUHDO_MM_SETTINGS, VUHDO_PLAYER_TARGETS, VUHDO_MAINTANK_NAMES, VUHDO_BUFF_SETTINGS, VUHDO_POWER_TYPE_COLORS, VUHDO_SPELLS_KEYBOARD, VUHDO_SPELL_CONFIG, VUHDO_BUFF_ORDER, VUHDO_SPEC_LAYOUTS, VUHDO_GROUP_SIZE, VUHDO_RAID, VUHDO_INDICATOR_CONFIG
## SavedVariables: VUHDO_PROFILES, VUHDO_MANUAL_ROLES, VUHDO_SPELL_LAYOUTS, VUHDO_USER_CLASS_COLORS, VUHDO_DEBUFF_BLACKLIST, VUHDO_BOUQUETS, VUHDO_COMBAT_LOG_TRACE, VUHDO_GLOBAL_CONFIG, VUHDO_DEBUG
## SavedVariables: VUHDO_DEFAULT_LAYOUT, VUHDO_DEFAULT_PROFILE, VUHDO_PROFILES, VUHDO_MANUAL_ROLES, VUHDO_SPELL_LAYOUTS, VUHDO_USER_CLASS_COLORS, VUHDO_DEBUFF_BLACKLIST, VUHDO_BOUQUETS, VUHDO_COMBAT_LOG_TRACE, VUHDO_GLOBAL_CONFIG, VUHDO_DEBUG
## DefaultState: Enabled
## LoadOnDemand: 0
......
......@@ -751,6 +751,7 @@ function VUHDO_loadDefaultConfig()
VUHDO_CONFIG["VERSION"] = 4;
end
-- add relevant custom debuffs for raid bosses
-- 5.x - MoP
VUHDO_addCustomSpellIds(20,
......
......@@ -271,14 +271,14 @@ end
--
local function VUHDO_loadDefaultProfile()
local tName;
local function VUHDO_loadCurrentProfile()
if not VUHDO_CONFIG then
return;
end
if not VUHDO_CONFIG then return; end
local tName = VUHDO_CONFIG["CURRENT_PROFILE"];
tName = VUHDO_CONFIG["CURRENT_PROFILE"];
if (tName or "") ~= "" then
local _, tProfile = VUHDO_getProfileNamedCompressed(tName);
if tProfile then
......@@ -288,7 +288,52 @@ local function VUHDO_loadDefaultProfile()
end
VUHDO_loadProfileNoInit(tName);
else
VUHDO_Msg("Error: Currently selected profile \"" .. tName .. "\" doesn't exist.", 1, 0.4, 0.4);
end
end
end
--
local function VUHDO_loadDefaultProfile()
if not VUHDO_CONFIG then
return;
elseif ((VUHDO_CONFIG["CURRENT_PROFILE"] or "") == "") and
((VUHDO_DEFAULT_PROFILE or "") ~= "") then
local _, tProfile = VUHDO_getProfileNamedCompressed(VUHDO_DEFAULT_PROFILE);
if tProfile then
if tProfile["LOCKED"] then -- Nicht laden, Einstellungen wurden ja auch nicht automat. gespeichert
VUHDO_Msg("Profile " .. tProfile["NAME"] .. " is currently locked and has NOT been loaded.");
return;
end
VUHDO_loadProfile(VUHDO_DEFAULT_PROFILE);
else
VUHDO_Msg("Error: Default profile \"" .. VUHDO_DEFAULT_PROFILE .. "\" doesn't exist.", 1, 0.4, 0.4);
end
else
return;
end
end
--
local function VUHDO_loadDefaultLayout()
if not VUHDO_SPEC_LAYOUTS then
return;
elseif ((VUHDO_SPEC_LAYOUTS["selected"] or "") == "") and
((VUHDO_DEFAULT_LAYOUT or "") ~= "") then
if VUHDO_SPELL_LAYOUTS and VUHDO_SPELL_LAYOUTS[VUHDO_DEFAULT_LAYOUT] ~= nil then
VUHDO_activateLayout(VUHDO_DEFAULT_LAYOUT);
else
VUHDO_Msg(VUHDO_I18N_SPELL_LAYOUT_NOT_EXIST_1 .. VUHDO_DEFAULT_LAYOUT .. VUHDO_I18N_SPELL_LAYOUT_NOT_EXIST_2, 1, 0.4, 0.4);
end
else
return;
end
end
......@@ -306,7 +351,9 @@ local function VUHDO_init()
if not VUHDO_RAID then VUHDO_RAID = { }; end
VUHDO_loadDefaultProfile(); -- 1. Diese Reihenfolge scheint wichtig zu sein, erzeugt
local tHasPerCharacterConfig = _G["VUHDO_CONFIG"] and true or false;
VUHDO_loadCurrentProfile(); -- 1. Diese Reihenfolge scheint wichtig zu sein, erzeugt
VUHDO_loadVariables(); -- 2. umgekehrt undefiniertes Verhalten (VUHDO_CONFIG ist nil etc.)
VUHDO_initAllBurstCaches();
VUHDO_initDefaultProfiles();
......@@ -338,6 +385,11 @@ local function VUHDO_init()
VUHDO_timeReloadUI(3);
VUHDO_aoeUpdateTalents();
if not tHasPerCharacterConfig then
VUHDO_loadDefaultProfile();
VUHDO_loadDefaultLayout();
end
end
......
......@@ -2179,15 +2179,33 @@ function VUHDO_createNewProfileName(aName, aUnitName)
tIdx = tIdx + 1;
tPrefix = aUnitName .. "(" .. tIdx .. "): ";
end
return tNewName;
end
local VUHDO_TARGET_PROFILE_NAME = nil;
--
function VUHDO_createNewLayoutName(aName, aUnitName)
local tIdx = 1;
local tLayout = { };
local tPrefix = aUnitName .. ": ";
while tLayout do
tNewName = tPrefix .. aName;
tLayout = VUHDO_SPELL_LAYOUTS[tNewName];
tIdx = tIdx + 1;
tPrefix = aUnitName .. "(" .. tIdx .. "): ";
end
return tNewName;
end
--
local VUHDO_TARGET_PROFILE_NAME = nil;
local function VUHDO_askSaveProfileCallback(aButtonNum)
local _, tProfile = VUHDO_getProfileNamedCompressed(VUHDO_TARGET_PROFILE_NAME);
if tProfile and aButtonNum == 2 and tProfile["HARDLOCKED"] then
......@@ -2198,6 +2216,15 @@ local function VUHDO_askSaveProfileCallback(aButtonNum)
if 1 == aButtonNum then -- Copy
VUHDO_TARGET_PROFILE_NAME = VUHDO_createNewProfileName(VUHDO_TARGET_PROFILE_NAME, VUHDO_PLAYER_NAME);
VUHDO_CONFIG["CURRENT_PROFILE"] = VUHDO_TARGET_PROFILE_NAME;
VUHDO_IS_DEFAULT_PROFILE = false;
if (VUHDO_CURR_LAYOUT ~= nil) then
VUHDO_CURR_LAYOUT = VUHDO_createNewLayoutName(VUHDO_CURR_LAYOUT, VUHDO_PLAYER_NAME);
VUHDO_SPEC_LAYOUTS["selected"] = VUHDO_CURR_LAYOUT;
VUHDO_IS_DEFAULT_LAYOUT = false;
end
elseif 2 == aButtonNum then -- Overwrite
elseif 3 == aButtonNum then-- Discard
return;
......@@ -2213,8 +2240,21 @@ local function VUHDO_askSaveProfileCallback(aButtonNum)
VUHDO_PROFILES[tIndex]["HARDLOCKED"] = false;
end
if VUHDO_IS_DEFAULT_PROFILE then
VUHDO_DEFAULT_PROFILE = VUHDO_PROFILES[tIndex]["NAME"];
elseif VUHDO_DEFAULT_PROFILE == VUHDO_PROFILES[tIndex]["NAME"] then
VUHDO_DEFAULT_PROFILE = nil;
end
VUHDO_Msg(VUHDO_I18N_PROFILE_SAVED .. "\"" .. VUHDO_TARGET_PROFILE_NAME .. "\"");
VUHDO_updateProfileSelectCombo();
if ((VUHDO_CURR_LAYOUT or "") == "") then
VUHDO_SPEC_LAYOUTS["selected"] = "";
elseif ((VUHDO_SPEC_LAYOUTS["selected"] or "") ~= "") then
VUHDO_CURR_LAYOUT = VUHDO_SPEC_LAYOUTS["selected"];
VUHDO_saveKeyLayoutCallback(VUHDO_YES);
end
end
......
......@@ -608,7 +608,11 @@ VUHDO_I18N_TT.K549 = "Mit dieser Option wird das gewählte Arrangement bei BIS Z
VUHDO_I18N_TT.K550 = "Zeigt einen 20er Raid als Testeinstellung."
VUHDO_I18N_TT.K551 = "Mit dieser Option wird das gewählte Arrangement bei BIS ZU 30 Spielern automatisch aktiviert.";
VUHDO_I18N_TT.K552 = "Zeigt einen 30er Raid als Testeinstellung."
VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characters on this account."
VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
VUHDO_I18N_APPLY_TO_ALL = "für alle";
VUHDO_I18N_TEST = "Test"; -- nv
VUHDO_I18N_ADD = "Hinzufügen";
......
......@@ -186,7 +186,7 @@ VUHDO_I18N_TT.K062 = "Overheal will lighten up the health bar if selected.";
VUHDO_I18N_TT.K063 = "Check to also show incoming heal done by yourself. This is felt to be misleading by some players.";
VUHDO_I18N_TT.K065 = "Select the refresh rate for checking if players are in range. Info: Low values may reduce system performance.";
VUHDO_I18N_TT.K066 = "Check this to do check the range of a \"typical\" spell. Also select this if you dont have any beneficial spells.";
VUHDO_I18N_TT.K067 = "Enter spell name whose range will be taken for range ckecking.";
VUHDO_I18N_TT.K067 = "Enter spell name whose range will be taken for range checking.";
VUHDO_I18N_TT.K068 = "Select this to have the spell range checked due to the range of the spell to the right.";
VUHDO_I18N_TT.K070 = "Select a percentage of bar height for HoT icon size";
VUHDO_I18N_TT.K071 = "Select to show HoT icon on the RIGHT side INSIDE of the health bar";
......@@ -607,7 +607,11 @@ VUHDO_I18N_TT.K549 = "If you check this button the currently selected arrangemen
VUHDO_I18N_TT.K550 = "Select this to show a 20 players raid for testing."
VUHDO_I18N_TT.K551 = "If you check this button the currently selected arrangement will automatically enabled if you are in a raid of up to 30 players.";
VUHDO_I18N_TT.K552 = "Select this to show a 30 players raid for testing."
VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characters on this account."
VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
VUHDO_I18N_APPLY_TO_ALL = "apply all";
VUHDO_I18N_TEST = "Test";
VUHDO_I18N_ADD = "Add";
......@@ -1080,3 +1084,4 @@ VUHDO_I18N_HEALTH_COLOR = "Health\nColor";
VUHDO_I18N_HIDE = "Hide";
VUHDO_I18N_LEAVE_ALONE = "Leave alone";
VUHDO_I18N_READY_CHECK = "Ready\nCheck";
......@@ -186,7 +186,7 @@ VUHDO_I18N_TT.K062 = "Overheal will lighten up the health bar if selected.";
VUHDO_I18N_TT.K063 = "Check to also show incoming heal done by yourself. This is felt to be misleading by some players.";
VUHDO_I18N_TT.K065 = "Select the refresh rate for checking if players are in range. Info: Low values may reduce system performance.";
VUHDO_I18N_TT.K066 = "Check this to do check the range of a \"typical\" spell. Also select this if you dont have any beneficial spells.";
VUHDO_I18N_TT.K067 = "Enter spell name whose range will be taken for range ckecking.";
VUHDO_I18N_TT.K067 = "Enter spell name whose range will be taken for range checking.";
VUHDO_I18N_TT.K068 = "Select this to have the spell range checked due to the range of the spell to the right.";
VUHDO_I18N_TT.K070 = "Select a percentage of bar height for HoT icon size";
VUHDO_I18N_TT.K071 = "Select to show HoT icon on the RIGHT side INSIDE of the health bar";
......@@ -615,7 +615,11 @@ VUHDO_I18N_TT.K549 = "If you check this button the currently selected arrangemen
VUHDO_I18N_TT.K550 = "Select this to show a 20 players raid for testing."
VUHDO_I18N_TT.K551 = "If you check this button the currently selected arrangement will automatically enabled if you are in a raid of up to 30 players.";
VUHDO_I18N_TT.K552 = "Select this to show a 30 players raid for testing."
VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characters on this account."
VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
VUHDO_I18N_APPLY_TO_ALL = "apply all";
VUHDO_I18N_TEST = "Test";
VUHDO_I18N_ADD = "Add";
......
......@@ -617,7 +617,11 @@ VUHDO_I18N_TT.K549 = "Si vous cochez ce bouton, l'arrangement actuel s
VUHDO_I18N_TT.K550 = "Afficher un raid de 20 joueurs pour test."
VUHDO_I18N_TT.K551 = "Si vous cochez ce bouton, l'arrangement actuel slectionn va automatiquement s'activer si vous tes dans un raid maximum 30 joueurs.";
VUHDO_I18N_TT.K552 = "Afficher un raid de 30 joueurs pour test."
VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characters on this account."
VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
VUHDO_I18N_APPLY_TO_ALL = "appliquez tous";
VUHDO_I18N_TEST = "Test";
VUHDO_I18N_ADD = "Ajouter";
......
......@@ -715,7 +715,11 @@ VUHDO_I18N_TT.K549 = "If you check this button the currently selected arrangemen
VUHDO_I18N_TT.K550 = "Select this to show a 20 players raid for testing."
VUHDO_I18N_TT.K551 = "If you check this button the currently selected arrangement will automatically enabled if you are in a raid of up to 30 players.";
VUHDO_I18N_TT.K552 = "Select this to show a 30 players raid for testing."
VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characters on this account."
VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
VUHDO_I18N_APPLY_TO_ALL = "Применить\nко всем";
VUHDO_I18N_TEST = "Тест";
VUHDO_I18N_ADD = "Добавить";
......
......@@ -609,7 +609,11 @@ VUHDO_I18N_TT.K549 = "If you check this button the currently selected arrangemen
VUHDO_I18N_TT.K550 = "Select this to show a 20 players raid for testing."
VUHDO_I18N_TT.K551 = "If you check this button the currently selected arrangement will automatically enabled if you are in a raid of up to 30 players.";
VUHDO_I18N_TT.K552 = "Select this to show a 30 players raid for testing."
VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characters on this account."
VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
VUHDO_I18N_APPLY_TO_ALL = "全部应用";
VUHDO_I18N_TEST = "测试";
VUHDO_I18N_ADD = "添加";
......
......@@ -609,7 +609,11 @@ VUHDO_I18N_TT.K549 = "If you check this button the currently selected arrangemen
VUHDO_I18N_TT.K550 = "Select this to show a 20 players raid for testing."
VUHDO_I18N_TT.K551 = "If you check this button the currently selected arrangement will automatically enabled if you are in a raid of up to 30 players.";
VUHDO_I18N_TT.K552 = "Select this to show a 30 players raid for testing."
VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characters on this account."
VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."
VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
VUHDO_I18N_APPLY_TO_ALL = "全部應用";
VUHDO_I18N_TEST = "測試";
VUHDO_I18N_ADD = "添加";
......
......@@ -80,13 +80,6 @@ function VUHDO_tabbedPanelOkayClicked(aButton)
VUHDO_initFromSpellbook();
VUHDO_registerAllBouquets(false);
if (VUHDO_CURR_LAYOUT == "") then
VUHDO_SPEC_LAYOUTS["selected"] = "";
elseif ((VUHDO_SPEC_LAYOUTS["selected"] or "") ~= "") then
VUHDO_CURR_LAYOUT = VUHDO_SPEC_LAYOUTS["selected"];
VUHDO_saveKeyLayoutCallback(VUHDO_YES);
end
local _, tProfile = VUHDO_getProfileNamedCompressed(VUHDO_CONFIG["CURRENT_PROFILE"]);
if (VUHDO_CURRENT_PROFILE == "") then
VUHDO_CONFIG["CURRENT_PROFILE"] = "";
......
local _;
VUHDO_KEY_LAYOUT_COMBO_MODEL = { };
VUHDO_CURR_LAYOUT = "";
VUHDO_IS_DEFAULT_LAYOUT = false;
......@@ -34,6 +35,8 @@ function VUHDO_keyLayoutComboChanged(aComboBox, aValue)
local tSpec2CheckButton = _G[tParentName .. "Spec2CheckButton"];
tSpec2CheckButton:SetChecked(aValue == VUHDO_SPEC_LAYOUTS["2"]);
VUHDO_lnfCheckButtonClicked(tSpec2CheckButton);
VUHDO_updateDefaultLayoutCheckButton(aComboBox:GetParent():GetParent());
end
......@@ -55,6 +58,11 @@ function VUHDO_deleteKeyLayoutCallback(aDecision)
VUHDO_Msg(format(VUHDO_I18N_DELETED_KEY_LAYOUT, VUHDO_CURR_LAYOUT));
VUHDO_SPELL_LAYOUTS[VUHDO_CURR_LAYOUT] = nil;
if (VUHDO_CURR_LAYOUT == VUHDO_SPEC_LAYOUTS["selected"]) then
if (VUHDO_CURR_LAYOUT == VUHDO_DEFAULT_LAYOUT) then
VUHDO_DEFAULT_LAYOUT = nil;
VUHDO_IS_DEFAULT_LAYOUT = false;
end
VUHDO_SPEC_LAYOUTS["selected"] = "";
VUHDO_CURR_LAYOUT = "";
else
......@@ -125,7 +133,14 @@ function VUHDO_saveKeyLayoutCallback(aDecision)
VUHDO_SPEC_LAYOUTS["selected"] = VUHDO_CURR_LAYOUT;
if VUHDO_IS_DEFAULT_LAYOUT then
VUHDO_DEFAULT_LAYOUT = VUHDO_CURR_LAYOUT;
elseif VUHDO_DEFAULT_LAYOUT == VUHDO_CURR_LAYOUT then
VUHDO_DEFAULT_LAYOUT = nil;
end
VUHDO_Msg(format(VUHDO_I18N_KEY_LAYOUT_SAVED, VUHDO_CURR_LAYOUT));
VUHDO_initKeyLayoutComboModel();
VUHDO_lnfComboBoxInitFromModel(VuhDoNewOptionsToolsKeyLayoutsStorePanelLayoutCombo);
end
......@@ -165,3 +180,45 @@ function VUHDO_shareCurrentKeyLayout(aUnitName, aKeyLayoutName)
local tQuestion = VUHDO_PLAYER_NAME .. " requests to transmit\nKey Layout " .. aKeyLayoutName .. " to you.\nProceed?"
VUHDO_startShare(aUnitName, { aKeyLayoutName, tLayout }, sCmdKeyLayoutDataChunk, sCmdKeyLayoutDataEnd, tQuestion);
end
--
function VUHDO_keyLayoutDefaultLayoutCheckButtonClicked(aButton)
local tEditBox = _G[aButton:GetParent():GetName() .. "SaveAsEditBox"];
local tLayout = VUHDO_SPELL_LAYOUTS[VUHDO_CURR_LAYOUT];
if (tLayout ~= nil or (strtrim(tEditBox:GetText()) or "") ~= "") then
VUHDO_IS_DEFAULT_LAYOUT = VUHDO_forceBooleanValue(aButton:GetChecked());
else
VUHDO_Msg(VUHDO_I18N_SELECT_KEY_LAYOUT_FIRST, 1, 0.4, 0.4);
end
end
--
function VUHDO_keyLayoutInitDefaultLayoutCheckButton(aButton)
local tLayout = VUHDO_SPELL_LAYOUTS[VUHDO_CURR_LAYOUT];
if (tLayout ~= nil and VUHDO_CURR_LAYOUT == VUHDO_DEFAULT_LAYOUT) then
VUHDO_IS_DEFAULT_LAYOUT = true;
aButton:SetChecked(true);
else
VUHDO_IS_DEFAULT_LAYOUT = false;
aButton:SetChecked(false);
end
VUHDO_lnfCheckButtonClicked(aButton);
end
--
function VUHDO_updateDefaultLayoutCheckButton(aPanel)
VUHDO_keyLayoutInitDefaultLayoutCheckButton(_G[aPanel:GetName() .. "StorePanelDefaultLayoutCheckButton"]);
end
......@@ -5,7 +5,7 @@
<Frames>
<Frame name="$parentStorePanel" inherits="VuhDoPanelTemplate">
<Size>
<AbsDimension x="320" y="167" />
<AbsDimension x="320" y="177" />
</Size>
<Anchors>
<Anchor point="TOPLEFT">
......@@ -40,7 +40,7 @@
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="17" y="-115" />
<AbsDimension x="17" y="-137" />
</Offset>
</Anchor>
</Anchors>
......@@ -122,6 +122,34 @@
</Scripts>
</CheckButton>
<CheckButton name="$parentDefaultLayoutCheckButton" text="VUHDO_I18N_DEFAULT_LAYOUT" inherits="VuhDoCheckButtonTemplate">
<Size>
<AbsDimension x="125" y="32" />
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="13" y="-107" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
VUHDO_lnfSetTooltip(self, VUHDO_I18N_TT.K554);
</OnLoad>
<OnShow>
VUHDO_lnfCheckButtonInitFromModel(self);
VUHDO_keyLayoutInitDefaultLayoutCheckButton(self);
VUHDO_lnfPatchFont(self, "Label");
VUHDO_lnfRadioButtonOnShow(self);
</OnShow>
<OnClick>
VUHDO_lnfCheckButtonClicked(self);
VUHDO_keyLayoutDefaultLayoutCheckButtonClicked(self);
</OnClick>
</Scripts>
</CheckButton>
<Button name="$parentDeleteButton" text="VUHDO_I18N_DELETE" inherits="VuhDoButtonTemplate">
<Size>
<AbsDimension x="100" y="32" />
......
local _;
VUHDO_IS_DEFAULT_PROFILE = false;
VUHDO_CURRENT_PROFILE = "";
VUHDO_PROFILE_TABLE_MODEL = { };
......@@ -117,6 +118,45 @@ end
--
function VUHDO_skinsDefaultProfileCheckButtonClicked(aButton)
local tIndex, _ = VUHDO_getProfileNamedCompressed(VUHDO_CURRENT_PROFILE);
if (tIndex ~= nil) then
VUHDO_IS_DEFAULT_PROFILE = VUHDO_forceBooleanValue(aButton:GetChecked());
else
VUHDO_Msg(VUHDO_I18N_ERROR_NO_PROFILE .. "\"" .. VUHDO_CURRENT_PROFILE .. "\" !", 1, 0.4, 0.4);
end
end
--
function VUHDO_skinsInitDefaultProfileCheckButton(aButton)
local tIndex, _ = VUHDO_getProfileNamedCompressed(VUHDO_CURRENT_PROFILE);
if (tIndex ~= nil and VUHDO_CURRENT_PROFILE == VUHDO_DEFAULT_PROFILE) then
VUHDO_IS_DEFAULT_PROFILE = true;
aButton:SetChecked(true);
else
VUHDO_IS_DEFAULT_PROFILE = false;
aButton:SetChecked(false);
end
VUHDO_lnfCheckButtonClicked(aButton);
end
--
function VUHDO_updateDefaultProfileCheckButton(aPanel)
VUHDO_skinsInitDefaultProfileCheckButton(_G[aPanel:GetName() .. "LoadSavePanelDefaultProfileCheckButton"]);
end
--
local tButton;
local function VUHDO_updateAllAutoProfiles(aPanel)
......@@ -218,6 +258,7 @@ function VUHDO_profileComboValueChanged(aComboBox, aValue)
end
VUHDO_updateAllAutoProfiles(aComboBox:GetParent():GetParent());
VUHDO_updateDefaultProfileCheckButton(aComboBox:GetParent():GetParent());
end
......@@ -248,6 +289,11 @@ function VUHDO_deleteProfile(aName)
tremove(VUHDO_PROFILES, tIndex);
VUHDO_deleteAutoProfile(aName);
if (VUHDO_CURRENT_PROFILE == VUHDO_CONFIG["CURRENT_PROFILE"]) then
if (VUHDO_CURRENT_PROFILE == VUHDO_DEFAULT_PROFILE) then
VUHDO_DEFAULT_PROFILE = nil;
VUHDO_IS_DEFAULT_PROFILE = false;
end
VUHDO_CURRENT_PROFILE = "";
VUHDO_CONFIG["CURRENT_PROFILE"] = "";
else
......
......@@ -30,7 +30,7 @@
<Frame name="$parentLoadSavePanel" inherits="VuhDoPanelTemplate">
<Size>
<AbsDimension x="230" y="215" />
<AbsDimension x="235" y="255" />
</Size>
<Anchors>
<Anchor point="TOPLEFT">
......@@ -163,6 +163,34 @@
</Scripts>
</EditBox>
<CheckButton name="$parentDefaultProfileCheckButton" text="VUHDO_I18N_DEFAULT_PROFILE" inherits="VuhDoCheckButtonTemplate">
<Size>
<AbsDimension x="125" y="32" />
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="13" y="-173" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
VUHDO_lnfSetTooltip(self, VUHDO_I18N_TT.K553);
</OnLoad>
<OnShow>
VUHDO_lnfCheckButtonInitFromModel(self);
VUHDO_skinsInitDefaultProfileCheckButton(self);
VUHDO_lnfPatchFont(self, "Label");
VUHDO_lnfRadioButtonOnShow(self);
</OnShow>
<OnClick>
VUHDO_lnfCheckButtonClicked(self);
VUHDO_skinsDefaultProfileCheckButtonClicked(self);
</OnClick>
</Scripts>
</CheckButton>
<Button name="$parentProfileSaveButton" text="VUHDO_I18N_SAVE" inherits="VuhDoButtonTemplate">
<Size>
<AbsDimension x="100" y="32" />
......@@ -170,7 +198,7 @@
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="65" y="-173" />
<AbsDimension x="70" y="-213" />
</Offset>
</Anchor>
</Anchors>
......@@ -485,7 +513,7 @@
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="60" y="-270" />
<AbsDimension x="20" y="-285" />
</Offset>
</Anchor>
</Anchors>
......
......@@ -4,12 +4,16 @@ Version 3.65.
Bugfixes:
-- Fixed profile activation due to group size 20
-- Fixed the inability of players without assist to see ready checks
-- Fixed VuhDo Options tooltip mispellings in EN and ES localizations
Improvements:
-- Added new raid group size 30 man
-- Tools > Profiles > Activate due to group size
-- Move > Hold to Test
-- Added ability to select a default profile and key layout
-- Defaults are applied when no existing settings are found
-- Also a workaround for bugged settings on Mac OS X clients
--------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment