21 const int window_x,
const int window_y) :
28 do_auto_animation_(false),
29 animation_speed_(kAnimeSpeedMin)
31 const int button_interval = 10;
32 const int button_width = 40;
34 const int kButtonTopY =
38 button_.push_back(std::make_unique<SimpleButton>(
39 "<<", kButtonLeftX, kButtonTopY, button_width, button_width));
40 button_.back()->SetActivateFunction([
this]() { MoveMostPrevNode(); });
42 button_.push_back(std::make_unique<SimpleButton>(
43 "<", kButtonLeftX + (button_interval + button_width) * 1, kButtonTopY,
44 button_width, button_width));
45 button_.back()->SetActivateFunction([
this]() { MovePrevNode(); });
47 button_.push_back(std::make_unique<SimpleButton>(
49 kButtonLeftX + (button_interval + button_width) * 2,
51 button_width, button_width));
52 button_.back()->SetActivateFunction(
53 [
this]() { do_auto_animation_ = !do_auto_animation_; });
55 button_.push_back(std::make_unique<SimpleButton>(
56 ">", kButtonLeftX + (button_interval + button_width) * 3, kButtonTopY,
57 button_width, button_width));
58 button_.back()->SetActivateFunction([
this]() { MoveNextNode(); });
60 button_.push_back(std::make_unique<SimpleButton>(
61 ">>", kButtonLeftX + (button_interval + button_width) * 4, kButtonTopY,
62 button_width, button_width));
63 button_.back()->SetActivateFunction([
this]() { MoveMostNextNode(); });
65 button_.push_back(std::make_unique<SimpleButton>(
66 "↓", kButtonLeftX + (button_interval + button_width) * 3,
67 kButtonTopY + (button_interval + button_width),
68 button_width, button_width));
69 button_.back()->SetActivateFunction([
this]()
71 if (animation_speed_ > kAnimeSpeedMin)
77 button_.push_back(std::make_unique<SimpleButton>(
78 "↑", kButtonLeftX + (button_interval + button_width) * 4,
79 kButtonTopY + (button_interval + button_width),
80 button_width, button_width));
81 button_.back()->SetActivateFunction([
this]()
83 if (animation_speed_ < kAnimeSpeedMax)
89 button_.push_back(std::make_unique<SimpleButton>(
91 kButtonLeftX + (button_interval + button_width) * 1,
92 kButtonTopY + (button_interval + button_width) * 2,
93 button_width * 2, button_width));
94 button_.back()->SetActivateFunction([
this]() { MovePrevSimulation(); });
96 button_.push_back(std::make_unique<SimpleButton>(
98 kButtonLeftX + (button_interval + button_width) * 3,
99 kButtonTopY + (button_interval + button_width) * 2,
100 button_width * 2, button_width));
101 button_.back()->SetActivateFunction([
this]() { MoveNextSimulation(); });
103 const int close_button_size = 28;
104 const int close_button_x =
gui_left_pos_x_ + kWidth - close_button_size / 2 - 2;
105 const int close_button_y =
gui_top_pos_y_ + close_button_size / 2 + 2;
107 button_.push_back(std::make_unique<SimpleButton>(
108 "×", close_button_x, close_button_y,
109 close_button_size, close_button_size));
173 const unsigned int text_color = GetColor(0, 0, 0);
175 DrawFormatStringToHandle(
180 "[シミュレーション%d回目(全%d回)]",
182 GetAllSimulationNum(),
186 int start_node_num = 0;
187 int end_node_num = 0;
189 if (simulation_num_ == 0)
193 if (!simulation_end_index_.empty())
195 end_node_num =
static_cast<int>(simulation_end_index_[0]);
199 end_node_num =
static_cast<int>(all_node_num_ - 1);
202 else if (simulation_num_ ==
static_cast<int>(simulation_end_index_.size()))
204 start_node_num =
static_cast<int>(
205 simulation_end_index_[simulation_num_ - 1] + 1);
206 end_node_num =
static_cast<int>(all_node_num_ - 1);
210 start_node_num =
static_cast<int>(
211 simulation_end_index_[simulation_num_ - 1] + 1);
212 end_node_num =
static_cast<int>(simulation_end_index_[simulation_num_]);
215 DrawFormatStringToHandle(
220 "表示ノード : %d (%d~%d)",
221 display_node_num_, start_node_num, end_node_num, all_node_num_ - 1);
223 DrawFormatStringToHandle(
228 "全ノード : %d ", all_node_num_ - 1);
230 DrawFormatStringToHandle(
235 do_auto_animation_ ==
true ?
236 "自動再生 : 再生/速度%d" :
"自動再生 : 停止/速度%d",
239 DrawFormatStringToHandle(