Commit 41db54cb authored by Florian Oetke's avatar Florian Oetke
Browse files

fixed gitlab ci

parent 80ad7d89
......@@ -18,7 +18,7 @@ build_gcc:
- cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../bin -DCMAKE_BUILD_TYPE=Release -DMIRRAGE_EXPORT_EXECUTABLE=ON ..
- cmake --build . --target src/install
- cmake --build . --target test
- wget -nc -Omodel_data.tar.xz https://github.com/lowkey42/mirrage/releases/download/v0.2/model_data.tar.xz
- wget -N -Omodel_data.tar.xz https://github.com/lowkey42/mirrage/releases/download/v0.2/model_data.tar.xz || true
- cd bin/bin
- tar xf ../../model_data.tar.xz
artifacts:
......@@ -42,7 +42,7 @@ build_clang:
- cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../bin -DCMAKE_BUILD_TYPE=Release -DMIRRAGE_EXPORT_EXECUTABLE=ON ..
- cmake --build . --target src/install
- cmake --build . --target test
- wget -nc -Omodel_data.tar.xz https://github.com/lowkey42/mirrage/releases/download/v0.2/model_data.tar.xz
- wget -N -Omodel_data.tar.xz https://github.com/lowkey42/mirrage/releases/download/v0.2/model_data.tar.xz || true
- cd bin/bin
- tar xf ../../model_data.tar.xz
artifacts:
......
......@@ -338,6 +338,7 @@ namespace mirrage {
if(_show_ui) {
_draw_settings_window();
_draw_histogram_window();
_draw_animation_window();
if(_show_profiler) {
_meta_system.renderer().profiler().enable();
......@@ -713,6 +714,51 @@ namespace mirrage {
#endif
}
void Test_screen::_draw_animation_window()
{
auto ctx = _gui.ctx();
if(nk_begin_titled(ctx,
"Animation",
"Animation",
_gui.centered_right(300, 500),
NK_WINDOW_BORDER | NK_WINDOW_MOVABLE | NK_WINDOW_TITLE | NK_WINDOW_MINIMIZABLE)) {
// TODO
nk_layout_row_dynamic(ctx, 20, 2);
nk_label(ctx, "Preset", NK_TEXT_LEFT);
auto animations_strs = std::array<const char*, 9>{
{"[None]", "Attack", "Dance", "Die", "Flee", "Idle", "Sad", "Sleep", "Walk"}};
auto animations_ids = std::array<util::Str_id, 9>{{""_strid,
"attack"_strid,
"dance"_strid,
"die"_strid,
"flee"_strid,
"idle"_strid,
"sad"_strid,
"sleep"_strid,
"walk"_strid}};
auto curr_animation_id = 0; // TODO: get
auto new_animation_id = nk_combo(ctx,
animations_strs.data(),
animations_strs.size(),
curr_animation_id,
14,
nk_vec2(100.f, 200));
// TODO: set
// TODO: rest only if there is an animation playing
// TODO: time slider
//nk_slide_float()
// TODO: play/pause/reverse buttons
}
nk_end(ctx);
}
void Test_screen::_update_sun_position()
{
......
......@@ -79,5 +79,6 @@ namespace mirrage {
void _draw_settings_window();
void _draw_profiler_window();
void _draw_histogram_window();
void _draw_animation_window();
};
} // namespace mirrage
......@@ -45,6 +45,9 @@ namespace mirrage::renderer {
auto animation() { return _current_animation; }
auto time() const { return _time; }
void time(float time) { _time = time; }
// TODO: pause, stop, speed, ...
private:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment