Skip to content

Commit

Permalink
CCT: Add mouse radius setting
Browse files Browse the repository at this point in the history
Closes #385
  • Loading branch information
univrsal committed Jan 4, 2025
1 parent 18edbdb commit 7b45437
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/cct/js/elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,11 +645,15 @@ class mouse_movement extends texture {
read_data_from_gui() {
super.read_data_from_gui();
this.data.mouse_type = parseInt($('#editor-element-movement-type').val());
this.data.mouse_radius = parseInt(
$('#editor-element-analog-stick-radius').val()
);
}

write_data_to_gui() {
super.write_data_to_gui();
$('#editor-element-movement-type').val(this.data.mouse_type);
$('#editor-element-analog-stick-radius').val(this.data.mouse_radius);
}
}
element_map.set(element_types.KEYBOARD_KEY, (json) => {
Expand Down
1 change: 1 addition & 0 deletions docs/cct/js/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ function setup_editor(type) {
}
case 'mouse_movement': {
show_property(movement_type);
show_property(analog_stick_radius);
set_description(
description,
`Mouse movement can be visualized in two ways. Either through 'Point' which will rotate an image
Expand Down

0 comments on commit 7b45437

Please sign in to comment.