Skip to content

Commit

Permalink
General round of fixes, implementations and polishing
Browse files Browse the repository at this point in the history
- Polished tooltips from damage and healing done.
- Added new sound: "Details Truck".
- Added 'right click to close' icons before the phrase, also the text is move visible now.
- Added ReopenAllWindows() as alias for a Portuguese function named ReabrirTodasInstancias().
- Added a close button for the breakdown options panel.
- Added support for mask in the spec icons shown in the regular window. Require to add: Instance.row_info.icon_mas = masktexture.
- Event "COMBAT_MYTHICPLUS_OVERALL_READY" now sends the overall mythic+ combat as payload.
  • Loading branch information
Tercioo committed Mar 11, 2024
1 parent acc03f4 commit 2c613e0
Show file tree
Hide file tree
Showing 29 changed files with 554 additions and 328 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ images/package_addons.png
images/patreon_stuff.png
images/plater_darktheme_skin.png
images/Tutorial/DetailsMainWindow.png
Details.cpp
2 changes: 1 addition & 1 deletion Definitions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
---@field GetCombatSegments fun(self: details) : combat[] return a table with all the combat segments
---@field ListInstances fun(self: details) : instance[] return a table with all the instances
---@field UnpackMythicDungeonInfo fun(self: details, mythicDungeonInfo: mythicdungeoninfo) : boolean, segmentid, number, number, number, string, number, string, number, number, number unpack the mythic dungeon info and return the values
---@field
---@field CreateRightClickToCloseLabel fun(self: details, parent: frame) : df_label return a df_label with the text "Right click to close", need to set point
---@field
---@field

Expand Down
46 changes: 42 additions & 4 deletions Libs/DF/definitions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
---@field removeduplicate fun(tbl1:table, tbl2:table) remove the keys from table1 which also exists in table2 with the same value
---@field getfrompath fun(tbl:table, path:string, subOffset:number?) : any get a value from a table using a path, e.g. getfrompath(tbl, "a.b.c") is the same as tbl.a.b.c; if subOffset is passed, return the subOffset'th value of the path
---@field setfrompath fun(tbl:table, path:string, value:any) : boolean set the value of a table using a path, e.g. setfrompath(tbl, "a.b.c", 10) is the same as tbl.a.b.c = 10
---@field dump fun(tbl:table) : string dump a table to a string
---@field dump fun(tbl:table, resultString:string, deep:number) : string dump a table to a string
---@field findsubtable fun(tbl:table, index:number, value:any) : integer|nil find the value passed inside a sub table, return the index of the main table where the sub table with the value found is located

---@class df_language : table
---@field Register fun(addonId:any, languageId:string, gameLanguageOnly:boolean?) : table
Expand All @@ -36,6 +37,19 @@
---@field RegisterTableKeyWithLocTable fun(table:table, key:any, locTable:table, silence:boolean?)
---@field RegisterObjectWithLocTable fun(object:uiobject, locTable:table, silence:boolean?)

---@class df_anttable : table
---@field Throttle number
---@field AmountParts number
---@field TexturePartsWidth number
---@field TexturePartsHeight number
---@field TextureWidth number
---@field TextureHeight number
---@field BlendMode string?
---@field Color any?
---@field Texture any

---df version of an atlasinfo from the game API, it include color and desaturation information
---a df atlas can be created using DetailsFramework:CreateAtlas() and then used with DetailsFramework:SetAtlas()
---@class df_atlasinfo : atlasinfo
---@field vertexRed number?
---@field vertexGreen number?
Expand All @@ -50,6 +64,7 @@

---@alias df_templatename string

---a template is a table with keys and values that mandate how a widget should look like
---@class df_template : table
---@field width any
---@field height any
Expand Down Expand Up @@ -103,6 +118,7 @@
---| "switch"
---| "slider"


---@class detailsframework
---@field dversion number
---@field internalFunctions table
Expand Down Expand Up @@ -130,6 +146,19 @@
---@field button_templates table<df_templatename, df_template>
---@field slider_templates table<df_templatename, df_template>
---@field font_templates table<df_templatename, df_template>
---@field FrameWorkVersion string the version of the framework
---@field LabelNameCounter number when no name is given, a string plus an incremental number is used instead
---@field PictureNameCounter number when no name is given, a string plus an incremental number is used instead
---@field BarNameCounter number when no name is given, a string plus an incremental number is used instead
---@field DropDownCounter number when no name is given, a string plus an incremental number is used instead
---@field PanelCounter number when no name is given, a string plus an incremental number is used instead
---@field SimplePanelCounter number when no name is given, a string plus an incremental number is used instead
---@field ButtonCounter number when no name is given, a string plus an incremental number is used instead
---@field SliderCounter number when no name is given, a string plus an incremental number is used instead
---@field SwitchCounter number when no name is given, a string plus an incremental number is used instead
---@field SplitBarCounter number when no name is given, a string plus an incremental number is used instead
---@field FormatNumber fun(number:number) : string abbreviate a number, e.g. 1000 -> 1k 1000 -> 1, depending on the client language
---@field UnitGroupRolesAssigned fun(unitId: unit, bUseSupport:boolean?, specId: specializationid?) : string there's no self here
---@field LoadSpellCache fun(self:table, hashMap:table, indexTable:table, allSpellsSameName:table) : hashMap:table, indexTable:table, allSpellsSameName:table load all spells in the game and add them into the passed tables
---@field UnloadSpellCache fun(self:table) wipe the table contents filled with LoadSpellCache()
---@field GetCurrentClassName fun(self:table) : string return the name of the class the player is playing
Expand Down Expand Up @@ -172,10 +201,9 @@
---@field GroupIterator fun(self:table, callback:function, ...) iterate over the group, calling the callback function for each group member
---@field CommaValue fun(self:table, value:number) : string convert a number to a string with commas, e.g. 1000000 -> 1,000,000
---@field SplitTextInLines fun(self:table, text:string) : string[] split a text into lines
---@field UnitGroupRolesAssigned fun(unitId: unit, bUseSupport:boolean?, specId: specializationid?) : string there's no self here
---@field SetAnchor fun(self:table, widget:uiobject, anchorTable:df_anchor, anchorTo:uiobject?) only adjust the anchors of a widget, does not save values
---@field AddTextureToText fun(text:string, textureInfo:table, bAddSpace:boolean?, bAddAfterText:boolean) : string textureInfo is a table with .texture .width .height .coords{left, right, top, bottom}
---@field CreateTextureInfo fun(texture:atlasname|texturepath|textureid, width:number?, height:number?, left:number?, right:number?, top:number?, bottom:number?, imageWidthnumber?, imageHeightnumber?) : table
---@field AddTextureToText fun(self:table, text:string, textureInfo:table, bAddSpace:boolean?, bAddAfterText:any) : string textureInfo is a table with .texture .width .height .coords{left, right, top, bottom}
---@field CreateTextureInfo fun(self:table, texture:atlasname|texturepath|textureid, width:number?, height:number?, left:number?, right:number?, top:number?, bottom:number?, imageWidthnumber?, imageHeightnumber?) : table deprecated, use: DetailsFramework:CreateAtlas()
---@field ApplyStandardBackdrop fun(self:table, frame:frame, bUseSolidColor:boolean?, alphaScale:number?)
---@field NewLabel fun(self:table, parent:frame, container:frame, name:string?, member:string?, text:string|table, font:string?, size:any?, color:any?, layer:drawlayer?) : df_label
---@field CreateLabel fun(self:table, parent:frame, text:string, size:any?, color:any?, font:string?, member:string?, name:string?, layer:drawlayer?) : df_label
Expand Down Expand Up @@ -238,6 +266,8 @@
---@field SortOrder3R fun(t1:table, t2:table) : boolean
---@field Trim fun(self:table, string:string) : string
---@field trim fun(self:table, string:string) : string
---@field TruncateTextBinarySearch fun(self:table, fontString:fontstring, maxWidth:number) : nil
---@field TruncateTextSafeBinarySearch fun(self:table, fontString:fontstring, maxWidth:number) : nil
---@field TruncateTextSafe fun(self:table, fontString:fontstring, maxWidth:number) : nil
---@field TruncateText fun(self:table, fontString:fontstring, maxWidth:number) : nil
---@field CleanTruncateUTF8String fun(self:table, text:string) : string
Expand All @@ -255,6 +285,14 @@
---@field ParseTemplate fun(self:table, templateCategory:string, template:string|table) : table
---@field GetParentName fun(self:table, frame:uiobject) : string
---@field IsLatinLanguage fun(self:table, languageId:string) : boolean
---@field PrintVersion fun(self:table) : nil print to chat the version of the framework
---@field GetParentKeyPath fun(self:table, object:uiobject) : string
---@field GetParentNamePath fun(self:table, object:uiobject) : string
---@field GetAsianNumberSymbols fun(self:table) : string, string, string return the abbreviation for 1,000 10,000 and 100,000,000
---@field GetBestFontForLanguage fun(self:table, languageId:string?, western:string?, cyrillic:string?, china:string? korean:string?, taiwan:string?) : string
---@field CreateGlowOverlay fun(self:table, parent:frame, antsColor:any, glowColor:any) : frame
---@field CreateAnts fun(self:table, parent:frame, antTable:df_anttable, leftOffset:number?, rightOffset:number?, topOffset:number?, bottomOffset:number?) : frame
---@field CreateBorder fun(self:table, parent:frame, alpha1:number?, alpha2:number?, alpha3:number?) : frame
---@field
---@field
---@field
Expand Down
Loading

0 comments on commit 2c613e0

Please sign in to comment.