𝗔𝗟𝗟 𝗦𝗥𝗖 𝟮.𝟬
Open in Telegram
No data
Subscribers
-724 hours
-447 days
+15230 days
Posts Archive
ImDrawList* draw_list = ImGui::GetWindowDrawList();
ImVec2 p = ImGui::GetCursorScreenPos();
float width = ImGui::GetWindowWidth();
float height = ImGui::GetWindowHeight();
// Star banane ke liye
int starPoints = 5;
float starAngle = 3.14159f / starPoints;
// Gole ki tarah star set karne ke liye
int numStars = 10;
float radius = height / 3;
float angleStep = 3.14159f * 2 / numStars;
// Sare color add karne ke liye
ImU32 colors[] = {
IM_COL32(255, 0, 0, 255), // Lal
IM_COL32(0, 255, 0, 255), // Hara
IM_COL32(0, 0, 255, 255), // Neela
IM_COL32(255, 255, 0, 255), // Pila
IM_COL32(128, 0, 128, 255), // Magenta
IM_COL32(0, 255, 255, 255), // Cyan
IM_COL32(128, 0, 0, 255), // Gulabi
IM_COL32(0, 128, 0, 255), // Olive
IM_COL32(0, 0, 128, 255), // Navy
IM_COL32(128, 128, 128, 255), // Gray
IM_COL32(255, 128, 0, 255), // Narangi
IM_COL32(0, 128, 128, 255) // Teal
};
// Background mein silver color add karne ke liye
ImU32 backgroundColor = IM_COL32(192, 192, 192, 255); // Silver
// Background ko silver color se fill karne ke liye
draw_list->AddRectFilled(ImVec2(p.x, p.y), ImVec2(p.x + width, p.y + height), backgroundColor);
// Star ko gol gol ghumaane ke liye
static float angle = 0;
angle += 0.01f;
for (int i = 0; i < numStars; i++) {
float starAngle = i * angleStep + angle;
ImVec2 starCenter = ImVec2(p.x + width / 2 + cos(starAngle) * radius * 0.8f, p.y + height / 2 + sin(starAngle) * radius * 0.8f);
float starRadius = height / 15;
float innerRadius = starRadius / 2;
// Star ke andar ki jagah mein color add karne ke liye
draw_list->AddCircleFilled(starCenter, innerRadius, colors[i % 12]);
// Star ke andar ki lines
for (int j = 0; j < starPoints; j++) {
float angle2 = j * starAngle * 2;
ImVec2 point1 = ImVec2(starCenter.x + cos(angle2) * innerRadius, starCenter.y + sin(angle2) * innerRadius);
ImVec2 point2 = ImVec2(starCenter.x + cos(angle2 + starAngle) * starRadius, starCenter.y + sin(angle2 + starAngle) * starRadius);
draw_list->AddLine(point1, point2, IM_COL32(255, 255, 255, 255), 2.0f);
}
}
// Boles ko star mein badalne ke liye
for (int i = 0; i < 10; i++) {
float y = p.y + i * height / 10;
draw_list->AddLine(ImVec2(p.x, y), ImVec2(p.x + width, y), IM_COL32(255, 255, 255, 255), 0.1f);
}
ImDrawList* draw_list = ImGui::GetWindowDrawList();
ImVec2 p = ImGui::GetCursorScreenPos();
float width = ImGui::GetWindowWidth();
float height = ImGui::GetWindowHeight();
// Star banane ke liye
int starPoints = 5;
float starAngle = 3.14159f / starPoints;
// Gole ki tarah star set karne ke liye
int numStars = 12;
float radius = height / 3;
float angleStep = 3.14159f * 2 / numStars;
// Sare color add karne ke liye
ImU32 colors[] = {
IM_COL32(255, 0, 0, 255), // Lal
IM_COL32(0, 255, 0, 255), // Hara
IM_COL32(0, 0, 255, 255), // Neela
IM_COL32(255, 255, 0, 255), // Pila
IM_COL32(128, 0, 128, 255), // Magenta
IM_COL32(0, 255, 255, 255), // Cyan
IM_COL32(128, 0, 0, 255), // Gulabi
IM_COL32(0, 128, 0, 255), // Olive
IM_COL32(0, 0, 128, 255), // Navy
IM_COL32(128, 128, 128, 255), // Gray
IM_COL32(255, 128, 0, 255), // Narangi
IM_COL32(0, 128, 128, 255) // Teal
};
// Background mein silver color add karne ke liye
ImU32 backgroundColor = IM_COL32(192, 192, 192, 255); // Silver
// Background ko silver color se fill karne ke liye
draw_list->AddRectFilled(ImVec2(p.x, p.y), ImVec2(p.x + width, p.y + height), backgroundColor);
// Star ko gol gol ghumaane ke liye
static float angle = 0;
angle += 0.05f; // Speed badha di gayi hai
for (int i = 0; i < numStars; i++) {
float starAngle = i * angleStep + angle;
ImVec2 starCenter = ImVec2(p.x + width / 2 + cos(starAngle) * radius * 0.8f, p.y + height / 2 + sin(starAngle) * radius * 0.8f);
float starRadius = height / 15;
float innerRadius = starRadius / 2;
// Star ke andar ki jagah mein color add karne ke liye
for (int j = 0; j < starPoints; j++) {
float angle2 = j * 3.14159f / starPoints * 2;
ImVec2 point1 = ImVec2(starCenter.x + cos(angle2) * innerRadius, starCenter.y + sin(angle2) * innerRadius);
ImVec2 point2 = ImVec2(starCenter.x + cos(angle2 + 3.14159f / starPoints) * starRadius, starCenter.y + sin(angle2 + 3.14159f / starPoints) * starRadius);
draw_list->AddLine(point1, point2, colors[i % 12], 2.0f);
}
}
ImDrawList* draw_list = ImGui::GetWindowDrawList();
ImVec2 p = ImGui::GetCursorScreenPos();
float width = ImGui::GetWindowWidth();
float height = ImGui::GetWindowHeight();
// Star banane ke liye
int starPoints = 5;
float starAngle = 3.14159f / starPoints;
// Gole ki tarah star set karne ke liye
int numStars = 8;
float radius = height / 3;
float angleStep = 3.14159f * 2 / numStars;
// Sare color add karne ke liye
ImU32 colors[] = {
IM_COL32(255, 0, 0, 255), // Lal
IM_COL32(0, 255, 0, 255), // Hara
IM_COL32(0, 0, 255, 255), // Neela
IM_COL32(255, 255, 0, 255), // Pila
IM_COL32(128, 0, 128, 255), // Magenta
IM_COL32(0, 255, 255, 255), // Cyan
IM_COL32(128, 0, 0, 255), // Gulabi
IM_COL32(0, 128, 0, 255), // Olive
};
// Background mein silver color add karne ke liye
ImU32 backgroundColor = IM_COL32(192, 192, 192, 255); // Silver
// Background ko silver color se fill karne ke liye
draw_list->AddRectFilled(ImVec2(p.x, p.y), ImVec2(p.x + width, p.y + height), backgroundColor);
// Star ko gol gol ghumaane ke liye
static float angle = 0;
angle += 0.05f; // Speed badhadi hai
for (int i = 0; i < numStars; i++) {
float starAngle = i * angleStep + angle * 2;
ImVec2 starCenter = ImVec2(p.x + width / 2 + cos(starAngle) * radius * 0.8f, p.y + height / 2 + sin(starAngle) * radius * 0.8f);
float starRadius = height / 10;
// Star banane ke liye
for (int j = 0; j < starPoints; j++) {
float angle2 = j * starAngle * 2;
ImVec2 point1 = ImVec2(starCenter.x + cos(angle2) * starRadius / 2, starCenter.y + sin(angle2) * starRadius / 2);
ImVec2 point2 = ImVec2(starCenter.x + cos(angle2 + starAngle) * starRadius, starCenter.y + sin(angle2 + starAngle) * starRadius);
draw_list->AddLine(point1, point2, colors[i % 8], 2.0f);
}
}
