staticguiutils.c 555 B

12345678910111213141516171819202122232425
  1. class StaticGUIUtils
  2. {
  3. static const int IMAGESETGROUP_INVENTORY = 0;
  4. //! Checks for improperly formated, legacy image names and corrects them to default format.
  5. static string VerifyIconImageString(int imageset_group = IMAGESETGROUP_INVENTORY, string icon_name = "")
  6. {
  7. if (icon_name == "")
  8. {
  9. return "set:dayz_inventory image:missing";
  10. }
  11. if ( !icon_name.Contains("image:") )
  12. {
  13. switch (imageset_group)
  14. {
  15. case IMAGESETGROUP_INVENTORY:
  16. return "set:dayz_inventory image:" + icon_name;
  17. }
  18. }
  19. return icon_name;
  20. }
  21. }