Damage module - Do not show percentage option #59


  • Enhancment
  • Fixed
Closed
Assigned to zarnivoop
  • _ForgeUser1214628 created this issue May 22, 2009

    This is a request for an option to turn off the percentage display in the Damage module (similar to how you can already turn off the DPS display).

  • _ForgeUser1214628 added the tags New Enhancment May 22, 2009
  • Forge_User_33307291 posted a comment Jun 18, 2009

    Rough and hacky patch to have an option to not show the percent in the dmg list.

    --- Damage.lua.org	Tue Jun 16 18:26:30 2009
    +++ Damage.lua	Thu Jun 18 18:31:29 2009
    @@ -211,11 +211,19 @@
     			local d = win.dataset[nr] or {}
     			win.dataset[nr] = d
     			d.label = player.name
    -			
    +
     			if Skada.db.profile.modules.damagenodps then
    -				d.valuetext = Skada:FormatNumber(player.damage)..(" (%02.1f%%)"):format(player.damage / set.damage * 100)
    +				if Skada.db.profile.modules.damagenopercent then
    +					d.valuetext = Skada:FormatNumber(player.damage)
    +				else
    +					d.valuetext = Skada:FormatNumber(player.damage)..(" (%02.1f%%)"):format(player.damage / set.damage * 100)
    +				end
     			else
    -				d.valuetext = Skada:FormatNumber(player.damage)..(" (%02.1f, %02.1f%%)"):format(dps, player.damage / set.damage * 100)
    +				if Skada.db.profile.modules.damagenopercent then
    +					d.valuetext = Skada:FormatNumber(player.damage)..(" (%02.1f)"):format(dps)
    +				else
    +					d.valuetext = Skada:FormatNumber(player.damage)..(" (%02.1f, %02.1f%%)"):format(dps, player.damage / set.damage * 100)
    +				end
     			end
     			
     			d.value = player.damage
    @@ -515,6 +523,15 @@
     				order=2,
     			},
     					
    +			showpercent = {
    +				type = "toggle",
    +				name = L["Do not show Percent"],
    +				desc = L["Hides perecnt from the Damage mode."],
    +				get = function() return Skada.db.profile.modules.damagenopercent end,
    +				set = function() Skada.db.profile.modules.damagenopercent = not Skada.db.profile.modules.damagenopercent end,
    +				order = 3,
    +			},
    +
     		},
     	}
     }
    
  • zarnivoop removed a tag New Jul 18, 2009
  • zarnivoop added a tag Accepted Jul 18, 2009
  • zarnivoop posted a comment Jul 18, 2009

    Thanks for the code. However, I wish to make display format a generic option and get rid of all the "Do not show..." options.

  • zarnivoop removed a tag Accepted Jul 22, 2009
  • zarnivoop added a tag Fixed Jul 22, 2009
  • zarnivoop closed issue Jul 22, 2009
  • Forge_User_60794057 posted a comment Mar 3, 2018

    Sorry guys, would you please explain how & where to put those lines ? i would like to remove Skada's percentage also.

    Thanks in advance, appreciate


To post a comment, please login or register a new account.