Actually write the damn tool
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -52,3 +52,6 @@ Module.symvers
|
|||||||
Mkfile.old
|
Mkfile.old
|
||||||
dkms.conf
|
dkms.conf
|
||||||
|
|
||||||
|
# outputs
|
||||||
|
reader
|
||||||
|
saver
|
||||||
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "tinyfiledialogs"]
|
||||||
|
path = tinyfiledialogs
|
||||||
|
url = https://git.code.sf.net/p/tinyfiledialogs/code
|
8
Makefile
Normal file
8
Makefile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
CC = gcc
|
||||||
|
|
||||||
|
build:
|
||||||
|
$(CC) renpy-filepicker-saver.c tinyfiledialogs/tinyfiledialogs.c -o saver
|
||||||
|
$(CC) renpy-filepicker-reader.c tinyfiledialogs/tinyfiledialogs.c -o reader
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -vf saver reader
|
@ -1,4 +1,5 @@
|
|||||||
# renpy-filepicker
|
# renpy-filepicker
|
||||||
|
|
||||||
>current year
|
>current year
|
||||||
>ren'py doesn't have a file picker
|
|
||||||
|
>ren'py doesn't have a file picker
|
||||||
|
14
renpy-filepicker-reader.c
Normal file
14
renpy-filepicker-reader.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include "./tinyfiledialogs/tinyfiledialogs.h"
|
||||||
|
|
||||||
|
int main () {
|
||||||
|
char const * imageFilterPatterns[2] = {"*.png", "*.jpg"};
|
||||||
|
char* filename = tinyfd_openFileDialog("Please select an image",
|
||||||
|
"",
|
||||||
|
2,
|
||||||
|
imageFilterPatterns,
|
||||||
|
"Image Files",
|
||||||
|
0);
|
||||||
|
|
||||||
|
printf("%s\n", filename);
|
||||||
|
}
|
12
renpy-filepicker-saver.c
Normal file
12
renpy-filepicker-saver.c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include "./tinyfiledialogs/tinyfiledialogs.h"
|
||||||
|
|
||||||
|
int main () {
|
||||||
|
char* filename = tinyfd_saveFileDialog("Please select an export location",
|
||||||
|
"wani-export.zip",
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
printf("%s\n", filename);
|
||||||
|
}
|
1
tinyfiledialogs
Submodule
1
tinyfiledialogs
Submodule
Submodule tinyfiledialogs added at e60005e259
Reference in New Issue
Block a user