Skip to content

Commit

Permalink
V4.1.1
Browse files Browse the repository at this point in the history
V4.1.1 : [V40101] by Calamath
- Addressed an issue of the book layout being messed up when you reopen the same book.
- Updated API version to 101044 (ESO 10.2.x : Update 44)
  • Loading branch information
calamath committed Nov 10, 2024
1 parent 05ecdef commit 9cedfa4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
23 changes: 21 additions & 2 deletions CBookFontStylist/CBookFontStylist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ local _SHARED_DEFINITIONS = {
local _ENV = CT_AddonFramework:CreateCustomEnvironment(_SHARED_DEFINITIONS)
local CBFS = CT_AddonFramework:New("CBookFontStylist", {
name = "CBookFontStylist",
version = "4.1.0",
version = "4.1.1",
author = "Calamath",
savedVars = "CBookFontStylistDB",
savedVarsVersion = 1,
Expand Down Expand Up @@ -274,7 +274,7 @@ function CBFS:OnAddOnLoaded()
-- self.LDL:Debug("LORE_READER:OnHide :")
self:RevertBookFontToDefault()
end)
ZO_PreHook(LORE_READER, "SetupBook", function(LORE_READER_self, title, body, medium, showTitle, isGamepad, ...)
ZO_PreHook(LORE_READER, "SetupBook", function(loreReader, title, body, medium, showTitle, isGamepad, ...)
-- self.LDL:Debug("LORE_READER:SetupBook :")
local bmid = GetBMID(medium)
--[[
Expand Down Expand Up @@ -315,6 +315,25 @@ function CBFS:OnAddOnLoaded()
end)
end

-- For avoidance of layout glitches in the lore reader.
-- NOTE: Even if the font object is modified, the change is not immediately reflected to a label control, and refresh may be delayed until the next frame or later.
-- To avoid glitches in the layout of the lore reader due to this nature, the label text should be erased before LayoutText.
-- This magic code ensures that the label text is always updated in LayoutText to promote immediate label refresh.
ZO_PreHook(LORE_READER, "LayoutText", function(loreReader)
if loreReader.title then
loreReader.title:SetText("")
end
if loreReader.firstPage.body then
loreReader.firstPage.body:SetText("")
end
if loreReader.secondPage.body then
loreReader.secondPage.body:SetText("")
end
if loreReader.overrideImageTitle then
loreReader.overrideImageTitle:SetText("")
end
end)

-- register in-game events
EVENT_MANAGER:RegisterForEvent(self.name, EVENT_GAMEPAD_PREFERRED_MODE_CHANGED, function(_, gamepadPreferred)
self.isGamepad = gamepadPreferred
Expand Down
8 changes: 4 additions & 4 deletions CBookFontStylist/CBookFontStylist.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Title: Calamath's BookFont Stylist
## Description: A GUI mod tool for customizing font styles of the Lore Books.
## Version: 4.1.0
## AddOnVersion: 40100
## Version: 4.1.1
## AddOnVersion: 40101
## Author: Calamath
## License: Artistic License 2.0
## APIVersion: 101041 101042
## DependsOn: LibAddonMenu-2.0>=36 LibMediaProvider-1.0>=30
## APIVersion: 101044
## DependsOn: LibAddonMenu-2.0>=37 LibMediaProvider-1.0>=32
## OptionalDependsOn: LibDebugLogger>=263
## SavedVariables: CBookFontStylistDB

Expand Down
4 changes: 4 additions & 0 deletions CBookFontStylist/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
V4.1.1 : [V40101] by Calamath
- Addressed an issue of the book layout being messed up when you reopen the same book.
- Updated API version to 101044 (ESO 10.2.x : Update 44)

V4.1.0 : [V40100] by Calamath
- Added font adjustment feature for wood elven scroll detailing the Rite of Propagation.
- Update translations.
Expand Down

0 comments on commit 9cedfa4

Please sign in to comment.