Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #name "Import Test"
- #author "Derfuhr aka ClumsySmurf"
- #category "Clumsy's Plugins"
- bool debug = true;
- bool windowIsVisible = false;
- bool clicked = false;
- void main()
- {
- }
- void Render()
- {
- if(clicked)
- {
- Import::Function@ TestImport = Import::GetFunction("OPImportTest.dll", "Salutation");
- TestImport.Call();
- clicked = false;
- }
- }
- void RenderMenu()
- {
- if (UI::MenuItem("Import Test", ""))
- {
- windowIsVisible = !windowIsVisible;
- }
- }
- void RenderInterface()
- {
- if(!windowIsVisible)
- {
- return;
- }
- UI::SetNextWindowPos(40, 40);
- UI::SetNextWindowSize(350, 350);
- UI::Begin("Import Test", windowIsVisible, UI::WindowFlags::NoResize);
- if(UI::Button("Check it out"))
- {
- clicked = true;
- }
- UI::End();
- }
- void onError(string text)
- {
- if(debug)
- {
- print(text);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement