Merge pull request #24205 from YeldhamDev/tileset_context_hide_script

Hide "Script" section in the "TilesetEditorContext"
This commit is contained in:
Rémi Verschelde 2018-12-07 07:47:02 +01:00 committed by GitHub
commit cac8cc8052
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -2442,6 +2442,11 @@ void TilesetEditorContext::_get_property_list(List<PropertyInfo> *p_list) const
}
}
void TilesetEditorContext::_bind_methods() {
ClassDB::bind_method("_hide_script_from_inspector", &TilesetEditorContext::_hide_script_from_inspector);
}
TilesetEditorContext::TilesetEditorContext(TileSetEditor *p_tileset_editor) {
tileset_editor = p_tileset_editor;

View file

@ -213,6 +213,7 @@ class TilesetEditorContext : public Object {
bool snap_options_visible;
public:
bool _hide_script_from_inspector() { return true; }
void set_tileset(const Ref<TileSet> &p_tileset);
private:
@ -222,6 +223,7 @@ protected:
bool _set(const StringName &p_name, const Variant &p_value);
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
static void _bind_methods();
public:
TilesetEditorContext(TileSetEditor *p_tileset_editor);