User Tools

Site Tools


en:tutorials:display:clipboard

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:tutorials:display:clipboard [2018/09/10 03:41 (7 years ago)] sausageen:tutorials:display:clipboard [2020/08/31 05:37 (5 years ago)] (current) – ↷ Links adapted because of a move operation sausage
Line 3: Line 3:
 Orx now supports clipboards! We can demonstrate this by allowing the user to paste in some text, and have the text replace a text object. First there's a little setup. Orx now supports clipboards! We can demonstrate this by allowing the user to paste in some text, and have the text replace a text object. First there's a little setup.
  
-Start by using [[en:tutorials:creating_your_own_project|init to create a default project]].+Start by using [[en:tutorials:projects:creating_your_own_project|init to create a default project]].
  
 Next, define the Control-V key which is the usual for paste, except in the case of Mac OS X: Next, define the Control-V key which is the usual for paste, except in the case of Mac OS X:
Line 47: Line 47:
 Compile and run, and you'll have a window with a text object like this: Compile and run, and you'll have a window with a text object like this:
  
-{{ :en:tutorials:display:clipboard-window.png |}}+{{ tutorials:display:clipboard-window.png |}}
  
 In the Run() function (or an update function), check for the Control and V keys, call a get from the clipboard, and send the output to the text object: In the Run() function (or an update function), check for the Control and V keys, call a get from the clipboard, and send the output to the text object:
Line 64: Line 64:
 Come back to the Orx game window and press Control-V. The object will take the text from your clipboard. Nice! Come back to the Orx game window and press Control-V. The object will take the text from your clipboard. Nice!
  
-{{ :en:tutorials:display:clipboard-window-paste.png |}}+{{ tutorials:display:clipboard-window-paste.png |}}
  
 If you attempt copy and paste a file, a bitmap, or any other non-textual information into Orx, the clipboard will contain ''orxNULL''. If you attempt copy and paste a file, a bitmap, or any other non-textual information into Orx, the clipboard will contain ''orxNULL''.
Line 92: Line 92:
 Compile and run. Press Control-C to set the clipboard with the "Hello from Orx." text. Now paste into a text editor to get the text from the clipboard: Compile and run. Press Control-C to set the clipboard with the "Hello from Orx." text. Now paste into a text editor to get the text from the clipboard:
  
-{{ :en:tutorials:display:paste-into-notepad.png |}}+{{ tutorials:display:paste-into-notepad.png |}}
  
-You can also work with the clipboard in the [[en:tutorials:guide_to_the_orx_console|Orx Console]]. Go to a text editor and copy some text. Go back your Orx application and open the console. Enter:+You can also work with the clipboard in the [[en:tutorials:config:guide_to_the_orx_console|Orx Console]]. Go to a text editor and copy some text. Go back your Orx application and open the console. Enter:
  
 ''Clipboard.Get'' ''Clipboard.Get''
en/tutorials/display/clipboard.1536576089.txt.gz · Last modified: 2018/09/10 06:41 (7 years ago) (external edit)