Advertisement
xXNiKkI_DownXx

painel login

May 4th, 2023 (edited)
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. if (painelLogin)
  2. {
  3. ImGui::SetNextWindowBgAlpha(0.8);
  4. ImVec2 windowSize(490, 290);
  5. ImVec2 windowPos((ImGui::GetIO().DisplaySize.x - windowSize.x) / 2.0f, (ImGui::GetIO().DisplaySize.y - windowSize.y) / 2.0f);
  6. ImGui::SetNextWindowSize(windowSize);
  7. ImGui::SetNextWindowPos(windowPos);
  8. ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.0f, 1.0f, 0.0f, 1.0f));
  9. ImGui::Begin("Parasita - Login", NULL, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove);
  10. ImVec2 containerSize(320, 258);
  11. ImVec2 containerPos((ImGui::GetWindowSize().x - containerSize.x) / 2.0f, (ImGui::GetWindowSize().y - containerSize.y) / 2.0f);
  12. ImGui::SetCursorPos(containerPos);
  13. ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.0f, 1.0f, 0.0f, 0.3f));
  14. ImGui::BeginChild("Container", containerSize, true);
  15. ImVec2 inputSize(0, 0);
  16.  
  17. ImGui::SetWindowFontScale(0.8);
  18. ImGui::Text(" ");
  19. ImGui::SetWindowFontScale(1.4);
  20.  
  21. ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(CorTopo.x, CorTopo.y, CorTopo.z, 0.1));
  22. ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImVec4(CorTopo.x, CorTopo.y, CorTopo.z, 0.1));
  23. ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(CorTopo.x, CorTopo.y, CorTopo.z, 0.1));
  24.  
  25. ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(CorTopo.x, CorTopo.y, CorTopo.z, 0.1));
  26. ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(CorTopo.x, CorTopo.y, CorTopo.z, 0.8));
  27. ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(CorTopo.x, CorTopo.y, CorTopo.z, 0.8));
  28.  
  29. ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 10));
  30. ImGui::SetCursorPosX((ImGui::GetWindowSize().x - 245.869) / 2);
  31. ImGui::Text("Parasita - Login Panel");
  32. ImGui::SetWindowFontScale(0.8);
  33. ImGui::SetCursorPosX((ImGui::GetWindowSize().x - 35.0) / 2);
  34. ImGui::Text("User");
  35. ImGui::SetWindowFontScale(1.4);
  36. ImGui::SetCursorPosX((ImGui::GetWindowSize().x - 208.0) / 2);
  37. ImGui::InputText(" ", username, 64);
  38. ImGui::SetCursorPosX((ImGui::GetWindowSize().x - 25.700) / 2);
  39. ImGui::SetWindowFontScale(0.8);
  40. ImGui::Text("key");
  41. ImGui::SetWindowFontScale(1.4);
  42. ImGui::SetCursorPosX((ImGui::GetWindowSize().x - 208.0) / 2);
  43. ImGui::InputText(" ", password, IM_ARRAYSIZE(password), ImGuiInputTextFlags_Password);
  44. ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 10));
  45. ImGui::PushItemWidth(0.0);
  46. ImGui::AlignTextToFramePadding();
  47. ImGui::SetCursorPosX((ImGui::GetWindowSize().x - 104.222) / 2.0f);
  48. ImGui::SetWindowFontScale(1.0);
  49. if (ImGui::Button(" Log in ")) {
  50. if (strcmp(password, "breso") == 0)
  51. Notificacao("Login com sucesso");
  52. else
  53. Notificacao("Senha invalida");
  54. }
  55. ImGui::PopStyleColor(6);
  56.  
  57. ImGui::PopStyleVar();
  58.  
  59. ImGui::PopStyleVar();
  60.  
  61. ImGui::EndChild();
  62. ImGui::PopStyleColor();
  63. ImGui::End();
  64. ImGui::PopStyleColor();
  65. }
  66.  
  67.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement