Explorar o código

added clipboard support for hide

Nicolas Cannasse %!s(int64=4) %!d(string=hai) anos
pai
achega
3d6b1cff7f
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  1. 8 1
      hxd/System.js.hx

+ 8 - 1
hxd/System.js.hx

@@ -141,10 +141,17 @@ class System {
 	}
 	}
 
 
 	public static function getClipboardText() : String {
 	public static function getClipboardText() : String {
+		#if (hide && editor)
+		return nw.Clipboard.get().get(Text);
+		#end
 		return null;
 		return null;
 	}
 	}
-	
+
 	public static function setClipboardText(text:String) : Bool {
 	public static function setClipboardText(text:String) : Bool {
+		#if (hide && editor)
+		nw.Clipboard.get().set(text, Text);
+		return true;
+		#end
 		return false;
 		return false;
 	}
 	}