mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-11 13:21:10 +01:00
Fix javascript build.
This commit is contained in:
parent
bd58e6b989
commit
c48381b86c
@ -541,15 +541,15 @@ const PandemoniumInput = {
|
||||
}, false);
|
||||
},
|
||||
|
||||
godot_js_input_vibrate_handheld__sig: 'vi',
|
||||
godot_js_input_vibrate_handheld: function (p_duration_ms) {
|
||||
if (typeof navigator.vibrate !== 'function') {
|
||||
GodotRuntime.print('This browser does not support vibration.');
|
||||
} else {
|
||||
navigator.vibrate(p_duration_ms);
|
||||
}
|
||||
},
|
||||
pandemonium_js_input_vibrate_handheld__sig: 'vi',
|
||||
pandemonium_js_input_vibrate_handheld: function(p_duration_ms) {
|
||||
if (typeof navigator.vibrate !== 'function') {
|
||||
GodotRuntime.print('This browser does not support vibration.');
|
||||
} else {
|
||||
navigator.vibrate(p_duration_ms);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
autoAddDeps(PandemoniumInput, '$PandemoniumInput');
|
||||
mergeInto(LibraryManager.library, PandemoniumInput);
|
||||
mergeInto(LibraryManager.library, PandemoniumInput);
|
@ -786,7 +786,7 @@ bool OS_JavaScript::has_virtual_keyboard() const {
|
||||
}
|
||||
|
||||
void OS_JavaScript::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect, VirtualKeyboardType p_type, int p_max_input_length, int p_cursor_start, int p_cursor_end) {
|
||||
godot_js_display_vk_show(p_existing_text.utf8().get_data(), p_type, p_cursor_start, p_cursor_end);
|
||||
pandemonium_js_display_vk_show(p_existing_text.utf8().get_data(), p_type, p_cursor_start, p_cursor_end);
|
||||
}
|
||||
|
||||
void OS_JavaScript::hide_virtual_keyboard() {
|
||||
@ -973,7 +973,7 @@ bool OS_JavaScript::can_draw() const {
|
||||
}
|
||||
|
||||
void OS_JavaScript::vibrate_handheld(int p_duration_ms) {
|
||||
godot_js_input_vibrate_handheld(p_duration_ms);
|
||||
pandemonium_js_input_vibrate_handheld(p_duration_ms);
|
||||
}
|
||||
|
||||
String OS_JavaScript::get_user_data_dir() const {
|
||||
|
@ -57,7 +57,7 @@ extern void pandemonium_js_input_mouse_move_cb(void (*p_callback)(double p_x, do
|
||||
extern void pandemonium_js_input_mouse_wheel_cb(int (*p_callback)(double p_delta_x, double p_delta_y));
|
||||
extern void pandemonium_js_input_touch_cb(void (*p_callback)(int p_type, int p_count), uint32_t *r_identifiers, double *r_coords);
|
||||
extern void pandemonium_js_input_key_cb(void (*p_callback)(int p_type, int p_repeat, int p_modifiers), char r_code[32], char r_key[32]);
|
||||
extern void godot_js_input_vibrate_handheld(int p_duration_ms);
|
||||
extern void pandemonium_js_input_vibrate_handheld(int p_duration_ms);
|
||||
|
||||
// Input gamepad
|
||||
extern void pandemonium_js_input_gamepad_cb(void (*p_on_change)(int p_index, int p_connected, const char *p_id, const char *p_guid));
|
||||
|
Loading…
Reference in New Issue
Block a user