Advertisement
apieceoffruit

XdDoc

Apr 6th, 2021
514
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 KB | None | 0 0
  1. protected override void Draw()
  2.     {
  3.         if (NoFilename || !TryLoadAsset(Item.fileName, out var doc)) return;
  4.        
  5.         _isOpen = TitleBar(doc,_isOpen);
  6.         if(!_isOpen) return;
  7.      
  8.         Space();
  9.         Lbl(Item.fileName);
  10.  
  11.         if(HasBeenModified)
  12.             DrawModified(doc);
  13.         else
  14.             DrawUnModified(doc);
  15.     }
  16.  
  17.     void DrawModified(Object targetObject)
  18.     {
  19.         ShowModifiedMessage();
  20.         DrawImportedStatus();
  21.         Row();
  22.         DrawReimportButton("Update");
  23.         Flex();
  24.         if (BtnSmall("Open"))
  25.             Open(targetObject);
  26.         EndRow();
  27.     }
  28.  
  29.     void DrawUnModified(Object targetObject)
  30.     {
  31.         DrawImportedStatus();
  32.         Row();
  33.         if (Item.imported)
  34.             DrawReimportButton("Reimport");
  35.         else  
  36.             DrawImportButton();
  37.            
  38.         Flex();
  39.        
  40.         if (BtnSmall("Open"))
  41.             Open(targetObject);
  42.         EndRow();
  43.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement