Actually write the damn tool
This commit is contained in:
parent
fc0202ec46
commit
6193299dfb
3
.gitignore
vendored
3
.gitignore
vendored
@ -52,3 +52,6 @@ Module.symvers
|
||||
Mkfile.old
|
||||
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
|
||||
|
||||
>current year
|
||||
>ren'py doesn't have a file picker
|
||||
>current year
|
||||
|
||||
>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
@ -0,0 +1 @@
|
||||
Subproject commit e60005e2592f13c22dbad8100de66f6dfa0d0d7c
|
Loading…
Reference in New Issue
Block a user