mirror of
https://github.com/He4eT/cheap-glkote.git
synced 2026-05-05 08:57:25 +00:00
Dirty initial commit
This commit is contained in:
commit
eab87d32a9
13 changed files with 7039 additions and 0 deletions
36
src/fakeDialog.js
Normal file
36
src/fakeDialog.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
class FakeDialog {
|
||||
constructor(handlers) {
|
||||
this.streaming = false
|
||||
this.handlers = handlers
|
||||
this.path = 'fake/path'
|
||||
}
|
||||
|
||||
file_ref_exists = ref => false
|
||||
|
||||
file_construct_ref(filename, usage, gameid) {
|
||||
return {
|
||||
filename: [this.path, filename].join('/'),
|
||||
usage: usage || ''
|
||||
}
|
||||
}
|
||||
|
||||
file_read(dirent, israw) {
|
||||
console.log('fake_file_read', dirent, israw)
|
||||
return 'content'
|
||||
}
|
||||
|
||||
file_write(dirent, content, israw) {
|
||||
if (content.length === 0) return (void null)
|
||||
console.log('fake_file_write', dirent, israw, content.length)
|
||||
}
|
||||
|
||||
open(tosave, usage, gameid, callback) {
|
||||
this.handlers.onFileNameRequest(tosave, usage, callback)
|
||||
}
|
||||
|
||||
log(message) {
|
||||
console.log(message)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = FakeDialog
|
||||
Loading…
Add table
Add a link
Reference in a new issue