Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
This commit is contained in:
@@ -52,7 +52,7 @@ String EditorSpinSlider::get_text_value() const {
|
||||
return TS->format_number(String::num(get_value(), Math::range_step_decimals(get_step())));
|
||||
}
|
||||
|
||||
void EditorSpinSlider::_gui_input(const Ref<InputEvent> &p_event) {
|
||||
void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) {
|
||||
ERR_FAIL_COND(p_event.is_null());
|
||||
|
||||
if (read_only) {
|
||||
@@ -564,8 +564,6 @@ void EditorSpinSlider::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_flat", "flat"), &EditorSpinSlider::set_flat);
|
||||
ClassDB::bind_method(D_METHOD("is_flat"), &EditorSpinSlider::is_flat);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_gui_input"), &EditorSpinSlider::_gui_input);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "label"), "set_label", "get_label");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "suffix"), "set_suffix", "get_suffix");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "read_only"), "set_read_only", "is_read_only");
|
||||
|
||||
Reference in New Issue
Block a user