@@ -8,6 +8,7 @@ local addonName, phis = ...
88local names_to_toggle = {}
99local graphics_settings = {}
1010local pettracking = false
11+ local softtargetinteract = ' 0'
1112local names_not_restored = false
1213local graphics_quality_flag = false
1314
@@ -32,6 +33,7 @@ local function backup_cvars()
3233 for k ,v in pairs ({' chatBubbles' ,' chatBubblesParty' }) do
3334 settings [v ] = GetCVar (v )
3435 end
36+ settings [' SoftTargetInteract' ] = GetCVar (' SoftTargetInteract' )
3537 return settings
3638end
3739
@@ -151,6 +153,16 @@ local function toggle_names_off()
151153 end
152154 end
153155
156+ --- INTERACT ICON / NAME ---
157+ if phisHideUISavedVars .softtargetinteract then
158+ -- GetCVar returns a string and not a number
159+ local sti = GetCVar (' SoftTargetInteract' )
160+ if sti ~= nil and sti ~= ' 0' then
161+ softtargetinteract = sti
162+ SetCVar (' SoftTargetInteract' ,0 )
163+ end
164+ end
165+
154166 --- GRAPHICS SETTINGS --
155167 if phisHideUISavedVars .graphics_settings then
156168 toggle_graphics (true )
@@ -183,6 +195,11 @@ local function toggle_names_on()
183195 end
184196 end
185197
198+ --- INTERACT ICON / NAME ---
199+ if phisHideUISavedVars .softtargetinteract then
200+ SetCVar (' SoftTargetInteract' ,softtargetinteract )
201+ end
202+
186203 --- GRAPHICS SETTINGS --
187204 if phisHideUISavedVars .graphics_settings then
188205 toggle_graphics (false )
@@ -267,7 +284,8 @@ options:SetScript('OnShow', function()
267284 checkboxes .unitnames = create_checkbox (' unitnames' , options , description_string , ' Unit names' )
268285 checkboxes .chatbubbles = create_checkbox (' chatbubbles' , options , checkboxes .unitnames , ' Chat bubbles' )
269286 checkboxes .pettracking_icons = create_checkbox (' pettracking_icons' , options , checkboxes .chatbubbles , ' Battle pet tracking icons' )
270- checkboxes .graphics_settings = create_checkbox (' graphics_settings' , options , checkboxes .pettracking_icons , ' High quality graphics settings' )
287+ checkboxes .softtargetinteract = create_checkbox (' softtargetinteract' , options , checkboxes .pettracking_icons , ' Soft target interact icon (and unit name)' )
288+ checkboxes .graphics_settings = create_checkbox (' graphics_settings' , options , checkboxes .softtargetinteract , ' High quality graphics settings' )
271289 checkboxes .anti_aliasing = create_checkbox (' anti_aliasing' , options , checkboxes .graphics_settings , ' Anti aliasing (MSAA + CMAA)' )
272290 checkboxes .supersampling = create_checkbox (' supersampling' , options , checkboxes .anti_aliasing , ' Supersampling (2x)' )
273291 checkboxes .raytracing = create_checkbox (' raytracing' , options , checkboxes .supersampling , ' Ray traced shadows' )
0 commit comments