Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gauthier Quesnel
irritator
Commits
6a6036fb
Commit
6a6036fb
authored
Jun 07, 2021
by
Gauthier Quesnel
Browse files
gui: enable a send message from constant model
parent
18cb1c78
Pipeline
#34508
passed with stage
in 1 minute and 15 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
app/gui/node-editor.cpp
View file @
6a6036fb
...
...
@@ -2208,9 +2208,26 @@ show_dynamics_inputs(editor& ed, generator& dyn)
}
static
void
show_dynamics_inputs
(
editor
&
/*ed*/
,
constant
&
dyn
)
show_dynamics_inputs
(
editor
&
ed
,
constant
&
dyn
)
{
ImGui
::
InputDouble
(
"value"
,
&
dyn
.
default_value
);
ImGui
::
InputDouble
(
"offset"
,
&
dyn
.
default_offset
);
if
(
ed
.
is_running
())
{
if
(
ImGui
::
Button
(
"Send now"
))
{
dyn
.
value
=
dyn
.
default_value
;
dyn
.
sigma
=
dyn
.
default_offset
;
auto
&
mdl
=
get_model
(
dyn
);
mdl
.
tl
=
ed
.
simulation_current
;
mdl
.
tn
=
ed
.
simulation_current
+
dyn
.
sigma
;
if
(
dyn
.
sigma
&&
mdl
.
tn
==
ed
.
simulation_current
)
mdl
.
tn
=
std
::
nextafter
(
ed
.
simulation_current
,
ed
.
simulation_current
+
1.
);
ed
.
sim
.
sched
.
update
(
mdl
,
mdl
.
tn
);
}
}
}
static
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment