SHARE
TWEET

Untitled

a guest Dec 2nd, 2019 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #name "Import Test"
  2. #author "Derfuhr aka ClumsySmurf"
  3. #category "Clumsy's Plugins"
  4.  
  5. bool debug = true;
  6.  
  7. bool windowIsVisible = false;
  8.  
  9. bool clicked = false;
  10.  
  11. void main()
  12. {
  13.  
  14. }
  15.  
  16. void Render()
  17. {
  18.     if(clicked)
  19.     {
  20.         Import::Function@ TestImport = Import::GetFunction("OPImportTest.dll", "Salutation");
  21.         TestImport.Call();
  22.         clicked = false;       
  23.     }
  24. }
  25.  
  26. void RenderMenu()
  27. {
  28.     if (UI::MenuItem("Import Test", ""))
  29.     {
  30.         windowIsVisible = !windowIsVisible;
  31.     }
  32. }
  33.  
  34. void RenderInterface()
  35. {  
  36.     if(!windowIsVisible)
  37.     {
  38.         return;
  39.     }
  40.     UI::SetNextWindowPos(40, 40);
  41.     UI::SetNextWindowSize(350, 350);
  42.     UI::Begin("Import Test", windowIsVisible, UI::WindowFlags::NoResize);
  43.     if(UI::Button("Check it out"))
  44.     {
  45.         clicked = true;
  46.     }  
  47.     UI::End();
  48. }
  49.  
  50. void onError(string text)
  51. {  
  52.     if(debug)
  53.     {  
  54.         print(text);
  55.     }
  56. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top