-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rainbow.h
91 lines (58 loc) · 1.96 KB
/
Rainbow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
//
// Rainbow.h
//
// Created by Rev on 8/03/2022.
//
#include "Rendering.h"
bool isRainbow;
void Render() //Don't forget to call this somewhere.
{
auto isFrames = ImGui::GetFrameCount();
static float isRed = 0.0f, isGreen = 0.01f, isBlue = 0.0f;
ImVec4 isRGB = ImVec4(isRed, isGreen, isBlue, 1.0f);
ESP::DrawText2(Display_get_height(Display_get_main()) * 0.021, ImVec2(Display_get_width(Display_get_main()) * 0.375, Display_get_height(Display_get_main()) * 0.9775), isRGB, OBFUSCATE("Developed by Rev - Powered by Polarmods.com"));
if(isFrames % 1 == 0) //We use modulus to check if it's divisible by 1, and if the remainder equals 0, then we continue. This effect gets called every frame.
{
if(isGreen == 0.01f && isBlue == 0.0f)
{
isRed += 0.01f;
}
if(isRed > 0.99f && isBlue == 0.0f)
{
isRed = 1.0f;
isGreen += 0.01f;
}
if(isGreen > 0.99f && isBlue == 0.0f)
{
isGreen = 1.0f;
isRed -= 0.01f;
}
if(isRed < 0.01f && isGreen == 1.0f)
{
isRed = 0.0f;
isBlue += 0.01f;
}
if(isBlue > 0.99f && isRed == 0.0f)
{
isBlue = 1.0f;
isGreen -= 0.01f;
}
if(isGreen < 0.01f && isBlue == 1.0f)
{
isGreen = 0.0f;
isRed += 0.01f;
}
if(isRed > 0.99f && isGreen == 0.0f)
{
isRed = 1.0f;
isBlue -= 0.01f;
}
if(isBlue < 0.01f && isGreen == 0.0f)
{
isBlue = 0.0f;
isRed -= 0.01f;
if(isRed < 0.01f)
isGreen = 0.01f;
}
}
}