View Single Post
05/26/22, 11:55 PM   #1
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2020
Posts: 185
Formating & Colouring Titles

Hi all,
So, I have problems with pronouns not in the same colour I set the text, that's probably because if you set the color inside zo_strformat the pronoun is added after the colour is set to the original text.

I have this problem when I use:

Lua Code:
  1. self.mapTitle:SetText(zo_strformat("|cffffff<<1>>|r",mapTitleName))

I can solve it by using :

Lua Code:
  1. self.mapTitle:SetText( string.format("|cffffff"..zo_strformat(mapTitleName).."|r"))

... But is there a cleaner way to do this ?

EDIT:
I thought this would work but ^f ^F... are not formatted so here's no pronoun anymore...
Lua Code:
  1. self.mapTitle:SetText(zo_strformat("|cffffff"..mapTitleName.."|r"))

Wiki page on zo_strformat for reference for addon authors with a similar problem :
https://wiki.esoui.com/How_to_format...h_zo_strformat

Last edited by Masteroshi430 : 05/27/22 at 01:47 AM.
  Reply With Quote