- Added 2 new textures: BantoBar and Skyline.

- Added 6 new fonts: Oswald, Nueva Std Cond, Accidental Presidency, TrashHand, Harry P, Forced Square.
- Many improvements done on Welcome Screen.

- New API: _detalhes.table.deploy (t1, t2) copy values from t2 to t1.
This commit is contained in:
tercio
2014-08-23 15:04:01 -03:00
parent f97b9fbe42
commit 50f33fd301
15 changed files with 217 additions and 15 deletions
+17 -7
View File
File diff suppressed because one or more lines are too long
+11
View File
@@ -190,6 +190,17 @@
end
end
function _detalhes.table.deploy (t1, t2)
for key, value in pairs (t2) do
if (type (value) == "table") then
t1 [key] = t1 [key] or {}
_detalhes.table.deploy (t1 [key], t2 [key])
else
t1 [key] = value
end
end
end
function _detalhes:hex (num)
local hexstr = '0123456789abcdef'
local s = ''
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+44
View File
@@ -0,0 +1,44 @@
Copyright (c) 2012, Vernon Adams (vern@newtypography.co.uk),
with Reserved Font Name Oswald
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
+3 -1
View File
@@ -844,7 +844,9 @@ function gump:NewDropDown (parent, container, name, member, w, h, func, default)
container = container.widget
end
default = default or 1
if (default == nil) then
default = 1
end
--> default members:
--> hooks
+1 -1
View File
@@ -207,7 +207,7 @@ local _
bg_alpha = 0.2,
row_info = {
texture = "Details Serenity",
texture = "BantoBar", --"Details Serenity"
font_face = "Arial Narrow",
texture_background_class_color = false,
texture_background = "Details Serenity",
+3
View File
@@ -3120,6 +3120,9 @@ function _detalhes:InstanceRefreshRows (instancia)
backdrop_color = self.row_info.backdrop.color
end
--font face
self.row_info.font_face_file = SharedMedia:Fetch ("font", self.row_info.font_face)
-- do it
for _, row in _ipairs (self.barras) do
+138 -6
View File
@@ -196,7 +196,7 @@ function _detalhes:OpenWelcomeWindow ()
end
_detalhes.standard_skin = savedObject
end
-- frame alert
local frame_alert = CreateFrame ("frame", nil, window)
@@ -210,6 +210,8 @@ function _detalhes:OpenWelcomeWindow ()
frame_alert.alert:SetFrameStrata ("FULLSCREEN")
frame_alert.alert:Hide()
local window_openned_at = time()
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> page 1
@@ -347,7 +349,43 @@ function _detalhes:OpenWelcomeWindow ()
texto_avatar3:SetJustifyV ("top")
texto_avatar3:SetTextColor (1, 1, 1, 1)
pages [#pages+1] = {bg555, bg_avatar, texto_avatar1, texto_avatar2, texto_avatar3, changemind, avatar_image, avatar_bg, nickname, nicknamelabel, nicknamebox, avatarbutton}
local pleasewait = window:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
pleasewait:SetPoint ("bottomright", forward, "topright")
local free_frame3 = CreateFrame ("frame", nil, window)
function _detalhes:FreeTutorialFrame3()
if (window_openned_at+10 > time()) then
pleasewait:Show()
forward:Disable()
pleasewait:SetText ("wait... " .. window_openned_at + 10 - time())
else
pleasewait:Hide()
pleasewait:SetText ("")
forward:Enable()
_detalhes:CancelTimer (window.free_frame3_schedule)
window.free_frame3_schedule = nil
end
end
free_frame3:SetScript ("OnShow", function()
if (window_openned_at+10 > time()) then
forward:Disable()
if (window.free_frame3_schedule) then
_detalhes:CancelTimer (window.free_frame3_schedule)
window.free_frame3_schedule = nil
end
window.free_frame3_schedule = _detalhes:ScheduleRepeatingTimer ("FreeTutorialFrame3", 1)
end
end)
free_frame3:SetScript ("OnHide", function()
if (window.free_frame3_schedule) then
_detalhes:CancelTimer (window.free_frame3_schedule)
window.free_frame3_schedule = nil
pleasewait:SetText ("")
pleasewait:Hide()
end
end)
pages [#pages+1] = {pleasewait, free_frame3, bg555, bg_avatar, texto_avatar1, texto_avatar2, texto_avatar3, changemind, avatar_image, avatar_bg, nickname, nicknamelabel, nicknamebox, avatarbutton}
for _, widget in ipairs (pages[#pages]) do
widget:Hide()
@@ -371,7 +409,7 @@ function _detalhes:OpenWelcomeWindow ()
texto55:SetText (Loc ["STRING_WELCOME_42"])
local texto555 = window:CreateFontString (nil, "overlay", "GameFontNormal")
texto555:SetPoint ("topleft", window, "topleft", 30, -190)
--texto555:SetPoint ("topleft", window, "topleft", 30, -190)
texto555:SetText (Loc ["STRING_WELCOME_45"])
texto555:SetTextColor (1, 1, 1, 1)
@@ -396,6 +434,100 @@ function _detalhes:OpenWelcomeWindow ()
skins_image:SetHeight (133)
skins_image:SetTexCoord (0, 0.41796875, 0, 0.259765625) --0, 0, 214 133
--import settings
local import_label = g:NewLabel (window, _, "$parentImportSettingsLabel", "ImportLabel", Loc ["STRING_WELCOME_46"])
import_label:SetPoint ("topleft", window, "topleft", 30, -160)
local convert_table = {
["bartexture"] = "row_info-texture",
["barfont"] = "row_info-font_face",
["barfontsize"] = "row_info-font_size",
["barspacing"] = "row_info-space-between",
["barheight"] = "row_info-height",
["barbgcolor"] = "row_info-fixed_texture_background_color",
["reversegrowth"] = "bars_grow_direction",
["barcolor"] = "row_info-fixed_texture_color",
["title"] = "attribute_text",
["background"] = "null"
}
local onSelectImport = function (_, _, keyname)
--window.ImportDropdown:Select (false)
local addon1_profile = _G.Skada.db.profile.windows [1]
local value = addon1_profile [keyname]
local dvalue = convert_table [keyname]
if (dvalue) then
local instance1 = _detalhes:GetInstance (1)
if (keyname == "barbgcolor") then
instance1.row_info.fixed_texture_background_color[1] = value.r
instance1.row_info.fixed_texture_background_color[2] = value.g
instance1.row_info.fixed_texture_background_color[3] = value.b
instance1.row_info.fixed_texture_background_color[4] = value.a
value = instance1.row_info.fixed_texture_background_color
elseif (keyname == "title") then
local v = instance1.attribute_text
v.enabled = true
v.text_face = value.font
v.anchor = {-17, 4}
v.text_size = value.fontsize
instance1.color[1], instance1.color[2], instance1.color[3], instance1.color[4] = value.color.r, value.color.g, value.color.b, value.color.a
value = v
elseif (keyname == "background") then
instance1.bg_alpha = value.color.a
instance1.bg_r = value.color.r
instance1.bg_g = value.color.g
instance1.bg_b = value.color.b
instance1.backdrop_texture = value.texture
instance1:ChangeSkin()
return
end
local key1, key2, key3 = strsplit ("-", dvalue)
if (key3) then
instance1 [key1] [key2] [key3] = value
elseif (key2) then
instance1 [key1] [key2] = value
elseif (key1) then
instance1 [key1] = value
end
instance1:ChangeSkin()
end
end
local ImportMenu = function()
local options = {}
if (_G.Skada) then
tinsert (options, {value = "bartexture", label = Loc ["STRING_WELCOME_47"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
tinsert (options, {value = "barfont", label = Loc ["STRING_WELCOME_48"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
tinsert (options, {value = "barfontsize", label = Loc ["STRING_WELCOME_49"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
tinsert (options, {value = "barspacing", label = Loc ["STRING_WELCOME_50"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
tinsert (options, {value = "barheight", label = Loc ["STRING_WELCOME_51"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
tinsert (options, {value = "barbgcolor", label = Loc ["STRING_WELCOME_52"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
tinsert (options, {value = "reversegrowth", label = Loc ["STRING_WELCOME_53"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
tinsert (options, {value = "barcolor", label = Loc ["STRING_WELCOME_54"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
tinsert (options, {value = "title", label = Loc ["STRING_WELCOME_55"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
tinsert (options, {value = "background", label = Loc ["STRING_WELCOME_56"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
--tinsert (options, {value = "", label = "", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
end
return options
end
local import_dropdown = g:NewDropDown (window, _, "$parentImportDropdown", "ImportDropdown", 140, 20, ImportMenu, false)
import_dropdown:SetPoint ("left", import_label, "right", 2, 0)
import_dropdown.tooltip = Loc ["STRING_WELCOME_57"]
--wallpapaer and skin
local wallpaper_label_switch = g:NewLabel (window, _, "$parentBackgroundLabel", "enablewallpaperLabel", Loc ["STRING_WELCOME_44"])
wallpaper_label_switch:SetPoint ("topleft", window, "topleft", 30, -180)
--skin
local onSelectSkin = function (_, _, skin_name)
local instance1 = _detalhes:GetInstance (1)
@@ -412,6 +544,7 @@ function _detalhes:OpenWelcomeWindow ()
local instance1 = _detalhes:GetInstance (1)
local skin_dropdown = g:NewDropDown (window, _, "$parentSkinDropdown", "skinDropdown", 140, 20, buildSkinMenu, instance1.skin)
skin_dropdown.tooltip = Loc ["STRING_WELCOME_58"]
local skin_label = g:NewLabel (window, _, "$parentSkinLabel", "skinLabel", Loc ["STRING_OPTIONS_INSTANCE_SKIN"])
skin_dropdown:SetPoint ("left", skin_label, "right", 2)
@@ -605,11 +738,10 @@ function _detalhes:OpenWelcomeWindow ()
local buildBackgroundMenu = function() return backgroundTable end
local wallpaper_switch = g:NewSwitch (window, _, "$parentUseBackgroundSlider", "useBackgroundSlider", 60, 20, _, _, instance.wallpaper.enabled)
wallpaper_switch.tooltip = Loc ["STRING_WELCOME_59"]
local wallpaper_dropdown1 = g:NewDropDown (window, _, "$parentBackgroundDropdown", "backgroundDropdown", 150, 20, buildBackgroundMenu, nil)
local wallpaper_dropdown2 = g:NewDropDown (window, _, "$parentBackgroundDropdown2", "backgroundDropdown2", 150, 20, buildBackgroundMenu2, nil)
local wallpaper_label_switch = g:NewLabel (window, _, "$parentBackgroundLabel", "enablewallpaperLabel", Loc ["STRING_WELCOME_44"])
wallpaper_label_switch:SetPoint ("topleft", window, "topleft", 30, -160)
wallpaper_switch:SetPoint ("left", wallpaper_label_switch, "right", 2)
wallpaper_dropdown1:SetPoint ("left", wallpaper_switch, "right", 2)
wallpaper_dropdown2:SetPoint ("left", wallpaper_dropdown1, "right", 2)
@@ -672,7 +804,7 @@ function _detalhes:OpenWelcomeWindow ()
end
end)
pages [#pages+1] = {skins_frame_alert, bg55, texto55, texto555, skins_image, changemind, texto_appearance, skin_dropdown, skin_label, wallpaper_label_switch, wallpaper_switch, wallpaper_dropdown1, wallpaper_dropdown2, }
pages [#pages+1] = {import_label, import_dropdown, skins_frame_alert, bg55, texto55, texto555, skins_image, changemind, texto_appearance, skin_dropdown, skin_label, wallpaper_label_switch, wallpaper_switch, wallpaper_dropdown1, wallpaper_dropdown2, }
for _, widget in ipairs (pages[#pages]) do
widget:Hide()
Binary file not shown.
Binary file not shown.