|
| 1 | +<!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 --> |
| 2 | +<a name="readme-top"></a> |
| 3 | + |
| 4 | +<!-- PROJECT SHIELDS --> |
| 5 | +<!-- |
| 6 | +*** I'm using markdown "reference style" links for readability. |
| 7 | +*** Reference links are enclosed in brackets [ ] instead of parentheses ( ). |
| 8 | +*** See the bottom of this document for the declaration of the reference variables |
| 9 | +*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use. |
| 10 | +*** https://www.markdownguide.org/basic-syntax/#reference-style-links |
| 11 | +--> |
| 12 | +[![Contributors][contributors-shield]][contributors-url] |
| 13 | +[![Forks][forks-shield]][forks-url] |
| 14 | +[![Stargazers][stars-shield]][stars-url] |
| 15 | +[![Issues][issues-shield]][issues-url] |
| 16 | +[![MIT License][license-shield]][license-url] |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +<!-- PROJECT LOGO --> |
| 21 | +<br /> |
| 22 | +<div align="center"> |
| 23 | + <!-- TODO: Add logo: <a href="https://github.com/scratchcpp/scratchcpp-gui"> |
| 24 | + <img src="images/logo.png" alt="Logo" width="80" height="80"> |
| 25 | + </a> --> |
| 26 | + |
| 27 | +<h3 align="center">ScratchCPP GUI</h3> |
| 28 | + |
| 29 | + <p align="center"> |
| 30 | + A Qt-based library which uses **libscratchcpp** and **QNanoPainter** to render running Scratch projects. |
| 31 | + <br /> |
| 32 | + <!-- TODO: Add link to documentation: <a href="https://github.com/scratchcpp/scratchcpp-gui"><strong>Explore the docs »</strong></a> |
| 33 | + <br /> --> |
| 34 | + <br /> |
| 35 | + <a href="https://github.com/scratchcpp/scratchcpp-gui/issues">Report Bug</a> |
| 36 | + · |
| 37 | + <a href="https://github.com/scratchcpp/scratchcpp-gui/issues">Request Feature</a> |
| 38 | + </p> |
| 39 | +</div> |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +<!-- TABLE OF CONTENTS --> |
| 44 | +<details> |
| 45 | + <summary>Table of Contents</summary> |
| 46 | + <ol> |
| 47 | + <li> |
| 48 | + <a href="#about-the-project">About The Project</a> |
| 49 | + </li> |
| 50 | + <li> |
| 51 | + <a href="#getting-started">Getting Started</a> |
| 52 | + </li> |
| 53 | + <li><a href="#usage">Usage</a></li> |
| 54 | + <li><a href="#roadmap">Roadmap</a></li> |
| 55 | + <li><a href="#contributing">Contributing</a></li> |
| 56 | + <li><a href="#license">License</a></li> |
| 57 | + </ol> |
| 58 | +</details> |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +<!-- ABOUT THE PROJECT --> |
| 63 | +## About The Project |
| 64 | + |
| 65 | +**scratchcpp-gui** is a library which provides a set of Qt Quick components that can be used to run Scratch projects. |
| 66 | + |
| 67 | +It uses **QNanoPainter** on top of Qt for hardware accelerated rendering |
| 68 | +and **libscratchcpp** to read, run and maintain the state of Scratch projects. |
| 69 | + |
| 70 | +## NOTE |
| 71 | +This library is still in development and it shouldn't be used in production yet. |
| 72 | + |
| 73 | +**There might be incompatible API changes anytime before version 1.0.0 releases!** |
| 74 | + |
| 75 | +<p align="right">(<a href="#readme-top">back to top</a>)</p> |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | +<!-- GETTING STARTED --> |
| 80 | +## Getting Started |
| 81 | + |
| 82 | +We're working on the documentation, it'll be available soon. |
| 83 | +<!-- TODO: Add link to documentation --> |
| 84 | + |
| 85 | +<p align="right">(<a href="#readme-top">back to top</a>)</p> |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | +<!-- USAGE EXAMPLES --> |
| 90 | +## Usage |
| 91 | +The most common way to get started is to use the `ProjectPlayer` component. |
| 92 | +```qml |
| 93 | +import QtQuick |
| 94 | +import ScratchCPPGui |
| 95 | +
|
| 96 | +Window { |
| 97 | + width: 480 |
| 98 | + height: 360 |
| 99 | + visible: true |
| 100 | + title: qsTr("Hello World") |
| 101 | +
|
| 102 | + ProjectPlayer { |
| 103 | + id: player |
| 104 | + fileName: "/path/to/project.sb3" |
| 105 | + Component.onCompleted: start() |
| 106 | + } |
| 107 | +} |
| 108 | +``` |
| 109 | +The project will start when the window opens. |
| 110 | +If you would like to have a "green flag" button instead, call `player.start()` from the button: |
| 111 | +```qml |
| 112 | +Button { |
| 113 | + onClicked: player.start() |
| 114 | +} |
| 115 | +``` |
| 116 | + |
| 117 | +<p align="right">(<a href="#readme-top">back to top</a>)</p> |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | +<!-- ROADMAP --> |
| 122 | +## Roadmap |
| 123 | + |
| 124 | +- [x] JPEG and PNG rendering |
| 125 | +- [ ] Everything related to displaying sprites (position, rotation, size, etc.) |
| 126 | +- [ ] Loading projects in another thread |
| 127 | +- [ ] API for engine properties (FPS, turbo mode, etc.) |
| 128 | +- [ ] Loading projects from URL |
| 129 | +- [ ] SVG rendering |
| 130 | +- [ ] Mouse position |
| 131 | +- [ ] Key press events |
| 132 | +- [ ] Mouse press events |
| 133 | +- [ ] Sprite click events |
| 134 | +- [ ] Clones |
| 135 | +- [ ] Sprite dragging |
| 136 | +- [ ] Touching color blocks |
| 137 | +- [ ] Pen blocks |
| 138 | +- [ ] Monitors |
| 139 | +- [ ] Graphics effects (maybe using shaders) |
| 140 | +- [ ] Speech and thought bubbles |
| 141 | +- [ ] Question text box ("ask and wait" block) |
| 142 | + |
| 143 | +See the [open issues](https://github.com/scratchcpp/scratchcpp-gui/issues) for a full list of proposed features (and known issues). |
| 144 | + |
| 145 | +<p align="right">(<a href="#readme-top">back to top</a>)</p> |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | +<!-- CONTRIBUTING --> |
| 150 | +## Contributing |
| 151 | + |
| 152 | +Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. |
| 153 | + |
| 154 | +If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". |
| 155 | +Don't forget to give the project a star! Thanks again! |
| 156 | + |
| 157 | +1. Fork the Project |
| 158 | +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) |
| 159 | +3. Format changed source files (`clang-format src/some_file.cpp`) |
| 160 | +4. Commit your Changes (`git add -A && git commit -m 'Add some AmazingFeature'`) |
| 161 | +5. Push to the Branch (`git push origin feature/AmazingFeature`) |
| 162 | +6. Open a Pull Request |
| 163 | + |
| 164 | +<p align="right">(<a href="#readme-top">back to top</a>)</p> |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | +<!-- LICENSE --> |
| 169 | +## License |
| 170 | + |
| 171 | +Distributed under the GNU Lesser General Public License. See [LICENSE](LICENSE) for more information. |
| 172 | + |
| 173 | +<p align="right">(<a href="#readme-top">back to top</a>)</p> |
| 174 | + |
| 175 | + |
| 176 | + |
| 177 | +<!-- MARKDOWN LINKS & IMAGES --> |
| 178 | +<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --> |
| 179 | +[contributors-shield]: https://img.shields.io/github/contributors/scratchcpp/scratchcpp-gui.svg?style=for-the-badge |
| 180 | +[contributors-url]: https://github.com/scratchcpp/scratchcpp-gui/graphs/contributors |
| 181 | +[forks-shield]: https://img.shields.io/github/forks/scratchcpp/scratchcpp-gui.svg?style=for-the-badge |
| 182 | +[forks-url]: https://github.com/scratchcpp/scratchcpp-gui/network/members |
| 183 | +[stars-shield]: https://img.shields.io/github/stars/scratchcpp/scratchcpp-gui.svg?style=for-the-badge |
| 184 | +[stars-url]: https://github.com/scratchcpp/scratchcpp-gui/stargazers |
| 185 | +[issues-shield]: https://img.shields.io/github/issues/scratchcpp/scratchcpp-gui.svg?style=for-the-badge |
| 186 | +[issues-url]: https://github.com/scratchcpp/scratchcpp-gui/issues |
| 187 | +[license-shield]: https://img.shields.io/github/license/scratchcpp/scratchcpp-gui.svg?style=for-the-badge |
| 188 | +[license-url]: https://github.com/scratchcpp/scratchcpp-gui/blob/master/LICENSE |
0 commit comments