- Fixed the minimap button issue.

- Major rewrite over window properties.
- Skin support has been rewrite and now is more flexive.
- Added new customization options on options panel.
This commit is contained in:
terciob19
2014-01-14 13:09:17 -02:00
parent bf63129247
commit 9f903cf2b4
33 changed files with 3821 additions and 1949 deletions
+123 -4
View File
@@ -30,8 +30,14 @@ end
_detalhes_database.nick_tag_cache = _detalhes.nick_tag_cache
_detalhes_database.only_pvp_frags = _detalhes.only_pvp_frags
--> minimap
_detalhes_database.minimap = _detalhes.minimap
--> save instances (windows)
_detalhes_database.tabela_instancias = _detalhes.tabela_instancias
_detalhes_database.class_icons_small = _detalhes.class_icons_small
_detalhes_database.class_coords = _detalhes.class_coords
_detalhes_database.class_colors = _detalhes.class_colors
--> character info
_detalhes_database.character_data = _detalhes.character_data
--> options data
@@ -59,7 +65,6 @@ end
-- colors
_detalhes_database.default_bg_color = _detalhes.default_bg_color
_detalhes_database.default_bg_alpha = _detalhes.default_bg_alpha
_detalhes_database.class_colors = _detalhes.class_colors
-- fades
_detalhes_database.row_fade_in = _detalhes.row_fade_in
_detalhes_database.windows_fade_in = _detalhes.windows_fade_in
@@ -165,7 +170,10 @@ end --]]
_detalhes.nick_tag_cache = _detalhes_database.nick_tag_cache or {}
_detalhes:NickTagSetCache (_detalhes.nick_tag_cache)
_detalhes.only_pvp_frags = _detalhes_database.only_pvp_frags
--> minimap
_detalhes.minimap = _detalhes_database.minimap
--> character info
_detalhes.character_data = _detalhes_database.character_data
@@ -195,7 +203,10 @@ end --]]
--> instances (windows)
_detalhes.tabela_instancias = _detalhes_database.tabela_instancias or {}
_detalhes.class_icons_small = _detalhes_database.class_icons_small
_detalhes.class_coords = _detalhes_database.class_coords
_detalhes.class_colors = _detalhes_database.class_colors
--> get last combat table
local historico_UM = _detalhes.tabela_historico.tabelas[1]
@@ -247,7 +258,6 @@ end --]]
_detalhes.report_lines = _detalhes_database.report_lines
_detalhes.report_to_who = _detalhes_database.report_to_who
-- colors
_detalhes.class_colors = _detalhes_database.class_colors
_detalhes.default_bg_color = _detalhes_database.default_bg_color
_detalhes.default_bg_alpha = _detalhes_database.default_bg_alpha
-- fades
@@ -367,4 +377,113 @@ function _detalhes:WipeConfig()
b:SetScript ("OnClick", function() _detalhes.wipe_full_config = true; ReloadUI(); end)
b:SetPoint ("center", UIParent, "center", 0, 0)
end
function _detalhes:ApplyConfigDataOnLoad()
--> basic
self.instances_amount = self.instances_amount or 12
self.segments_amount = self.segments_amount or 12
self.segments_amount_to_save = self.segments_amount_to_save or 5
self.memory_threshold = self.memory_threshold or 3
self.memory_ram = self.memory_ram or 64
self.deadlog_limit = self.deadlog_limit or 12
self.minimum_combat_time = self.minimum_combat_time or 5
self.update_speed = self.update_speed or 1
self.time_type = self.time_type or 1
self.row_fade_in = self.row_fade_in or {"in", 0.2}
self.row_fade_out = self.row_fade_out or {"out", 0.2}
self.windows_fade_in = self.windows_fade_in or {"in", 0.2}
self.windows_fade_out = self.windows_fade_out or {"out", 0.2}
self.default_bg_color = self.default_bg_color or 0.0941
self.default_bg_alpha = self.default_bg_alpha or 0.7
self.new_window_size = self.new_window_size or {width = 300, height = 95}
self.max_window_size = self.max_window_size or {width = 480, height = 450}
self.window_clamp = self.window_clamp or {-8, 0, 21, -14}
self.window_clamp = {-8, 0, 21, -14}
self.report_lines = self.report_lines or 5
self.report_to_who = self.report_to_who or ""
self.animate_scroll = self.animate_scroll or false
self.use_scroll = self.use_scroll or false
self.font_sizes = self.font_sizes or {menus = 10}
self.minimap = self.minimap or {hide = false, radius = 160, minimapPos = 220}
--> tutorial
self.tutorial = self.tutorial or {}
self.tutorial.logons = self.tutorial.logons or 0
self.tutorial.unlock_button = self.tutorial.unlock_button or 0
self.tutorial.version_announce = self.tutorial.version_announce or 0
self.tutorial.main_help_button = self.tutorial.main_help_button or 0
self.tutorial.alert_frames = self.tutorial.alert_frames or {false, false, false, false, false, false}
self.tutorial.logons = self.tutorial.logons + 1
self.tutorial.main_help_button = self.tutorial.main_help_button + 1
self.character_data = self.character_data or {logons = 0}
self.character_data.logons = self.character_data.logons + 1
--> class colors
if (not self.class_colors or not self.class_colors.version or self.class_colors.version < self.class_colors_version) then
self.class_colors = {version = 1}
for classe, tabela_cor in pairs ( RAID_CLASS_COLORS ) do
self.class_colors [classe] = {tabela_cor.r, tabela_cor.g, tabela_cor.b}
end
self.class_colors ["UNKNOW"] = {0.2, 0.2, 0.2}
self.class_colors ["UNGROUPPLAYER"] = {0.4, 0.4, 0.4}
self.class_colors ["PET"] = {0.3, 0.4, 0.5}
self.class_colors ["ENEMY"] = {0.94117, 0, 0.01960, 1}
end
self.class_icons_small = self.class_icons_small or [[Interface\AddOns\Details\images\classes_small]]
--> class coords
if (not self.class_coords or not self.class_coords.version or self.class_coords.version < self.class_coords_version) then
self.class_coords = {}
for class, tcoord in pairs (_G.CLASS_ICON_TCOORDS) do
self.class_coords [class] = tcoord
end
self.class_coords ["Alliance"] = {0.49609375, 0.7421875, 0.75, 1}
self.class_coords ["Horde"] = {0.7421875, 0.98828125, 0.75, 1}
self.class_coords ["PET"] = {0.25, 0.49609375, 0.75, 1}
self.class_coords ["MONSTER"] = {0, 0.25, 0.75, 1}
self.class_coords ["ENEMY"] = {0, 0.25, 0.75, 1}
self.class_coords ["UNKNOW"] = {0.5, 0.75, 0.75, 1}
self.class_coords ["UNGROUPPLAYER"] = {0.5, 0.75, 0.75, 1}
end
--> booleans
if (type (self.trash_concatenate) ~= "boolean") then
self.trash_concatenate = false
end
if (type (self.trash_auto_remove) ~= "boolean") then
self.trash_auto_remove = false
end
if (type (self.only_pvp_frags) ~= "boolean") then
self.only_pvp_frags = false
end
if (type (self.remove_realm_from_name) ~= "boolean") then
self.remove_realm_from_name = true
end
if (type (self.cloud_capture) ~= "boolean") then
self.cloud_capture = true
end
if (type (self.segments_panic_mode) ~= "boolean") then
self.segments_panic_mode = true
end
if (type (self.clear_graphic) ~= "boolean") then
self.clear_graphic = self.clear_graphic or true
end
if (type (self.clear_ungrouped) ~= "boolean") then
self.clear_ungrouped = self.clear_ungrouped or true
end
if (type (self.use_row_animations) ~= "boolean") then
self.use_row_animations = self.use_row_animations or false
end
end
+81 -5
View File
@@ -38,7 +38,23 @@ local _
can_change_alpha_head = false,
icon_anchor_main = {-1, 1},
icon_anchor_plugins = {-9, -7},
icon_plugins_size = {19, 19}
icon_plugins_size = {19, 19},
-- the four anchors:
icon_point_anchor = {-37, 0},
left_corner_anchor = {-107, 0},
close_button_anchor = {5, -6},
right_corner_anchor = {96, 0},
icon_point_anchor_bottom = {-37, 0},
left_corner_anchor_bottom = {-107, 0},
close_button_anchor_bottom = {5, 6},
right_corner_anchor_bottom = {96, 0},
instance_cprops = {
menu_anchor = {5, 1},
}
})
_detalhes:InstallSkin ("Flat Color", {
@@ -47,21 +63,81 @@ local _
version = "1.0",
site = "unknown",
desc = "a flat skin",
micro_frames = {color = {1, 1, 1, 1}, font = "Friz Quadrata TT", size = 10},
can_change_alpha_head = true,
icon_anchor_main = {-1, -5},
icon_anchor_plugins = {-7, -13},
icon_plugins_size = {19, 18}
icon_plugins_size = {19, 18},
-- the four anchors:
icon_point_anchor = {-37, 0},
left_corner_anchor = {-107, 0},
close_button_anchor = {5, -6},
right_corner_anchor = {96, 0},
icon_point_anchor_bottom = {-37, 12},
left_corner_anchor_bottom = {-107, 0},
close_button_anchor_bottom = {5, 6},
right_corner_anchor_bottom = {96, 0},
})
-- 0.00048828125
--reset 19 514 83 530
--close
_detalhes:InstallSkin ("Simply Gray", {
file = [[Interface\AddOns\Details\images\skins\simplygray_skin]],
author = "Details!",
version = "1.0",
site = "unknown",
desc = "a flat skin",
--general
can_change_alpha_head = true,
icon_anchor_main = {-1, -5},
icon_anchor_plugins = {-7, -13},
icon_plugins_size = {19, 18}
--icon anchors
icon_anchor_main = {-1, -5},
icon_anchor_plugins = {-7, -13},
icon_plugins_size = {19, 18},
--micro frames
micro_frames = {color = {.7, .7, .7, 1}, font = "Arial Narrow", size = 11},
--reset button
reset_button_coords = {0.01904296875, 0.0673828125, 0.50244140625, 0.51708984375},
reset_button_small_coords = {0.11669921875, 0.13720703125, 0.50244140625, 0.51708984375},
--instance button
instance_button_coords = {0.01904296875, 0.04736328125, 0.48388671875, 0.49853515625},
--close button
close_button_coords = {0.01904296875, 0.03369140625, 0.52197265625, 0.53662109375},
close_button_size = {18, 18},
-- the four anchors (for when the toolbar is on the top side)
icon_point_anchor = {-37, 0},
left_corner_anchor = {-107, 0},
close_button_anchor = {-2, 0},
right_corner_anchor = {96, 0},
-- the four anchors (for when the toolbar is on the bottom side)
icon_point_anchor_bottom = {-37, 12},
left_corner_anchor_bottom = {-107, 0},
close_button_anchor_bottom = {-2, 0},
right_corner_anchor_bottom = {96, 0},
--instance overwrites
--[[ when a skin is selected, all customized properties of the window is reseted and then the overwrites are applied]]
--[[ for the complete cprop list see the file classe_instancia_include.lua]]
instance_cprops = {
resetbutton_info = {text_color = {0.7, 0.7, 0.7, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {.5, .5, .5, 1}},
instancebutton_info = {text_color = {.7, .7, .7, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {.5, .5, .5, 1}},
menu_anchor = {-18, 1},
instance_button_anchor = {-27, 3},
hide_icon = true,
}
})
+12
View File
@@ -294,6 +294,18 @@ function SlashCmdList.DETAILS (msg, editbox)
print (Loc ["STRING_DETAILS1"] .. "capture has been reseted.")
--> debug
elseif (command == "barra") then
local qual_barra = rest and tonumber (rest) or 1
local instancia = _detalhes.tabela_instancias [1]
local barra = instancia.barras [qual_barra]
for i = 1, barra:GetNumPoints() do
local point, relativeTo, relativePoint, xOfs, yOfs = barra:GetPoint (i)
print (point, relativeTo, relativePoint, xOfs, yOfs)
end
elseif (msg == "opened") then
print ("Instances opened: " .. _detalhes.opened_windows)