Browse Source

[examples] Fix some examples (#4211)

* Add text

* small typo
pull/4233/head
kai-z99 3 months ago
committed by GitHub
parent
commit
97c02b2425
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 14 deletions
  1. +4
    -4
      examples/shapes/shapes_draw_circle_sector.c
  2. +5
    -5
      examples/shapes/shapes_draw_rectangle_rounded.c
  3. +5
    -5
      examples/shapes/shapes_draw_ring.c

+ 4
- 4
examples/shapes/shapes_draw_circle_sector.c View File

@ -63,11 +63,11 @@ int main(void)
// Draw GUI controls
//------------------------------------------------------------------------------
GuiSliderBar((Rectangle){ 600, 40, 120, 20}, "StartAngle", b">NULL, &startAngle, 0, 720);
GuiSliderBar((Rectangle){ 600, 70, 120, 20}, "EndAngle", b">NULL, &endAngle, 0, 720);
GuiSliderBar((Rectangle){ 600, 40, 120, 20}, "StartAngle", ">TextFormat("%.2f", startAngle), &startAngle, 0, 720);
GuiSliderBar((Rectangle){ 600, 70, 120, 20}, "EndAngle", ">TextFormat("%.2f", endAngle), &endAngle, 0, 720);
GuiSliderBar((Rectangle){ 600, 140, 120, 20}, "Radius", b">NULL, &outerRadius, 0, 200);
GuiSliderBar((Rectangle){ 600, 170, 120, 20}, "Segments", b">NULL, &segments, 0, 100);
GuiSliderBar((Rectangle){ 600, 140, 120, 20}, "Radius", ">TextFormat("%.2f", outerRadius), &outerRadius, 0, 200);
GuiSliderBar((Rectangle){ 600, 170, 120, 20}, "Segments", ">TextFormat("%.2f", segments), &segments, 0, 100);
//------------------------------------------------------------------------------
minSegments = truncf(ceilf((endAngle - startAngle) / 90));

+ 5
- 5
examples/shapes/shapes_draw_rectangle_rounded.c View File

@ -66,11 +66,11 @@ int main(void)
// Draw GUI controls
//------------------------------------------------------------------------------
GuiSliderBar((Rectangle){ 640, 40, 105, 20 }, "Width", b">NULL, &width, 0, (float)GetScreenWidth() - 300);
GuiSliderBar((Rectangle){ 640, 70, 105, 20 }, "Height", b">NULL, &height, 0, (float)GetScreenHeight() - 50);
GuiSliderBar((Rectangle){ 640, 140, 105, 20 }, "Roundness", b">NULL, &roundness, 0.0f, 1.0f);
GuiSliderBar((Rectangle){ 640, 170, 105, 20 }, "Thickness", b">NULL, &lineThick, 0, 20);
GuiSliderBar((Rectangle){ 640, 240, 105, 20}, "Segments", b">NULL, &segments, 0, 60);
GuiSliderBar((Rectangle){ 640, 40, 105, 20 }, "Width", ">TextFormat("%.2f", width), &width, 0, (float)GetScreenWidth() - 300);
GuiSliderBar((Rectangle){ 640, 70, 105, 20 }, "Height", ">TextFormat("%.2f", height), &height, 0, (float)GetScreenHeight() - 50);
GuiSliderBar((Rectangle){ 640, 140, 105, 20 }, "Roundness", ">TextFormat("%.2f", roundness), &roundness, 0.0f, 1.0f);
GuiSliderBar((Rectangle){ 640, 170, 105, 20 }, "Thickness", ">TextFormat("%.2f", lineThick), &lineThick, 0, 20);
GuiSliderBar((Rectangle){ 640, 240, 105, 20}, "Segments", ">TextFormat("%.2f", segments), &segments, 0, 60);
GuiCheckBox((Rectangle){ 640, 320, 20, 20 }, "DrawRoundedRect", &drawRoundedRect);
GuiCheckBox((Rectangle){ 640, 350, 20, 20 }, "DrawRoundedLines", &drawRoundedLines);

+ 5
- 5
examples/shapes/shapes_draw_ring.c View File

@ -69,13 +69,13 @@ int main(void)
// Draw GUI controls
//------------------------------------------------------------------------------
GuiSliderBar((Rectangle){ 600, 40, 120, 20 }, "StartAngle", b">NULL, &startAngle, -450, 450);
GuiSliderBar((Rectangle){ 600, 70, 120, 20 }, "EndAngle", b">NULL, &endAngle, -450, 450);
GuiSliderBar((Rectangle){ 600, 40, 120, 20 }, "StartAngle", ">TextFormat("%.2f", startAngle), &startAngle, -450, 450);
GuiSliderBar((Rectangle){ 600, 70, 120, 20 }, "EndAngle", ">TextFormat("%.2f", endAngle), &endAngle, -450, 450);
GuiSliderBar((Rectangle){ 600, 140, 120, 20 }, "InnerRadius", b">NULL, &innerRadius, 0, 100);
GuiSliderBar((Rectangle){ 600, 170, 120, 20 }, "OuterRadius", b">NULL, &outerRadius, 0, 200);
GuiSliderBar((Rectangle){ 600, 140, 120, 20 }, "InnerRadius", ">TextFormat("%.2f", innerRadius), &innerRadius, 0, 100);
GuiSliderBar((Rectangle){ 600, 170, 120, 20 }, "OuterRadius", ">TextFormat("%.2f", outerRadius), &outerRadius, 0, 200);
GuiSliderBar((Rectangle){ 600, 240, 120, 20 }, "Segments", b">NULL, &segments, 0, 100);
GuiSliderBar((Rectangle){ 600, 240, 120, 20 }, "Segments", ">TextFormat("%.2f", segments), &segments, 0, 100);
GuiCheckBox((Rectangle){ 600, 320, 20, 20 }, "Draw Ring", &drawRing);
GuiCheckBox((Rectangle){ 600, 350, 20, 20 }, "Draw RingLines", &drawRingLines);

Loading…
Cancel
Save