Use BSInputEventKey, and bind queue_save().

This commit is contained in:
Relintai 2020-07-30 23:49:48 +02:00
parent 02b68e6df7
commit 634f27219e
2 changed files with 4 additions and 1 deletions

View File

@ -311,7 +311,7 @@ void InputMapEditor::_press_a_key_confirm() {
if (last_wait_for_key.is_null())
return;
Ref<InputEventKey> ie;
Ref<BSInputEventKey> ie;
ie.instance();
ie->set_scancode(last_wait_for_key->get_scancode());
ie->set_shift(last_wait_for_key->get_shift());
@ -941,6 +941,8 @@ void InputMapEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &InputMapEditor::can_drop_data_fw);
ClassDB::bind_method(D_METHOD("drop_data_fw"), &InputMapEditor::drop_data_fw);
ClassDB::bind_method(D_METHOD("queue_save"), &InputMapEditor::queue_save);
ClassDB::bind_method(D_METHOD("get_add_texture"), &InputMapEditor::get_add_texture);
ClassDB::bind_method(D_METHOD("set_add_texture", "tex"), &InputMapEditor::set_add_texture);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "add_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_add_texture", "get_add_texture");

View File

@ -31,6 +31,7 @@
#ifndef INPUT_MAP_EDITOR_H
#define INPUT_MAP_EDITOR_H
#include "bs_input_event_key.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/menu_button.h"