Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- static void error_callback(int error, const char* description)
- {
- //DbgPrint("Error %d: %s\n", error, description);
- }
- bool CreateMenus()
- {
- // Setup window
- glfwSetErrorCallback(error_callback);
- if (!glfwInit())
- return 1;
- glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
- glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
- glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
- #if __APPLE__
- glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
- #endif
- GLFWwindow* window = glfwCreateWindow(1280, 720, "ImGui OpenGL3 example", NULL, NULL);
- glfwMakeContextCurrent(window);
- glfwSwapInterval(1); // Enable vsync
- gl3wInit();
- // Setup ImGui binding
- ImGui_ImplGlfwGL3_Init(window, true);
- // Load Fonts
- // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
- // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
- // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
- // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
- // - Read 'extra_fonts/README.txt' for more instructions and details.
- // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
- //ImGuiIO& io = ImGui::GetIO();
- //io.Fonts->AddFontDefault();
- //io.Fonts->AddFontFromFileTTF("../../extra_fonts/Roboto-Medium.ttf", 16.0f);
- //io.Fonts->AddFontFromFileTTF("../../extra_fonts/Cousine-Regular.ttf", 15.0f);
- //io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
- //io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
- //IM_ASSERT(font != NULL);
- bool show_test_window = true;
- bool show_another_window = false;
- ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
- // Main loop
- while (!glfwWindowShouldClose(window))
- {
- glfwPollEvents();
- ImGui_ImplGlfwGL3_NewFrame();
- const ImVec2 size(300, 200);
- bool open = true;
- float alpha = 0.90f;
- // ImGuiWindowFlags windowFlags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_ShowBorders ;
- //std::string textBtn = "(" + std::to_string(click_count) + ") Clicks";
- ImGui::Begin("Primera ventana", &open, size, alpha);
- ImGui::Text("Muestra un texto en la ventana.");
- // if (ImGui::Button(textBtn.c_str())) click_count++;
- ImGui::End();
- int display_w, display_h;
- glfwGetFramebufferSize(window, &display_w, &display_h);
- glViewport(0, 0, display_w, display_h);
- glClear(GL_COLOR_BUFFER_BIT);
- ImGui::Render();
- glfwSwapBuffers(window);
- }
- // Cleanup
- ImGui_ImplGlfwGL3_Shutdown();
- glfwTerminate();
- }
- void InitCheat( )
- {
- while( !HwInit( ) )
- Sleep( 90 );
- for( int i = 0; i < 10; i++ )
- {
- GetCEFuncs();
- }
- pEngfuncs->Con_Printf( "This Work Perfect!" );
- CreateMenus();
- }
- BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
- {
- if( ul_reason_for_call == DLL_PROCESS_ATTACH )
- {
- DisableThreadLibraryCalls((HINSTANCE)hModule);
- CreateThread( 0, 0, (LPTHREAD_START_ROUTINE)InitCheat, 0, 0, 0 );
- /* DWORD ThreadAdresi = 0x01400000, Old; // aki ba el start adrez :v
- VirtualProtect((LPVOID)ThreadAdresi,0x1000,PAGE_EXECUTE_READWRITE,&Old);
- CONTEXT ctx;
- HANDLE tHand = CreateRemoteThread(GetCurrentProcess(),0,0,(LPTHREAD_START_ROUTINE)0x01400000,0,0,0);
- SuspendThread(tHand);
- ctx.ContextFlags = CONTEXT_INTEGER;
- GetThreadContext(tHand, &ctx);
- ctx.Eax = (DWORD)InitCheat; // aki el rial adrez v:
- ctx.ContextFlags = CONTEXT_INTEGER;
- SetThreadContext(tHand, &ctx);
- ResumeThread(tHand); */
- // return Thread;//(LPVOID)ctx.Eax;
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement