Jump to content

donbubu

Members
  • Posts

    1
  • Joined

  • Last visited

donbubu's Achievements

0

Reputation

  1. many thanks for this nice mode. i modify the ui for money and res for a dec-point in ResourcesUI.lua with the info from this site:http://lua-users.org/wiki/FormattingNumbers change '%1,' to '%1.' in the code from Richard Warburton: ... drawTextRect( comma_value(Player().money), HSplit:partition(0),1, 0,ColorRGB(1,1,1), 15, 0, 0, 0) ... drawTextRect(comma_value(resources[i+1]), HSplit:partition(i+1),1, 0,Material(i).color, 15, 0, 0, 0) ... function comma_value(n) -- credit http://richard.warburton.it local left,num,right = string.match(n,'^([^%d]*%d)(%d*)(.-)$') return left..(num:reverse():gsub('(%d%d%d)','%1.'):reverse())..right end
×
×
  • Create New...