mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-23 03:05:32 +02:00
fix(pty): use double, not float, for blink times
Changes blink_on_time and blink_off_time to use double rather than float. When float was used, the default blink_off_time of 0.3 was being converted to 0.30000001192093 in GDScript.
This commit is contained in:
parent
481a1cb04a
commit
cb86cc95d7
2 changed files with 11 additions and 11 deletions
|
@ -84,7 +84,7 @@ Terminal::Terminal()
|
|||
blink_off_time = 0.3;
|
||||
|
||||
bell_muted = false;
|
||||
bell_cooldown = 0;
|
||||
bell_cooldown = 0.1;
|
||||
bell_timer = memnew(Timer);
|
||||
bell_timer->set_one_shot(true);
|
||||
add_child(bell_timer, false, INTERNAL_MODE_FRONT);
|
||||
|
@ -607,24 +607,24 @@ double Terminal::get_bell_cooldown() const {
|
|||
return bell_cooldown;
|
||||
}
|
||||
|
||||
void Terminal::set_blink_on_time(const float time)
|
||||
void Terminal::set_blink_on_time(const double time)
|
||||
{
|
||||
blink_on_time = time;
|
||||
fore_material->set_shader_parameter("blink_on_time", blink_on_time);
|
||||
}
|
||||
|
||||
float Terminal::get_blink_on_time() const
|
||||
double Terminal::get_blink_on_time() const
|
||||
{
|
||||
return blink_on_time;
|
||||
}
|
||||
|
||||
void Terminal::set_blink_off_time(const float time)
|
||||
void Terminal::set_blink_off_time(const double time)
|
||||
{
|
||||
blink_off_time = time;
|
||||
fore_material->set_shader_parameter("blink_off_time", blink_off_time);
|
||||
}
|
||||
|
||||
float Terminal::get_blink_off_time() const
|
||||
double Terminal::get_blink_off_time() const
|
||||
{
|
||||
return blink_off_time;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue