Giter Club home page Giter Club logo

clipboard's Introduction

Clipboard

Clipboard is a plugin for Adventure Game Studio (AGS). It offers access to the Windows clipboard, to enable AGS developers to add cut/copy/paste functionality to their AGS game, allowing data to be transferred between the game and other applications. Currently, only plain text strings (ASCII/ANSI C) can be transferred to and from the clipboard.

How To Use

To use the Clipboard plugin in an AGS project, you have to first add the plugin to AGS and activate it within the project. You then simply call the methods provided by the plugin from AGS script when you need to access the clipboard.

How to Activate Plugin

Place AgsClipboard.dll in the Adventure Game Studio engine folder, e.g. C:\Program Files (x86)\Adventure Game Studio 3.4.1 (while IDE is not running). Start the IDE and load the game project. Under the "Plugins" entry in the project tree should now appear "AGS Clipboard Plugin vX.Y (agsclipboard.dll)". Right-click and check "Use this plugin". You can now use the plugin.

How to Use Plugin Features

The plugin provides two methods: bool Clipboard.CopyText(String copyString), which copies a String you provide onto the Windows clipboard (returning true if successful), and String Clipboard.PasteText(), which returns the String that is currently on the Windows clipboard (or null if none). You can use these functions in your game to implement cut, copy and paste functionality (see the demo game).

The plugin also #defines two macros: CLIPBOARD_PLUGIN and CLIPBOARD_PLUGIN_VERSION, where CLIPBOARD_PLUGIN_VERSION is a float representation of the plugin version number, with two decimal digits for the minor version (so that e.g. v1.2 is represented as 1.02). That means that you can use #ifdefโ€“#endif and #ifndefโ€“#endif blocks in your script, so it only tries to use the clipboard if the plugin is present.

License and Credits

This code is offered under multiple licenses. Choose whichever one you like.

You may use it under the MIT license:

You may also use it under the Creative Commons Attribution 4.0 International License:

You may also use it under the Artistic License 2.0:

In game credits, the preferred style is "Clipboard plugin by Snarky" or "Clipboard plugin by Gunnar Harboe", but you can adapt it as you like to the overall style of credit (or leave it out: no in-game credit is required, though it is appreciated).

clipboard's People

Contributors

messengerbag avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.