mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
sokol.sapp,gg: add support for drag & drop events (#11359)
This commit is contained in:
@@ -194,6 +194,10 @@ pub fn new_context(cfg Config) &Context {
|
||||
high_dpi: true
|
||||
fullscreen: cfg.fullscreen
|
||||
__v_native_render: cfg.native_rendering
|
||||
// drag&drop
|
||||
enable_dragndrop: cfg.enable_dragndrop
|
||||
max_dropped_files: cfg.max_dropped_files
|
||||
max_dropped_file_path_length: cfg.max_dropped_file_path_length
|
||||
}
|
||||
g.window = window
|
||||
return g
|
||||
|
||||
@@ -77,6 +77,10 @@ pub:
|
||||
font_bytes_mono []byte
|
||||
font_bytes_italic []byte
|
||||
native_rendering bool // Cocoa on macOS/iOS, GDI+ on Windows
|
||||
// drag&drop
|
||||
enable_dragndrop bool // enable file dropping (drag'n'drop), default is false
|
||||
max_dropped_files int = 1 // max number of dropped files to process (default: 1)
|
||||
max_dropped_file_path_length int = 2048 // max length in bytes of a dropped UTF-8 file path (default: 2048)
|
||||
}
|
||||
|
||||
pub struct PenConfig {
|
||||
|
||||
Reference in New Issue
Block a user