Skip to content

Commit

Permalink
Fix wave
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Nov 6, 2023
1 parent 64bf744 commit 6ed6685
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ namespace xtd::forms {
auto wave4 = enabled ? std::vector {0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 4, 0, 0, 0} : std::vector {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
auto wave5 = enabled ? std::vector {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 4} : std::vector {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x1, y + wave1[frame_] ? line_height / wave1[frame_] / 2 : 0, line_width, line_height - line_height / wave1[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x2, y + wave2[frame_] ? line_height / wave2[frame_] / 2 : 0, line_width, line_height - line_height / wave2[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x3, y + wave3[frame_] ? line_height / wave3[frame_] / 2 : 0, line_width, line_height - line_height / wave3[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x4, y + wave4[frame_] ? line_height / wave4[frame_] / 2 : 0, line_width, line_height - line_height / wave4[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x5, y + wave5[frame_] ? line_height / wave5[frame_] / 2 : 0, line_width, line_height - line_height / wave5[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x1, y + wave1[frame_] ? line_height / wave1[frame_] / 2 : 0, line_width, line_height - wave1[frame_] ? line_height / wave1[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x2, y + wave2[frame_] ? line_height / wave2[frame_] / 2 : 0, line_width, line_height - wave2[frame_] ? line_height / wave2[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x3, y + wave3[frame_] ? line_height / wave3[frame_] / 2 : 0, line_width, line_height - wave3[frame_] ? line_height / wave3[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x4, y + wave4[frame_] ? line_height / wave4[frame_] / 2 : 0, line_width, line_height - wave4[frame_] ? line_height / wave4[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x5, y + wave5[frame_] ? line_height / wave5[frame_] / 2 : 0, line_width, line_height - wave5[frame_] ? line_height / wave5[frame_] : 0, line_width / 2);
}

void on_timer() override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ namespace xtd::forms {
auto wave4 = enabled ? std::vector {16, 8, 4, 2, 4, 8, 16, 0} : std::vector {0, 0, 0, 0, 0, 0, 0, 0};
auto wave5 = enabled ? std::vector {8, 4, 2, 4, 8, 16, 0, 16} : std::vector {0, 0, 0, 0, 0, 0, 0, 0};

graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x1, y + wave1[frame_] ? line_height / wave1[frame_] / 2 : 0, line_width, line_height - line_height / wave1[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x2, y + wave2[frame_] ? line_height / wave2[frame_] / 2 : 0, line_width, line_height - line_height / wave2[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x3, y + wave3[frame_] ? line_height / wave3[frame_] / 2 : 0, line_width, line_height - line_height / wave3[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x4, y + wave4[frame_] ? line_height / wave4[frame_] / 2 : 0, line_width, line_height - line_height / wave4[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x5, y + wave5[frame_] ? line_height / wave5[frame_] / 2 : 0, line_width, line_height - line_height / wave5[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x1, y + wave1[frame_] ? line_height / wave1[frame_] / 2 : 0, line_width, line_height - wave1[frame_] ? line_height / wave1[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x2, y + wave2[frame_] ? line_height / wave2[frame_] / 2 : 0, line_width, line_height - wave2[frame_] ? line_height / wave2[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x3, y + wave3[frame_] ? line_height / wave3[frame_] / 2 : 0, line_width, line_height - wave3[frame_] ? line_height / wave3[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x4, y + wave4[frame_] ? line_height / wave4[frame_] / 2 : 0, line_width, line_height - wave4[frame_] ? line_height / wave4[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x5, y + wave5[frame_] ? line_height / wave5[frame_] / 2 : 0, line_width, line_height - wave5[frame_] ? line_height / wave5[frame_] : 0, line_width / 2);
}

void on_timer() override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ namespace xtd::forms {
auto wave4 = enabled ? std::vector {0, 0, 0, 0, 4, 2, 2, 2, 2, 2, 4, 0} : std::vector {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
auto wave5 = enabled ? std::vector {0, 0, 0, 0, 0, 4, 2, 2, 2, 2, 2, 4} : std::vector {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x1, y + wave1[frame_] ? line_height / wave1[frame_] / 2 : 0, line_width, line_height - line_height / wave1[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x2, y + wave2[frame_] ? line_height / wave2[frame_] / 2 : 0, line_width, line_height - line_height / wave2[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x3, y + wave3[frame_] ? line_height / wave3[frame_] / 2 : 0, line_width, line_height - line_height / wave3[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x4, y + wave4[frame_] ? line_height / wave4[frame_] / 2 : 0, line_width, line_height - line_height / wave4[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x5, y + wave5[frame_] ? line_height / wave5[frame_] / 2 : 0, line_width, line_height - line_height / wave5[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x1, y + wave1[frame_] ? line_height / wave1[frame_] / 2 : 0, line_width, line_height - wave1[frame_] ? line_height / wave1[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x2, y + wave2[frame_] ? line_height / wave2[frame_] / 2 : 0, line_width, line_height - wave2[frame_] ? line_height / wave2[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x3, y + wave3[frame_] ? line_height / wave3[frame_] / 2 : 0, line_width, line_height - wave3[frame_] ? line_height / wave3[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x4, y + wave4[frame_] ? line_height / wave4[frame_] / 2 : 0, line_width, line_height - wave4[frame_] ? line_height / wave4[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x5, y + wave5[frame_] ? line_height / wave5[frame_] / 2 : 0, line_width, line_height - wave5[frame_] ? line_height / wave5[frame_] : 0, line_width / 2);
}

void on_timer() override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ namespace xtd::forms {
auto wave4 = enabled ? std::vector {2, 2, 2, 4, 0, 4, 2, 2, 2} : std::vector {2, 2, 2, 2, 2, 2, 2, 2, 2};
auto wave5 = enabled ? std::vector {2, 2, 2, 2, 2, 2, 4, 0, 4} : std::vector {2, 2, 2, 2, 2, 2, 2, 2, 2};

graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x1, y + wave1[frame_] ? line_height / wave1[frame_] / 2 : 0, line_width, line_height - line_height / wave1[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x2, y + wave2[frame_] ? line_height / wave2[frame_] / 2 : 0, line_width, line_height - line_height / wave2[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x3, y + wave3[frame_] ? line_height / wave3[frame_] / 2 : 0, line_width, line_height - line_height / wave3[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x4, y + wave4[frame_] ? line_height / wave4[frame_] / 2 : 0, line_width, line_height - line_height / wave4[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x5, y + wave5[frame_] ? line_height / wave5[frame_] / 2 : 0, line_width, line_height - line_height / wave5[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x1, y + wave1[frame_] ? line_height / wave1[frame_] / 2 : 0, line_width, line_height - wave1[frame_] ? line_height / wave1[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x2, y + wave2[frame_] ? line_height / wave2[frame_] / 2 : 0, line_width, line_height - wave2[frame_] ? line_height / wave2[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x3, y + wave3[frame_] ? line_height / wave3[frame_] / 2 : 0, line_width, line_height - wave3[frame_] ? line_height / wave3[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x4, y + wave4[frame_] ? line_height / wave4[frame_] / 2 : 0, line_width, line_height - wave4[frame_] ? line_height / wave4[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x5, y + wave5[frame_] ? line_height / wave5[frame_] / 2 : 0, line_width, line_height - wave5[frame_] ? line_height / wave5[frame_] : 0, line_width / 2);
}

void on_timer() override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ namespace xtd::forms {
auto wave4 = enabled ? std::vector {16, 8, 4, 2, 4, 8, 16, 0} : std::vector {0, 0, 0, 0, 0, 0, 0, 0};
auto wave5 = enabled ? std::vector {0, 16, 8, 4, 2, 4, 8, 16} : std::vector {0, 0, 0, 0, 0, 0, 0, 0};

graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x1, y + wave1[frame_] ? line_height / wave1[frame_] / 2 : 0, line_width, line_height - line_height / wave1[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x2, y + wave2[frame_] ? line_height / wave2[frame_] / 2 : 0, line_width, line_height - line_height / wave2[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x3, y + wave3[frame_] ? line_height / wave3[frame_] / 2 : 0, line_width, line_height - line_height / wave3[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x4, y + wave4[frame_] ? line_height / wave4[frame_] / 2 : 0, line_width, line_height - line_height / wave4[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x5, y + wave5[frame_] ? line_height / wave5[frame_] / 2 : 0, line_width, line_height - line_height / wave5[frame_], line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x1, y + wave1[frame_] ? line_height / wave1[frame_] / 2 : 0, line_width, line_height - wave1[frame_] ? line_height / wave1[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x2, y + wave2[frame_] ? line_height / wave2[frame_] / 2 : 0, line_width, line_height - wave2[frame_] ? line_height / wave2[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x3, y + wave3[frame_] ? line_height / wave3[frame_] / 2 : 0, line_width, line_height - wave3[frame_] ? line_height / wave3[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x4, y + wave4[frame_] ? line_height / wave4[frame_] / 2 : 0, line_width, line_height - wave4[frame_] ? line_height / wave4[frame_] : 0, line_width / 2);
graphics.fill_rounded_rectangle(xtd::drawing::solid_brush {xtd::drawing::color::from_argb(static_cast<xtd::byte>(opacity), color)}, x5, y + wave5[frame_] ? line_height / wave5[frame_] / 2 : 0, line_width, line_height - wave5[frame_] ? line_height / wave5[frame_] : 0, line_width / 2);
}

void on_timer() override {
Expand Down

0 comments on commit 6ed6685

Please sign in to comment.