* Removed any hotreload functionality to simplify the code-base, may introduce it back again if there's a need to redesign the UI as it was used for dynamic prototyping. * Split the code base into two packages: generator and frontend. The 'generator' package is reponsible for the functionality of making the atlases, etc... while the frontend is pure the immediate mode UI implemented with raygui and application globals * New build scripts, windows only for now.
32 lines
1.2 KiB
Odin
32 lines
1.2 KiB
Odin
package tinyfiledialogs
|
|
|
|
import "core:c"
|
|
|
|
when ODIN_OS == .Windows {
|
|
foreign import lib {"tinyfiledialogs.lib", "system:comdlg32.lib", "system:Ole32.lib"}
|
|
} else when ODIN_OS == .Linux || ODIN_OS == .Darwin {
|
|
foreign import lib "libtinyfiledialogs.a"
|
|
}
|
|
|
|
foreign lib {
|
|
@(link_name = "tinyfd_notifyPopup")
|
|
notify_popup :: proc(title, message, icon_type: cstring) -> c.int ---
|
|
|
|
@(link_name = "tinyfd_messageBox")
|
|
message_box :: proc(title, message, dialog_type, icon_type: cstring, default_button: c.int) -> c.int ---
|
|
|
|
@(link_name = "tinyfd_inputBox")
|
|
input_box :: proc(title, message, default_input: cstring) -> [^]c.char ---
|
|
|
|
@(link_name = "tinyfd_saveFileDialog")
|
|
save_file_dialog :: proc(title, default_path: cstring, pattern_count: c.int, patterns: [^]cstring, file_desc: cstring) -> [^]c.char ---
|
|
|
|
@(link_name = "tinyfd_openFileDialog")
|
|
open_file_dialog :: proc(title, default_path: cstring, pattern_count: c.int, patterns: [^]cstring, file_desc: cstring, allow_multi: c.int) -> [^]c.char ---
|
|
|
|
@(link_name = "tinyfd_selectFolderDialog")
|
|
select_folder_dialog :: proc(title, default_path: cstring) -> [^]c.char ---
|
|
|
|
@(link_name = "tinyfd_colorChooser")
|
|
color_chooser :: proc(title, default_hex_rgb: cstring, default_rgb, result_rgb: [3]byte) -> [^]c.char ---
|
|
}
|