Repository: godotengine/godot
File: editor/plugins/tiles/tile_set_atlas_source_editor.h (C/C++)

Code before:

	void _set_selection_from_array(const Array &p_selection);
	Array _get_selection_as_array();

	// A control on the tile atlas to draw and handle input events.
	Vector2i hovered_base_tile_coords = TileSetSource::INVALID_ATLAS_COORDS;

	PopupMenu *base_tile_popup_menu = nullptr;
	PopupMenu *empty_base_tile_popup_menu = nullptr;
	Ref<Texture2D> resize_handle;
	Ref<Texture2D> resize_handle_disabled;
	Control *tile_atlas_control = nullptr;
	Control *tile_atlas_control_unscaled = nullptr;
	void _tile_atlas_control_draw();
	void _tile_atlas_control_unscaled_draw();
	void _tile_atlas_control_mouse_exited();
	void _tile_atlas_control_gui_input(const Ref<InputEvent> &p_event);
	void _tile_atlas_view_transform_changed();

	// A control over the alternative tiles.
	Vector3i hovered_alternative_tile_coords = Vector3i(TileSetSource::INVALID_ATLAS_COORDS.x, TileSetSource::INVALID_ATLAS_COORDS.y, TileSetSource::INVALID_TILE_ALTERNATIVE);

	PopupMenu *alternative_tile_popup_menu = nullptr;
	Control *alternative_tiles_control = nullptr;
	Control *alternative_tiles_control_unscaled = nullptr;
	void _tile_alternatives_create_button_pressed(const Vector2i p_atlas_coords);
	void _tile_alternatives_control_draw();
	void _tile_alternatives_control_unscaled_draw();
	void _tile_alternatives_control_mouse_exited();
	void _tile_alternatives_control_gui_input(const Ref<InputEvent> &p_event);

	// -- Update functions --
	void _update_tile_id_label();
	void _update_source_inspector();
	void _update_fix_selected_and_hovered_tiles();
	void _update_atlas_source_inspector();
	void _update_tile_inspector();
	void _update_tile_data_editors();
	void _update_current_tile_data_editor();
	void _update_manage_tile_properties_button();
	void _update_atlas_view();
	void _update_toolbar();
	void _update_buttons();

	// -- Misc --
	void _auto_create_tiles();
	void _auto_remove_tiles();
	void _cancel_auto_create_tiles();
	AcceptDialog *confirm_auto_create_tiles = nullptr;
	Vector<Ref<TileSetAtlasSource>> atlases_to_auto_create_tiles;
	Vector2i _get_drag_offset_tile_coords(const Vector2i &p_offset) const;

Review comment (suggestion):
```suggestion
	void _tile_alternatives_create_button_pressed(const Vector2i &p_atlas_coords);
```

Code after:

	void _set_selection_from_array(const Array &p_selection);
	Array _get_selection_as_array();

	// A control on the tile atlas to draw and handle input events.
	Vector2i hovered_base_tile_coords = TileSetSource::INVALID_ATLAS_COORDS;

	PopupMenu *base_tile_popup_menu = nullptr;
	PopupMenu *empty_base_tile_popup_menu = nullptr;
	Ref<Texture2D> resize_handle;
	Ref<Texture2D> resize_handle_disabled;
	Control *tile_atlas_control = nullptr;
	Control *tile_atlas_control_unscaled = nullptr;
	void _tile_atlas_control_draw();
	void _tile_atlas_control_unscaled_draw();
	void _tile_atlas_control_mouse_exited();
	void _tile_atlas_control_gui_input(const Ref<InputEvent> &p_event);
	void _tile_atlas_view_transform_changed();

	// A control over the alternative tiles.
	Vector3i hovered_alternative_tile_coords = Vector3i(TileSetSource::INVALID_ATLAS_COORDS.x, TileSetSource::INVALID_ATLAS_COORDS.y, TileSetSource::INVALID_TILE_ALTERNATIVE);

	PopupMenu *alternative_tile_popup_menu = nullptr;
	Control *alternative_tiles_control = nullptr;
	Control *alternative_tiles_control_unscaled = nullptr;
	void _tile_alternatives_create_button_pressed(const Vector2i &p_atlas_coords);
	void _tile_alternatives_control_draw();
	void _tile_alternatives_control_unscaled_draw();
	void _tile_alternatives_control_mouse_exited();
	void _tile_alternatives_control_gui_input(const Ref<InputEvent> &p_event);

	// -- Update functions --
	void _update_tile_id_label();
	void _update_source_inspector();
	void _update_fix_selected_and_hovered_tiles();
	void _update_atlas_source_inspector();
	void _update_tile_inspector();
	void _update_tile_data_editors();
	void _update_current_tile_data_editor();
	void _update_manage_tile_properties_button();
	void _update_atlas_view();
	void _update_toolbar();
	void _update_buttons();

	// -- Misc --
	void _auto_create_tiles();
	void _auto_remove_tiles();
	void _cancel_auto_create_tiles();
	AcceptDialog *confirm_auto_create_tiles = nullptr;
	Vector<Ref<TileSetAtlasSource>> atlases_to_auto_create_tiles;
	Vector2i _get_drag_offset_tile_coords(const Vector2i &p_offset) const;