A downloadable tool for Windows and Android

Download

Download
ADF demo project.zip 541 kB

Install instructions

ADF

Android Dialog File

By Abdelhakim Mahha

!this is not an android plugin, it's a Godot add-ons plugin is a dialog file plugin for Godot we can use it for all template but it created for android because we have already a dialog file popup in Godot.

You can test it on android Here : ADF-test.apk

How to use :

  1. Download ADF-main.zip Here and extract files
  2. Copy addons folder from ADF-main into your Godot project in the following path res://
  3. go to: Project > Project Setting > Plugins and press "enable"
  4. Now when you click on Add new child you will see another node added to your Godot nodes

IMG4

  1. Add (enable) permissions in the android export
    1. Read External Storage
    2. Write External Storage

read external storage image

Signals (Connections):

there is 4 signals for this node

image

selected_xfile(xfile_path, file_name)

xfile_path == is the path to the file, for example storage/0/DCI/myimage.png file_name == myimage.png

selected_multi_xfiles(xfiles_path, files_name)

  • xfiles_paths == is an Array of paths for the selected files
  • files_name == is an Array for the selected files name Note : every file_path has the same order for the file name in Arrays received

for example:

  • xfiles_paths = ["/.../.../image.jpg","/.../.../son.mp3"]
  • files_name = ["image.jpg","son.mp3"]

selected_xfolder(xfolder_path, folder_name)

This signal send the folder directory (xfolder_path) and the folder name (folder_name)

dialog_closed

Note : This signal is when the popup closed from the close button, and you should use close bullon to hide the dialog file it is not like "Hide() function"

## Functions 
 
func _on_ADF_selected_xfile(xfile_path, file_name): 
     pass # Replace with function body.   
func _on_ADF_selected_multi_xfiles(xfiles_path, files_name):      
    pass # Replace with function body.  
 
func _on_ADF_selected_xfolder(xfolder_path, folder_name):         
     pass # Replace with function body. 
  
func _on_ADF_dialog_closed():          
    pass # Replace with function body.

Settings

image settings

Dialog Type

  • Select File
  • Select Folder
  • Select more than one file

Columns

  • Number of columns shown in dialog file

Font Size

  • Font size for the folders and files name

Allow back on android

  • if this bool is true, the button system for android device do the back function to the previous folder

Dialog Theme

Dark theme Light theme

Files filter

it is an Array of file format that you want to see on your dialog file, if it empty (default) you will see all files types

for example : if I chose pdf

img

the Result is :

img

Created By Abdelhakim Mahha







Leave a comment

Log in with itch.io to leave a comment.