Compare commits

...

454 Commits

Author SHA1 Message Date
Florian Rival
07f26027f6 Bump newIDE version 2018-02-15 22:56:13 +01:00
Florian Rival
09cf13d6e2 Add confirm before close dialog to newIDE 2018-02-15 22:50:08 +01:00
Florian Rival
42f91565fa Merge pull request #443 from 4ian/feature/cordova-icons
Add support for icons when exporting to Android/iOS
2018-02-13 19:51:04 +01:00
Florian Rival
ac6c146808 Fix ImageThumbnail error when onContextMenu is not specified 2018-02-13 19:50:21 +01:00
Florian Rival
59ad23f8ac Allow to customize game orientation (for when exported with Cordova) 2018-02-11 23:44:00 +01:00
Florian Rival
769c6fe3d5 Move ResourcesLoader in its own folder + refactor methods 2018-02-11 23:17:44 +01:00
Florian Rival
07b92911ab Add message on web-app about non support of automatic icons creation 2018-02-11 22:03:30 +01:00
Florian Rival
eb57bcfc87 Add iOS icons support for Cordova + fix image caching 2018-02-11 21:52:40 +01:00
Florian Rival
7addeba73a Add support for Android icons in Cordova export 2018-02-11 21:14:18 +01:00
Florian Rival
263902b45a Avoid caching in ImagePreview and ImageThumbnail 2018-02-11 18:14:47 +01:00
Florian Rival
d283f759fe Add PlatformSpecificAssets to Project 2018-02-10 18:36:02 +01:00
Florian Rival
fabd028a63 Update VSCode C++ properties for Intellisense 2018-02-10 18:35:05 +01:00
Florian Rival
2b18272c41 Merge branch 'master' of github.com:4ian/GD 2018-02-07 00:02:25 +01:00
Florian Rival
a1fb39da3d Fix scene unloading re-creating a RuntimeSceneRenderer leading to issues with Cocos2d-JS renderer 2018-02-05 23:12:51 +01:00
Florian Rival
09602fdf9e Merge pull request #441 from ronnystandtke/patch-1
Update gdevelop.desktop
2018-02-04 17:03:22 +01:00
ronnystandtke
d574ef17ba Update gdevelop.desktop
added German L10n
2018-02-04 17:00:34 +01:00
Florian Rival
0e3f70627b Bump newIDE version 2018-02-03 19:32:52 +01:00
Florian Rival
a814a07105 Fix ResourcesEditor selection 2018-02-03 19:24:47 +01:00
Florian Rival
c49af90a9c Add program opening count to Keen.io analytics 2018-02-03 19:09:33 +01:00
Florian Rival
24afa155c8 Improve Keen.io analytics events by adding user profile information 2018-02-03 18:30:09 +01:00
Florian Rival
9e5a431516 Only run Fullstory on newIDE web-app 2018-02-03 17:53:57 +01:00
Florian Rival
182a94285c Unregister service worker (it is not ready yet) 2018-02-03 13:05:22 +01:00
Florian Rival
442c2c8dd9 Merge pull request #439 from 4ian/feature/resources-editor
Resources editor for newIDE
2018-02-03 12:57:22 +01:00
Florian Rival
f8fd0dd353 Add a preview in ResourcesEditor 2018-02-03 12:55:30 +01:00
Florian Rival
faad9e23ac Add ResourcesEditor with ResourcePropertiesEditor and Toolbar 2018-01-30 23:12:31 +01:00
Florian Rival
d2af0da1b1 Added tools method to ResourcesManager and finish working version of ResourcesList 2018-01-30 21:56:40 +01:00
Florian Rival
c65e5c3e49 [WIP] Add ResourcesEditor based on a generic SortableVirtualizedItemList
TODO:
* Use SortableVirtualizedItemList for ObjectsList and ObjectsGroupsList
* Add missing features (sorting, delete, thumbnail for images, properties edition) to ResourcesEditor
2018-01-30 00:58:21 +01:00
Florian Rival
24a8dfc5f0 Add SemiControlledTextField to be able to type freely in PropertiesEditor 2018-01-28 18:45:44 +01:00
Florian Rival
9c6790ac37 Update default gravity in PhysicsBehavior 2018-01-27 23:50:49 +01:00
Florian Rival
18ef7460ba Bump newIDE version 2018-01-27 19:34:36 +01:00
Florian Rival
63cd0e76c3 Fix warning 2018-01-27 19:34:27 +01:00
Florian Rival
bdbf7fd9fc Add support for editing BehaviorSharedData in newIDE
TODO:
* Support for cancelling modifications made on it in ScenePropertiesDialog
2018-01-27 19:13:27 +01:00
Florian Rival
6bbedbd8f9 Fix BehaviorSharedData not created by newIDE + fix warnings 2018-01-27 17:00:44 +01:00
Florian Rival
648bd1ff2e Show warning if game name or package name is empty when exporting in newIDE 2018-01-24 23:31:02 +01:00
Florian Rival
d4288caedb Fix .env file loading with electron-app and bump newIDE version 2018-01-23 00:15:13 +01:00
Florian Rival
0a35bc3272 Bump newIDE version 2018-01-22 23:35:55 +01:00
Florian Rival
d8b737a31f Fix LocalS3Export always reusing the same folder leading to useless files in exported game 2018-01-22 23:35:32 +01:00
Florian Rival
cfd2655f6c Bump newIDE version 2018-01-22 23:29:21 +01:00
Florian Rival
1896241b9d Move AWS S3 credentials to an .env file for games deployment on GDevelop hosting 2018-01-22 23:25:42 +01:00
Florian Rival
0ed22a6ee1 Fix upload to GDevelop hosting of exported games with large files 2018-01-22 22:52:44 +01:00
Florian Rival
2bfcb99c3e Add analytics when a signup is done 2018-01-22 00:20:32 +01:00
Florian Rival
815f8a520a Bump newIDE version 2018-01-21 22:11:59 +01:00
Florian Rival
f115b6607f Add PhysicsBehavior support to newIDE, with an example 2018-01-21 22:11:24 +01:00
Florian Rival
c876f67502 Add pathfinding example to newIDE web-app 2018-01-20 21:25:25 +01:00
Florian Rival
27674f272c Bump newIDE version 2018-01-20 19:21:13 +01:00
Florian Rival
02879507e3 Fix tests (outdated snapshots after adding Pathfinding to newIDE) 2018-01-20 19:19:38 +01:00
Florian Rival
0a7629878f Fix Sepia layer effect (broken since Pixi v4 update) 2018-01-20 19:00:22 +01:00
Florian Rival
b0368232d0 Add Parallax example to newIDE 2018-01-20 17:19:45 +01:00
Florian Rival
a32bf3db98 Add Pathfinding and Zombie Laser examples to newIDE 2018-01-20 17:02:47 +01:00
Florian Rival
64cbbb20d3 Expose PathfindingBehavior when building with Emscripten 2018-01-20 16:53:12 +01:00
Florian Rival
dd4fbecc98 Update some GDevelop services API to use api.gdevelop-app.com 2018-01-20 16:28:27 +01:00
Florian Rival
807a75a265 Update productName for newIDE 2018-01-19 00:24:07 +01:00
Florian Rival
6e1b44ea56 Bump newIDE version 2018-01-18 23:31:41 +01:00
Florian Rival
d870a54f58 Fix error when handling download-progress of an update 2018-01-18 23:31:00 +01:00
Florian Rival
9f464a3f23 Bump newIDE version 2018-01-18 23:12:37 +01:00
Florian Rival
ed4e84d665 Add Export icon in newIDE main toolbar & fix profile refreshing after getting a new subscription 2018-01-18 23:12:08 +01:00
Florian Rival
1e4ab96233 Bump newIDE version 2018-01-18 00:04:27 +01:00
Florian Rival
380c034ff5 Merge pull request #433 from 4ian/feature/online-cordova-export
Packaging for Android with GDevelop online build service + various improvements
2018-01-18 00:02:51 +01:00
Florian Rival
7c9abe432d Fix AboutDialog story in storybook and use retro default avatars 2018-01-18 00:02:05 +01:00
Florian Rival
2ca853c22c Add HelpButton in ProfileDialog and disabled icon field in ProjectPropertiesDialog 2018-01-17 23:55:40 +01:00
Florian Rival
b23d55612a Add display of user Gravatar in ProfileDetails 2018-01-17 22:36:51 +01:00
Florian Rival
b261faacfc Freeze GDCore/libGD.js and newIDE version to 4.0.96 (don't read it from Git tags) 2018-01-17 00:21:07 +01:00
Florian Rival
9984b32876 Add link to help page specific to each exporters 2018-01-16 23:42:46 +01:00
Florian Rival
d63ba75430 Change wording in CreateProfile 2018-01-16 23:33:44 +01:00
Florian Rival
2db903ed94 Fix profile refreshing after login/account creation 2018-01-16 22:00:45 +01:00
Florian Rival
3f9bc4d335 Fix upload and Android export for large files 2018-01-16 21:25:36 +01:00
Florian Rival
3df95d0e21 Switch authentification to use Firebase 2018-01-14 17:59:09 +01:00
Florian Rival
f445695f6a Add auto-update support to GDevelop 5 2018-01-13 17:17:48 +01:00
Florian Rival
6f3163d7bd Rework ExportDialog to have a list of exporters to choose from 2018-01-13 14:54:10 +01:00
Florian Rival
5421eae23d Add buttons to switch between exporters of the same kind 2018-01-11 00:04:31 +01:00
Florian Rival
a0e82ee22f Add button to download logs in LocalOnlineCordovaExport 2018-01-10 23:25:18 +01:00
Florian Rival
1fbf822769 Move GDevelop hosting API configuration to GDevelopServices/ApiConfigs.js 2018-01-09 23:52:44 +01:00
Florian Rival
6b0f037722 Add a comment about working with Auth0 during development 2018-01-09 23:52:44 +01:00
Florian Rival
ae231d2fe6 Update packageName of fixtures/example games 2018-01-09 23:52:44 +01:00
Florian Rival
2e95899da7 Ensure user is asked for authenticating again if needed 2018-01-09 23:52:44 +01:00
Florian Rival
3f45b38dfc [WIP] Make SubscriptionDialog working with GDevelop Services and Stripe
TODO: Properly handle the refresh of ProfileDialog
2018-01-09 23:52:44 +01:00
Florian Rival
daf4d36348 [WIP] Add SubscriptionDialog 2018-01-09 23:52:44 +01:00
Florian Rival
477cd16f23 Add storybook stories for Profile components 2018-01-09 23:52:44 +01:00
Florian Rival
83eded0056 [WIP] Improve LocalOnlineCordovaExport progress handling 2018-01-09 23:52:44 +01:00
Florian Rival
338de9c149 [WIP] Add LimitDisplayer and display subscriptions limits in LocalOnlineCordovaExport 2018-01-09 23:52:44 +01:00
Florian Rival
6d99d4e661 [WIP] Add happy path for LocalOnlineCordovaExport 2018-01-09 23:52:44 +01:00
Florian Rival
4e5a8060c8 [WIP] Add Archiver to create zip files for LocalOnlineCordovaExport 2018-01-09 23:52:44 +01:00
Florian Rival
eb938e39ff [WIP] Add LocalOnlineCordovaExport (with no real calls to the build service for now) 2018-01-09 23:52:44 +01:00
Florian Rival
cff8604a5f Fix flow error/incompatibility in auth0-lock's node_modules 2018-01-09 23:52:44 +01:00
Florian Rival
2afa54bcd2 [WIP] Add SubscriptionDetails, ProfileDetails and UsagesDetails in ProfileDialog 2018-01-09 23:52:44 +01:00
Florian Rival
4da6025b6f Move configuration of BrowserS3PreviewLauncher in ApiConfigs 2018-01-09 23:52:44 +01:00
Florian Rival
c4f64444e7 [WIP] Add a Profile in newIDE with login/logout based on Auth0 2018-01-09 23:52:44 +01:00
Florian Rival
b0205b296f Merge pull request #432 from 4ian/fix/various
Various improvements for GDJS (memory + libs update)
2018-01-09 23:48:15 +01:00
Florian Rival
e0c8b3cc81 Add comment about RuntimScene.unloadScene and memory management 2018-01-09 23:47:47 +01:00
Florian Rival
80ca92336e Fix filters and refactor Text style update for Pixi v4 2018-01-09 23:03:26 +01:00
Florian Rival
6c0681e4ca Merge branch 'mem' of https://github.com/dos1/GD into dos1-mem 2018-01-07 20:06:18 +01:00
Sebastian Krzyszkowiak
26e8503dc8 GDJS: HowlerSoundManager: use XMLHttpRequest to preload
Howler decodes the whole file, which causes massive memory spike
on load when the project contains lots of longer music files.
We could use HTML5 audio to avoid decoding, but then the load event
actually means "preloaded enough to start playing without buffering".

We don't need to decode here, putting the file into browser cache
should be enough, so let's just download the file with XHR.
2018-01-06 02:09:01 +01:00
Sebastian Krzyszkowiak
c1ce78efde GDJS: howler-sound-manager: use .unload() method when destroying to free the resources used by sounds 2018-01-06 02:08:54 +01:00
Sebastian Krzyszkowiak
2f52c2f062 GDJS: store global volume value in HowlerSoundManager to avoid rounding errors (#430) 2018-01-05 16:59:16 +01:00
Sebastian Krzyszkowiak
24d11a2446 GDJS: update howler.js to 2.0.7 2018-01-04 23:44:57 +01:00
Sebastian Krzyszkowiak
e1d4ae5bbd GDJS: update Pixi to 4.6.2 2018-01-04 23:44:32 +01:00
Sebastian Krzyszkowiak
dcfe346f54 GDJS: RuntimeScene: clean up more variables on unload, so they can be garbage collected 2018-01-04 23:44:13 +01:00
Florian Rival
3906db9efe Make UserUUID generation security/exception errors-proof 2017-12-26 16:47:00 +01:00
Florian Rival
ba5244d95d Bump newIDE version 2017-12-26 16:46:32 +01:00
Florian Rival
52db730870 Add ErrorBounday for handling editor crash and EmptyEventsPlaceholder for empty events sheets 2017-12-26 14:47:46 +01:00
Florian Rival
82d2278ebd Bump newIDE version 2017-12-25 23:55:48 +01:00
Florian Rival
30d08ac72d Add button linking to help about creating new themes in newIDE 2017-12-25 17:48:38 +01:00
Florian Rival
6f1e71c8e5 Update README about creating themes for newIDE 2017-12-25 17:41:00 +01:00
Florian Rival
385be9b5f5 Make EventsSheet color scheme customizable and add Monokai inspired dark color scheme 2017-12-25 17:33:25 +01:00
Florian Rival
25cb041d78 Improve DarkTheme to fix Raised buttons readability 2017-12-25 14:58:36 +01:00
Florian Rival
18fa9cd659 Merge pull request #429 from 4ian/feature/upgrade-mui-react
Upgrade to React 16 and Material-UI 0.20
2017-12-24 17:33:58 +01:00
Florian Rival
ce760541c5 Upgrade to React 16.2 2017-12-24 16:51:04 +01:00
Florian Rival
db51b652f0 Remove useless refs created warnings with React 16 2017-12-24 15:05:46 +01:00
Florian Rival
4222d98aa9 Update instructions parameters color scheme 2017-12-24 15:05:20 +01:00
Florian Rival
484f1e5dcb Fix typing 2017-12-24 14:30:43 +01:00
Florian Rival
7304b94a77 Fix warnings/React issues with refs in EventsSheet 2017-12-24 14:07:20 +01:00
Florian Rival
ee5ec7df72 Fix InstancePropertiesEditor not refreshed when an instance is deleted/moved 2017-12-24 12:49:20 +01:00
Florian Rival
9a1e4bdf7c Update react-i18next dependency of newIDE 2017-12-24 12:40:26 +01:00
Florian Rival
a43cca7629 Update react-dnd dependency of newIDE 2017-12-24 12:31:08 +01:00
Florian Rival
0cdabab2ec Update react-color dependency of newIDE 2017-12-24 12:24:49 +01:00
Florian Rival
28b968ea99 Update newIDE to React 15.6.2 2017-12-24 12:21:32 +01:00
Florian Rival
5160033092 Upgrade storybook and remove useless newIDE dependencies 2017-12-24 12:00:41 +01:00
Florian Rival
ce086c07b9 Upgrade material-ui to v0.20 and upgrade other dependencies 2017-12-24 11:49:40 +01:00
Florian Rival
bf9348488d Merge pull request #428 from 4ian/feature/themable-newIDE
Add a Dark theme to newIDE
2017-12-23 23:18:38 +01:00
Florian Rival
70b3e0701b Fix StartPage tests 2017-12-23 23:14:44 +01:00
Florian Rival
dc3d890937 Add comment explaining how to create a new theme 2017-12-23 23:14:02 +01:00
Florian Rival
f68be32e2d Update logo in newIDE StartPage and tweak colors 2017-12-23 23:11:10 +01:00
Florian Rival
3758e7af03 Fix editors not opening in SceneEditor in newIDE 2017-12-23 22:40:50 +01:00
Florian Rival
5ab1858349 [WIP] Refactor EventsSheet to make it partially themable 2017-12-23 21:50:12 +01:00
Florian Rival
54353bcb24 [WIP] Add PreferencesDialog and make the whole newIDE interface themable 2017-12-23 21:06:55 +01:00
Florian Rival
de7640558d Fix Clock Skew related errors while uploading to S3 from certain computers 2017-12-23 13:52:33 +01:00
Florian Rival
2e17b16516 Make newIDE context menus dynamic (greyed-out items if not applicable, checkbox for grid) 2017-12-23 13:51:36 +01:00
Sebastian Krzyszkowiak
345f9f1786 Run CopyRuntimeToGD.sh with bash explicitly (#427)
The script contains bashisms which fail on systems where sh is
symlinked to dash instead of bash.
2017-12-22 11:12:02 +01:00
Florian Rival
8c9214ce5e Bump newIDE version 2017-12-20 22:44:49 +01:00
Florian Rival
fc9cc8046d Merge pull request #426 from 4ian/feature/newide-js-code-event
Add support for Javascript Code Event in newIDE
2017-12-20 22:33:12 +01:00
Florian Rival
e592bb855d Add support for objects parameter in JsCodeEvent in newIDE 2017-12-20 22:30:53 +01:00
Florian Rival
f8407264da Add basic support for JsCodeEvent in newIDE 2017-12-19 21:16:27 +01:00
Florian Rival
202fe2b69a Add FpsLimiter to limit framerate on InstancesEditor of newIDE, to avoid killing CPU/battery 2017-12-18 00:05:31 +01:00
Florian Rival
d14a93f9d0 Remove ok button in MainFrame Snackbar 2017-12-17 19:37:13 +01:00
Florian Rival
1d1ccdbf06 Fix unmounting and related focus issue of editors in newIDE 2017-12-17 16:16:29 +01:00
Florian Rival
92fd647316 Add button to open external events or layout events from a LinkEvent in newIDE 2017-12-16 18:09:30 +01:00
Florian Rival
d8ca506200 Add flow typing to MainFrame 2017-12-16 17:18:09 +01:00
Florian Rival
928d6eda98 Update VSCode settings 2017-12-16 16:53:53 +01:00
Florian Rival
d5e6755694 Move all providers from MainFrame to a dedicated component 2017-12-16 16:53:37 +01:00
Florian Rival
a1431126ec Merge pull request #424 from 4ian/feature/clipboard-project-manager
Clipboard support for ProjectManager in newIDE
2017-12-16 16:17:14 +01:00
Florian Rival
13c8caeb8c Increase flow coverage 2017-12-16 16:12:10 +01:00
Florian Rival
b2b5ee0e19 Add a TODO about style refactoring 2017-12-16 14:28:32 +01:00
Florian Rival
ff74ecd7c9 Run prettier on newIDE codebase 2017-12-16 14:26:05 +01:00
Florian Rival
0ac3e79156 Fix flow typing in newIDE and update flow to latest version 2017-12-16 14:24:25 +01:00
Florian Rival
3a69936e2e Add copy/cut/paste support for External Layouts and Events in newIDE 2017-12-16 14:02:40 +01:00
Florian Rival
e738d5dd5f Add copy/cut/paste support for Layout in newIDE 2017-12-16 00:14:18 +01:00
Florian Rival
ed8ee21c04 Reduce GroupEvent height 2017-12-15 23:22:47 +01:00
Florian Rival
87220a941a Bump newIDE version 2017-12-15 23:19:23 +01:00
Florian Rival
4425d13c7a Rename objectWithScope to objectWithContext 2017-12-13 00:19:31 +01:00
Florian Rival
b818e5f493 Add support for copy/cut/paste objects 2017-12-12 23:57:37 +01:00
Lizard-13
403563ba32 Support keyboard top row numbers in HTML5 games (#422) 2017-12-11 14:29:14 +01:00
Florian Rival
156ca68116 Make newIDE save project as formatted JSON 2017-12-10 23:03:16 +01:00
Florian Rival
de3677a6c3 Add AnimationPreview in SpriteEditor 2017-12-10 23:02:51 +01:00
Florian Rival
3b76dfe9f4 Fix LocalCordovaExport storybook and increase expression selector height 2017-12-09 20:08:23 +01:00
Florian Rival
6e38ee6d16 Move newIDE test files next to the test source files (no __tests__ folder) 2017-12-09 18:05:59 +01:00
Florian Rival
454657b00f Add link to Tank Shooter beginner tutorial in newIDE 2017-12-09 17:47:54 +01:00
Florian Rival
aad0c4e909 Fix newIDE yarn.lock 2017-12-09 17:27:53 +01:00
Florian Rival
d106ee9ac1 Merge pull request #421 from 4ian/feature/newide-expressions-autocomplete
Expression field with list of available functions for newIDE
2017-12-09 17:16:41 +01:00
Florian Rival
5b1e6e4381 Don't show ExpressionSelector when ExpressionField is displayed inline 2017-12-09 16:50:27 +01:00
Florian Rival
e1106c6145 Fix GenericExpressionField validation and functions button positioning 2017-12-07 00:33:42 +01:00
Florian Rival
0c5caf9986 Update StringField to use GenericExpressionField, with same features as ExpressionField 2017-12-07 00:22:59 +01:00
Florian Rival
2fdcd6c639 Fix formatting of expressions with code-only parameters 2017-12-07 00:04:56 +01:00
Florian Rival
8332adf07b [WIP] Fix Expression object/behavior functions formatting and BehaviorField 2017-12-06 23:43:20 +01:00
Florian Rival
fb40e908c0 [WIP] Add ExpressionParametersEditor to edit parameters of an expression to insert
TODO: Properly format objects and behaviors function calls.
2017-12-06 00:22:21 +01:00
Florian Rival
b6ef67568a [WIP] Add the function in the text field when an expression is chosen 2017-12-05 22:07:56 +01:00
Florian Rival
9c591ec3b1 [WIP] Add ExpressionSelector, refactor InstructionSelector and switched to lodash monolithic build 2017-12-04 21:49:31 +01:00
Lizard-13
495900c083 Add point inside object condition (#418)
* Add point inside object condition

* Update names and comments
2017-12-04 09:25:56 +01:00
Florian Rival
7874e2af27 [WIP] Add auto-completion to ExpressionField in newIDE 2017-12-04 00:03:46 +01:00
Florian Rival
19b37b7111 Update Electron latest stable version for newIDE 2017-12-03 22:53:01 +01:00
Florian Rival
8593249bc6 Add link to the Itch.io publishing help page 2017-12-03 12:28:11 +01:00
Florian Rival
6d483ec887 Update electron-builder and fix analytics send when exporting with Cordova in newIDE 2017-11-28 23:02:40 +01:00
Florian Rival
e1a28f0f90 Update newIDE readme 2017-11-28 00:43:22 +01:00
Florian Rival
c2ba76a821 Bump newIDE version 2017-11-28 00:40:40 +01:00
Florian Rival
c4f8134d89 Add Cordova and Cocos2d-JS exports in newIDE 2017-11-28 00:39:19 +01:00
Florian Rival
59416fd0cd Avoid clearing the output directory when exporting a HTML5 game 2017-11-27 23:58:15 +01:00
Florian Rival
ef7ed24114 Merge pull request #417 from 4ian/feature/open-scene-editor-on-open
Automatic opening of 1st scene in newIDE + Sprite frames selection/deletion
2017-11-27 22:12:16 +01:00
Florian Rival
07dd2bcb5c Add Checkbox to select sprites and context menu to delete selected sprites 2017-11-26 19:55:53 +01:00
Florian Rival
81dfeb3ab1 Open scene or project manager (according to layouts count) after project opening in newIDE 2017-11-24 20:08:38 +01:00
Florian Rival
09d558744f Refactor project opening in MainFrame and add test for StartPage 2017-11-24 19:54:09 +01:00
Florian Rival
abe7dd7ccd Adapt StartPage button when a project is opened 2017-11-24 08:39:06 +01:00
Florian Rival
0da624dc18 Fix variables with multiline values rendering in newIDE + add a storybook stories for this 2017-11-23 00:36:21 +01:00
Florian Rival
a082585b4e Don't make Game Settings initially opened in ProjectManager 2017-11-21 01:07:10 +01:00
Florian Rival
d1582723ba Fix hint text in ProjectPropertiesDialog 2017-11-21 01:06:07 +01:00
Florian Rival
829a88f290 Add ProjectPropertiesDialog, editor for global variables and minor fixes 2017-11-21 00:58:07 +01:00
Florian Rival
79f2e57fa9 Add ExternalEventsField, used to choose events to import in LinkEvent 2017-11-19 23:42:42 +01:00
Florian Rival
322787ba0e Merge pull request #416 from 4ian/feature/points-editor
Add Points editor
2017-11-19 20:53:27 +01:00
Florian Rival
7bd2dab47c Clean up PointsEditor and related 2017-11-19 20:38:59 +01:00
Florian Rival
dd1446cfb0 Add Toggles to have all animations/sprites sharing the same points in PointsEditor 2017-11-19 18:00:57 +01:00
Florian Rival
cf96db75ea Add HelpButton to ExportDialog 2017-11-19 15:47:08 +01:00
Florian Rival
da4f350cdb [WIP] Add points editor and hitboxes editor buttons in a SpriteEditor toolbar 2017-11-19 15:44:59 +01:00
Florian Rival
862c012bb6 [WIP] Ensure position of PointsEditor dialog remains centered after adding points 2017-11-19 15:26:18 +01:00
Florian Rival
72a65cb1d2 [WIP] Add default position handling for center point in PointsEditor 2017-11-19 02:30:25 +01:00
Florian Rival
22379ae31b [WIP] Add PointsPreview in PointsEditor
TODO: Properly handle automatic points
2017-11-19 01:39:18 +01:00
Florian Rival
73e0ba8264 Merge pull request #415 from Lizard-13/patch-1
Polygon fix
2017-11-18 16:20:15 +01:00
Lizard-13
2b0e28f456 Polygon fix
Just a little fix for an error it's throwing me (not sure how it doesn't fails for every convex polygon)  :)
2017-11-18 11:38:59 -03:00
Florian Rival
151a9b1a74 [WIP] Add ImageThumbnail in PointsEditor and a link to it in SpriteEditor 2017-11-17 00:29:55 +01:00
Florian Rival
172d7f049e [WIP] Improve PointsEditor 2017-11-16 00:14:49 +01:00
Florian Rival
5ef703eff4 [WIP] Add PointsEditor to edit the points of a Sprite in newIDE 2017-11-15 01:25:48 +01:00
Florian Rival
98d970de30 Add polyfill for self and patch XMLHttpRequest.send for Cocos2d-JS 3.15 and below 2017-11-14 23:32:49 +01:00
Florian Rival
8896fb280a Try to fix FontFace support in Edge/IE/Safari 2017-11-14 22:44:11 +01:00
Florian Rival
8df5ab9e62 Add a very basic Shopify extension (HTML5 only) to checkout products in a shop 2017-11-12 23:19:19 +01:00
Florian Rival
eb32d51999 Add Semaphore CI badge (quicker CI for newIDE and GDJS tests) 2017-11-12 19:34:57 +01:00
Florian Rival
8901809f88 Avoid potential issue with LayersList when project/layout props are changed 2017-11-12 18:16:37 +01:00
Florian Rival
1de22ef53b Ensure the proper tab is focused after opening, even when the tab is already opened 2017-11-12 01:48:47 +01:00
Florian Rival
d328ae0c7e Increase the width of the text field to set the font size in TextEditor 2017-11-12 01:32:20 +01:00
Florian Rival
dabb0f9dad Remove GDevApp link in README as it is replaced by newIDE 2017-11-12 01:24:10 +01:00
Florian Rival
5adcfc5bad Fix Flow error 2017-11-11 19:12:20 +01:00
Florian Rival
b03bf86a35 Add error messages when an expression is invalid in ExpressionField or StringField in newIDE 2017-11-11 18:33:49 +01:00
Florian Rival
db1b1eadf1 Refactor ExpressionParser and ParserCallbacks with getters for errors 2017-11-11 15:40:22 +01:00
Florian Rival
939266b18b Add more help buttons in newIDE and various minor fixes 2017-11-09 21:31:28 +01:00
Florian Rival
b68a9d8b47 Rename newIDE executable from GDevelop IDE to GDevelop 5 2017-11-09 20:51:05 +01:00
Florian Rival
af1a028203 Merge pull request #413 from 4ian/fix/react-mosaic-dragging
Fix dropping objects from ExternalEditor in newIDE due to react-mosaic blocking drop + help buttons and various small improvements
2017-11-09 00:14:38 +01:00
Florian Rival
c697d5fb99 Upgrade react-mosaic-component so that it does not conflict with HTML5/external drag'n'drop 2017-11-08 23:47:47 +01:00
Florian Rival
b5d2c6f4bc Add help for TextEntry and ShapePainter editors 2017-11-08 22:23:06 +01:00
Florian Rival
a42c488ac8 Add HelpButton that open wiki help page and add it in a few dialogs
Also add react-test-renderer for snapshot testing
2017-11-08 01:13:00 +01:00
Florian Rival
1ccc58c015 Change background color of ProjectStructureItem in ProjectManager 2017-11-07 23:54:19 +01:00
Florian Rival
68a736ea13 Remove Resources from newIDE ProjectManager as it's not implemented for now 2017-11-07 23:36:37 +01:00
Florian Rival
a9980f8e89 [WIP] Fix dropping objects from ExternalEditor in newIDE due to react-mosaic blocking drop 2017-11-07 23:33:11 +01:00
Florian Rival
7156950cb8 Fix InstancesList/LayersList not properly re-rendering due to bad rendering optimization 2017-11-07 00:02:42 +01:00
Florian Rival
833cabfe3b Use ListIcon instead of material-ui Avatar for icons of resources library in newIDE 2017-11-06 01:18:57 +01:00
Florian Rival
ed23b760a9 Add a dialog to choose an image from available public resources in newIDE web-app 2017-11-06 00:32:44 +01:00
Florian Rival
98580efafa Disable close button on StartPage tab in newIDE 2017-11-05 20:46:08 +01:00
Florian Rival
8794861a11 Fix properties panel not updated when selecting an instance 2017-11-05 20:33:49 +01:00
Florian Rival
8fccc7bda4 Add Fullstory for users behavior analytics 2017-11-05 20:11:49 +01:00
Florian Rival
a09ea0ea13 Enable user to scroll with mouse and space key pressed in SceneEditor in newIDE 2017-11-05 19:52:24 +01:00
Florian Rival
74c6ca50cb Merge pull request #412 from Nnarol/feature/scene_editor_undo_redo_keyboard_shortcuts
Bind Ctrl+Z/Ctrl+Y to undo/redo actions in scene editor
2017-11-03 13:43:16 +01:00
Florian Rival
67249c1029 Update flow for newIDE and add it to the CI 2017-11-03 00:16:53 +01:00
Florian Rival
dba79bcca1 Merge pull request #411 from 4ian/feature/scrollbars
Add scrollbars in newIDE scene editor
2017-11-03 00:14:02 +01:00
name
006f93dccf Bind Ctrl+Z/Ctrl+Y to undo/redo actions in scene editor 2017-11-02 23:42:14 +01:00
Florian Rival
94335b9ee2 Update react-mosaic-component for better perf. and avoid drop-target area that can't be clicked
This enables the horizontal scrollbar to be used
Also improves performance by avoiding rerendering of editors after a drag'n'drop
2017-11-02 23:31:44 +01:00
Florian Rival
187e27f232 Fix typo 2017-11-02 22:39:52 +01:00
Florian Rival
f7631bd8a5 [WIP] Add scrollbars to scene editor of newIDE 2017-11-02 22:29:44 +01:00
Florian Rival
ad154c34e7 Refactor full size editors handling in FullSizeMeasurer in newIDE 2017-11-01 23:36:55 +01:00
Florian Rival
357ecaca1e Merge pull request #410 from 4ian/feature/cancel-dialogs
"Cancel" button in more newIDE dialogs + newIDE unit tests
2017-11-01 23:24:22 +01:00
Florian Rival
e67e8d2264 Update libGD.js version used by newIDE 2017-11-01 23:23:47 +01:00
Florian Rival
c39fc5f478 Add more tasks to be done on newIDE 2017-11-01 00:35:31 +01:00
Florian Rival
b4c84d2058 Add explanation on how to contribute to newIDE 2017-11-01 00:30:08 +01:00
Florian Rival
b7cca91e54 Fix a button styling 2017-10-28 17:25:04 +02:00
Florian Rival
86118abfb3 Add Cancel button in ObjectEditorDialog 2017-10-28 17:14:10 +02:00
Florian Rival
119d588619 Fix Object behaviors and SpriteObject animations not properly unserialized with an exisiting object 2017-10-28 17:13:39 +02:00
Florian Rival
8c1028a28b Improve newIDE tests 2017-10-26 23:49:29 +02:00
Florian Rival
65e47a11ec Add unit tests support with Jest for newIDE 2017-10-26 23:23:39 +02:00
Florian Rival
c20a705773 Add SerializableObjectEditorContainer and use it to add cancel/apply buttons to ObjectsGroupEditorDialog 2017-10-25 01:05:30 +02:00
Florian Rival
bea778cb06 Remove warning in ObjectSelector and add stories to test it 2017-10-25 00:07:25 +02:00
Florian Rival
7315fe2403 Add undo/redo in context menus in EventsSheet 2017-10-24 23:55:36 +02:00
Florian Rival
ef4e0aba6b Implement History of undo/redo for EventsSheet 2017-10-24 23:11:01 +02:00
Florian Rival
7d84dda389 Bump newIDE version 2017-10-22 23:02:21 +02:00
Florian Rival
de1dab64fd Remove groups in the list of the ObjectSelector in ObjectsGroupEditor 2017-10-22 23:01:48 +02:00
Florian Rival
4333d8a3ba Change EventsSheet background color 2017-10-22 22:46:49 +02:00
Florian Rival
4579e619a3 Add search in newIDE ProjectManager 2017-10-22 22:43:12 +02:00
Florian Rival
7bcee7e400 Fix searching in groups in newIDE 2017-10-22 22:00:24 +02:00
Florian Rival
bf6ed92b1f Add search bar in ObjectsList and ObjectsGroupsList in newIDE 2017-10-22 21:39:55 +02:00
Florian Rival
87bffb4361 Add shortcuts and menu items to zoom in/out in newIDE scene editor 2017-10-22 18:34:47 +02:00
Florian Rival
151182c5aa Fix text fields losing focus when renaming in newIDE project manager/objects list 2017-10-22 18:09:52 +02:00
Florian Rival
faa678e4f7 Add menu item to create a new object in object context menu in newIDE 2017-10-22 17:50:58 +02:00
Florian Rival
6113505367 Add support for undo/redo shortcut in scene editor and ESC to close dialogs 2017-10-22 17:34:02 +02:00
Florian Rival
8eb124c685 Add tooltips in newIDE Toolbars and add react-i18n (unused for now) 2017-10-22 16:51:14 +02:00
Florian Rival
4fb2028801 Add tooltip support for ToolbarIcon in newIDE 2017-10-22 16:00:00 +02:00
Florian Rival
a5cc7de08f Fix potential errors in newIDE 2017-10-22 14:55:31 +02:00
Alexander Lebedev
8b0845fe9f Fix SoundObject conditions/actions strings (#408) 2017-10-22 12:44:42 +02:00
Florian Rival
e127d1bb7b Add .map file as part of the deployed newIDE web-app 2017-10-21 19:40:46 +02:00
Florian Rival
75ff956418 Add Raven (Sentry) for error tracking in newIDE 2017-10-21 17:21:20 +02:00
Florian Rival
90236f9c43 Add (common) KeyboardShortcuts for SceneEditor and EventsSheet in newIDE 2017-10-21 16:48:40 +02:00
Alexander Lebedev
c480ac2d8e Fix TopDownMovement behavior strings 2017-10-18 16:48:58 +02:00
Alexander Lebedev
793a242e00 Delete double spaces in some strings (#406) 2017-10-18 00:30:33 +02:00
ale26reg
16713e4668 Add volume and loop parameters in Play sound/music action strings (#399) 2017-10-15 23:51:22 +02:00
Florian Rival
33d731e958 Merge pull request #405 from 4ian/style/apply-prettier
Update prettier and apply it on the whole newIDE codebase
2017-10-15 17:51:52 +02:00
Florian Rival
4095b4b65b Update prettier and apply it on the whole newIDE codebase 2017-10-15 17:49:40 +02:00
Florian Rival
0a7778f951 Merge pull request #404 from 4ian/feature/contextmenu-instructions-list
Context menu for add condition/action buttons + keyboard shortcuts
2017-10-15 17:34:48 +02:00
Florian Rival
7c8c3e8a6a Display keyboard shortcuts in newIDE web-app, according to the platform 2017-10-15 17:31:44 +02:00
Florian Rival
26792429f7 Add keyboard shortcuts for Clipboard in EventsSheet 2017-10-15 16:42:26 +02:00
Florian Rival
50810aab1d Add support for pasting instructions in context menu of an instructions list 2017-10-15 16:31:11 +02:00
Florian Rival
8eeb137764 Add context menu for add condition/action buttons in EventsSheet 2017-10-15 15:49:34 +02:00
Todor Imreorov
ff2db6356e Fix newIDE Storybook (#403) 2017-10-14 18:44:20 +02:00
Todor Imreorov
c2eba4a0b0 Focus search box when opening InstructionTypeSelector (#396) 2017-10-12 23:34:19 +02:00
ale26reg
a289c0a521 Distinguish pitch angle from sound pitch II (#397)
Distinguish pitch angle from the sound tone in the strings of actions and conditions, including the names of actions and conditions in the event tree. Required for correct translation into other languages. All strings are reduced to a single style of writing.
2017-10-12 23:30:41 +02:00
ale26reg
2f5dd01878 Fix typo (#398) 2017-10-12 23:30:04 +02:00
Florian Rival
0a95120fbb Send analytics when a game is created in newIDE as a web-app 2017-10-09 23:41:46 +02:00
Florian Rival
60bf3115dd Add an anonymous UUID to users in analytics to help understanding user behaviors in newIDE 2017-10-09 23:32:21 +02:00
Lizard-13
d5f4a47eab Distinguish pitch angle from sound pitch condition strings (#394) 2017-10-08 19:21:08 +02:00
Florian Rival
e5bc6b3a13 Fix fonts in newIDE previews launched in browser 2017-10-08 19:20:15 +02:00
Florian Rival
4efe9e3d88 Update IDE translations 2017-10-08 17:37:19 +02:00
Florian Rival
869db14995 Update GD4 Inno Setup installation script 2017-10-08 17:17:25 +02:00
Florian Rival
9531d60479 Fix IDE crash on closing 2017-10-08 17:13:11 +02:00
Florian Rival
7d83fe8c07 Update IDE copyright date in status bar 2017-10-08 16:25:39 +02:00
Florian Rival
d285e24ff8 Add crossorigin attribute to img tags of objects thumbnails in newIDE to fix CORS issues 2017-10-08 12:16:04 +02:00
Florian Rival
09db74fc65 Add Space Shooter example in newIDE (both Electron and web-app) 2017-10-07 19:32:08 +02:00
Florian Rival
41be98b306 Add field to change text object font in newIDE 2017-10-07 19:31:29 +02:00
Florian Rival
46cb1318a5 Change insertion position of new events after the selection in newIDE 2017-10-07 17:09:01 +02:00
Florian Rival
1f98e4a268 Fix group renaming and made minor fixes in newIDE 2017-10-05 00:52:34 +02:00
Florian Rival
15f61e5867 Fix scene/external layout/events renaming 2017-10-04 22:02:53 +02:00
Florian Rival
698d3095ec Fix warning 2017-10-02 00:55:11 +02:00
Florian Rival
608ebcb0cf Add links to tutorial in newIDE CreateProjectDialog & fix minor UI glitches 2017-10-02 00:51:12 +02:00
Florian Rival
78c67a18e6 Add support for resources using URLs in newIDE running with Electron 2017-10-01 23:35:35 +02:00
Florian Rival
c12de11ce0 Ensure ObjectEditorDialog height is properly updated after a behavior is added/removed 2017-10-01 23:02:15 +02:00
Florian Rival
e15b442c1f Make newIDE's toolbar and StartPage scrollable 2017-10-01 22:40:52 +02:00
Florian Rival
f84cf59f9e Fix newIDE UI glitches 2017-10-01 22:08:52 +02:00
Florian Rival
b8aff5e77a Update newIDE PixiResourcesLoader to treat images as cross-origin 2017-10-01 20:47:51 +02:00
Florian Rival
9eb5951e66 Update URL of resources used by newIDE platformer fixture game 2017-10-01 19:03:48 +02:00
Florian Rival
cb92d56ff6 Fix ghost click with ListAddItem 2017-10-01 19:03:23 +02:00
Lizard-13
6223fbb792 Add JSON conversion for all variable types and clear structure action (#391) 2017-09-30 19:18:56 +02:00
Florian Rival
16bce2f765 Add OperatorField for newIDE, fix Text object rendering 2017-09-30 19:17:26 +02:00
Florian Rival
e2f5665700 Bump newIDE version 2017-09-27 22:21:31 +02:00
Florian Rival
c9b48ffafa Update LocalCreateDialog and fix extension filter when opening a project file 2017-09-26 23:01:40 +02:00
Florian Rival
a291d846d8 Enable flowtype annotation support for newIDE for VSCode 2017-09-26 22:57:13 +02:00
Florian Rival
0287d80cbf Merge pull request #390 from 4ian/feature/newIDE-groups-editor
Groups editor for newIDE
2017-09-24 16:22:52 +02:00
Florian Rival
97ea23066a Fix ObjectEditorDialog positioning when adding animations to Sprite objects 2017-09-24 16:12:32 +02:00
Florian Rival
e9b8b79d76 Refactor ObjectField to use ObjectSelector 2017-09-24 13:40:23 +02:00
Florian Rival
44133370bd Add ListAddItem to factor add rows in lists, add explanation in ObjectsGroupEditor 2017-09-24 13:27:30 +02:00
Florian Rival
e1e1fe27ae Update toolbar ObjectsGroupEditor icon and list borders 2017-09-24 03:00:02 +02:00
Florian Rival
b426212496 Add ObjectGroupsContainer in GDCore and improve groups edition in newIDE 2017-09-23 21:28:29 +02:00
Florian Rival
940721c676 [WIP] Add ObjectsGroupsList to newIDE 2017-09-23 15:42:31 +02:00
ale26reg
c3118e8da3 Update AudioExtension.cpp (#388)
Fixed misspelling at #366
2017-09-20 22:06:40 +02:00
ale26reg
a9e4d8a606 Update Extension.cpp (#389) 2017-09-20 17:18:35 +02:00
Florian Rival
e5e46d0a5a Add light grey border on bottom of most events in newIDE 2017-09-20 00:11:10 +02:00
Florian Rival
eed3c7ef36 Merge pull request #387 from 4ian/feature/newide-fold-events
Events folding and fixes for newIDE
2017-09-19 23:18:29 +02:00
Florian Rival
a6e0853cd6 Update Wiki link in new IDE 2017-09-19 23:17:47 +02:00
Florian Rival
1dff23f201 Fix GDJS export broken after output directory refactoring 2017-09-19 23:17:31 +02:00
Florian Rival
0586150eaf Add support for events folding in newIDE EventsSheet 2017-09-17 01:58:29 +02:00
Florian Rival
c43d6231d7 Add dialogs to edit scene, objects and global variables 2017-09-17 00:13:15 +02:00
Florian Rival
56230096b3 Update README with web-app deployment instructions 2017-09-16 18:11:50 +02:00
Florian Rival
29e707704e Reduce newIDE bundle size by switching from slug to slugs (no unicode file to be embedded) 2017-09-16 17:59:13 +02:00
Florian Rival
33b417ac94 Add .clang_complete file for Clang autocompletion 2017-09-16 17:21:13 +02:00
Florian Rival
0069627801 Add properties files for Visual Studio Code 2017-09-16 17:20:57 +02:00
Florian Rival
0d3c6ee590 Merge pull request #383 from 4ian/feature/browser-demo-merged-master
Browser support for newIDE
2017-09-12 23:59:12 +03:00
Florian Rival
7c2e3d43be Add KeyField 2017-09-12 22:49:54 +02:00
Florian Rival
3dcd6e2803 Add LayerField to EventsSheet 2017-09-11 17:44:15 +03:00
Florian Rival
689b2ba5c3 Add *VariableField for EventsSheet 2017-09-11 17:32:53 +03:00
Florian Rival
f67ba78843 Add BehaviorField for EventsSheet 2017-09-11 16:43:33 +03:00
Florian Rival
6aa515d085 Merge branch 'master' into feature/browser-demo-merged-master 2017-09-10 00:18:09 +03:00
Florian Rival
557aff7534 Switch to ChromeHeadless for running GDJS tests 2017-09-09 23:45:18 +03:00
Florian Rival
59e11d8597 Open context menu when right-clicking (or long touch) on objects/items in lists 2017-09-07 18:54:36 +02:00
Florian Rival
26de1ae213 Limit height of auto-complete menu when choosing an object 2017-09-07 18:16:59 +02:00
Florian Rival
dc32f948da Add thin borders to separate list items in newIDE 2017-09-07 18:02:45 +02:00
Florian Rival
50768df001 Add support for display comments custom color in newIDE 2017-09-07 17:24:57 +02:00
Florian Rival
4b375b01ac Remove S3 access keys from sources for newIDE in-browser preview 2017-09-05 21:05:30 +02:00
Florian Rival
c1b02677f3 Change newIDE Platformer builtin game first scene name to "Scene 1" 2017-08-30 00:58:31 +02:00
Florian Rival
eb8cf8028f Bump newIDE version 2017-08-30 00:36:47 +02:00
Florian Rival
b80f2b566d Add dialog shown if unable to open a preview popup in browser for newIDE 2017-08-30 00:36:11 +02:00
Florian Rival
748c798172 Add explanation about Export in newIDE for browsers 2017-08-29 23:51:43 +02:00
Florian Rival
83472388f4 Add BrowserSaveDialog enabling to download the game being edited in Browser 2017-08-29 23:42:19 +02:00
wild-master
34f1c5ae49 Add more improvements to the English translation. (#376) 2017-08-29 10:56:06 +02:00
Florian Rival
37732928cb Fix popup blocking when opening a preview on browser in newIDE 2017-08-28 23:14:19 +02:00
Florian Rival
2a6b7f194f Add Facebook/Twitter buttons on newIDE start page 2017-08-28 22:57:09 +02:00
wild-master
0f4d73fae3 English translation improvements (#375) 2017-08-28 22:04:16 +02:00
Florian Rival
906fceeb9a Add scripts to deploy newIDE as a web-app 2017-08-26 18:26:34 +02:00
Florian Rival
e616d668f3 Add BrowserIntroDialog 2017-08-26 17:32:53 +02:00
Florian Rival
05baedfd5d Add complete BehaviorsEditor to edit/add/remove object behaviors in newIDE 2017-08-26 17:32:53 +02:00
Florian Rival
5bf3c26b35 Avoid a crash when creating AdMobRuntimeObject or changing layer/z-order 2017-08-26 17:32:53 +02:00
Florian Rival
59d53c63b9 Update ExporterHelper::ExportIncludesAndLibs to be compatible minification and potential URL filenames 2017-08-26 17:32:53 +02:00
Florian Rival
e1a3409702 Add BrowserCreateDialog and BrowserProjectOpener to open builtin projects 2017-08-26 17:32:53 +02:00
Florian Rival
f320f34b19 Implement internal, in memory Clipboard for browsers 2017-08-26 17:32:02 +02:00
Florian Rival
f723182b80 Fix context menu closing and menu item size on browsers 2017-08-26 17:32:02 +02:00
Florian Rival
c0c71faac6 Fix extra / when exporting with BrowserS3PreviewLauncher 2017-08-26 17:32:02 +02:00
Florian Rival
5f73fa30fb Fix window contextmenu on browsers 2017-08-26 17:32:02 +02:00
Florian Rival
edbcb32bec [WIP] Fix Exporter and BrowserS3PreviewLauncher 2017-08-26 17:32:02 +02:00
Florian Rival
f57d3edf0f [WIP] Update GDJS Exporter to properly export files when having URL 2017-08-26 17:32:02 +02:00
Florian Rival
71ab16a76e [WIP] Add Extensions/ prefix to all includes files for JS extensions 2017-08-26 17:32:02 +02:00
Florian Rival
7b81ddd877 [WIP] Added AWS S3 calls to create file when launching a preview from newIDE in a browser 2017-08-26 17:32:02 +02:00
Florian Rival
de50a90235 [WIP] Started adding BrowserS3PreviewLauncher 2017-08-26 17:32:02 +02:00
Florian Rival
536b353a24 [WIP] Add SetCodeOutputDirectory to GDJS Exporter 2017-08-26 17:32:01 +02:00
Florian Rival
72740fb62c Fix potential crash happening when rendering after unmounting InstancesEditorContainer 2017-08-26 17:32:01 +02:00
Florian Rival
de3f485191 Fix buttons in StartPage not opening in a new tab/default browser 2017-08-26 17:31:28 +02:00
Vagner Araujo
68738d343c Add "GDevelop Forum" and "GDevelop Wiki" buttons (#372) 2017-08-25 00:41:24 +02:00
Florian Rival
c0529ff5ab Merge pull request #371 from dos1/howler-cordova
howler-sound-manager: pause/resume sounds when Cordova app is being paused/resumed
2017-08-20 23:39:48 +02:00
Sebastian Krzyszkowiak
4904627a6c howler-sound-manager: pause/resume sounds when Cordova app is being paused/resumed 2017-08-20 23:09:40 +02:00
Florian Rival
d00dae1d9e Add empty group tab in ObjectEditorDialog with placeholder message for now 2017-08-20 18:31:09 +02:00
Florian Rival
5270b2bd73 Add gd::InstructionsList::InsertInstructions and instructions copy/paste in newIDE 2017-08-20 18:00:57 +02:00
Florian Rival
916acf16f7 Fix serialization of layout when newIDE is integrated in IDE 2017-08-20 17:22:59 +02:00
Florian Rival
ceb8b4dde1 Merge serialization methods for instructions and add serialization methods to InstructionsList 2017-08-20 17:22:23 +02:00
Florian Rival
577fa8bdf7 Merge pull request #370 from 4ian/feature/new-ide-events-editor
Events editor for newIDE
2017-08-20 12:50:05 +02:00
Florian Rival
ff131165f4 Close editors after renaming a layout/external layout/events to avoid errors 2017-08-20 12:43:06 +02:00
Florian Rival
4b45b8d7e4 Fix sometime incorrect events height computation due to image loading in EventsTree 2017-08-19 14:40:37 +02:00
Florian Rival
8431b10a81 Fix bad font while dragging an item (animations etc) 2017-08-17 23:21:49 +02:00
Florian Rival
1b14519223 Implement renaming for scenes, external layouts and external events 2017-08-17 23:11:14 +02:00
Florian Rival
5b3526b7e8 Add help messages in ProjectManager and reduce row height in ObjectsList 2017-08-17 22:48:23 +02:00
Florian Rival
b59a2b656f Add buttons to choose the scene to associate with external layout/events 2017-08-17 00:34:20 +02:00
Florian Rival
70516b1d88 Fix getSerializedElements for newIDE's ExternalLayoutEditor and SceneEditor integrated in IDE 2017-08-16 23:56:05 +02:00
Florian Rival
d73ed4f6f9 Fix WhileEvent context menu, Link selectable zone and add buttons in ProjectManager 2017-08-15 19:58:33 +02:00
Florian Rival
d58190e5c5 Add LayoutChooseDialog and menu to delete scenes/external layouts/events 2017-08-15 19:39:45 +02:00
Florian Rival
1b996623f8 Fix snap to grid not properly computed with a grid offset in InstancesEditor 2017-08-15 17:44:51 +02:00
Florian Rival
09294dbc07 Add filtering in ObjectField, add ExpressionField and StringField (not autocompletion) 2017-08-15 00:54:54 +02:00
Florian Rival
1b27ca9647 Add invert condition toggle & ensure events editor is not opened when newIDE is integrated in IDE 2017-08-14 23:27:55 +02:00
Florian Rival
891a81f53e Increase sleeping time of thread communicating between IDE and newIDE 2017-08-14 23:27:14 +02:00
Florian Rival
ceb7d80ed3 Ensure EventsSheet is remounted if events have changed 2017-08-14 21:37:01 +02:00
Florian Rival
2591efee1c Merge branch 'feature/new-ide-culling' into feature/new-ide-events-editor 2017-08-10 14:17:12 +01:00
Florian Rival
adc473a6c3 [WIP] Add copy/cut/paste for events in EventsSheet 2017-08-08 16:29:21 +02:00
Florian Rival
8f6e587a0d Add LinkEvent support to newIDE 2017-08-04 01:23:36 +02:00
Florian Rival
597f1d0ebb Improve GroupEvent, CommentEvent rendering and inline edition 2017-08-04 00:59:57 +02:00
Florian Rival
c3746ab388 Add RepeatEvent, WhileEvent and support for sub instructions in newIDE EventsSheet 2017-08-03 20:56:30 +02:00
Florian Rival
7f5711cb62 [WIP] Add InlinePopover and popover to edit ForEachEvent in newIDE 2017-08-03 18:57:37 +02:00
Florian Rival
eb066b88e2 [WIP] Add ForEachEvent in newIDE (read-only for now) 2017-08-03 18:01:02 +02:00
Florian Rival
22fe36c8b5 [WIP] Move newIDE editors to a single folder, add preview button in EventsSheet 2017-08-03 17:52:05 +02:00
Florian Rival
cdf9652934 [WIP] Add search in InstructionEditor and fix instruction edition 2017-08-03 13:56:22 +02:00
Florian Rival
aa5408b1fb [WIP] Implement selection deletion and add subevents in EventsSheet 2017-08-02 23:16:15 +02:00
Florian Rival
facb08e502 [WIP] Add InlineParameterEditor to EventsSheet 2017-08-02 18:07:49 +02:00
Florian Rival
111dc42ec9 [WIP] Add multiselection and parameters highlight in EventsSheet, update events styling 2017-08-02 14:56:04 +02:00
Florian Rival
b08759bf57 [WIP] Add selection handling in EventsSheet 2017-08-02 01:57:40 +02:00
Florian Rival
a89b196a0c [WIP] Tweak events look 2017-08-02 00:52:44 +02:00
Florian Rival
1efa8674fc [WIP] Prevent drag'n'dropping events on events that can't have sub-events 2017-08-02 00:16:31 +02:00
Florian Rival
9ed2aa2a70 [WIP] Improve InstructionEditor 2017-08-02 00:06:15 +02:00
Florian Rival
26aa52157a [WIP] Add ParametersFields to newIDE InstructionEditor, enable to add/edit instructions 2017-08-01 21:05:53 +02:00
Florian Rival
825c3e0d26 [WIP] Add toolbar to EventsSheet 2017-08-01 16:34:09 +02:00
Florian Rival
1f2de9f156 [WIP] Refactor events in different files and enable Comment event editing 2017-08-01 13:51:52 +02:00
Florian Rival
bb52fab95a [WIP] Improve EventsTree, refactor events height caching 2017-08-01 13:15:10 +02:00
Florian Rival
e1c9db4955 [WIP] Add style of events 2017-08-01 01:42:52 +02:00
Florian Rival
cf9d9bdd5c [WIP] Apply codemod to convert calls to React.createElement into JSX elements 2017-08-01 01:42:52 +02:00
Florian Rival
41f6d8164c [WIP] Add EventsTree 2017-08-01 01:42:51 +02:00
Florian Rival
31c741b8c6 Bump newIDE version 2017-07-31 00:13:54 +02:00
Florian Rival
8619f18b93 Add basic culling for rendered instances in newIDE 2017-07-29 17:41:22 +02:00
Florian Rival
fd466d1f57 Fix wrong rendered position of panelspriteruntimeobject with Pixi renderering 2017-07-29 01:46:13 +02:00
Florian Rival
0c688e714a Fix DependenciesAnalyzer not properly exposed in GDCore.dll on Windows 2017-07-25 22:48:39 +02:00
Florian Rival
dd7a4429be Bump newIDE version 2017-07-23 18:27:05 +02:00
Florian Rival
8ed7e8251a Don't show menu in ProjectManager in newIDE when running with Electron 2017-07-23 16:59:34 +02:00
Florian Rival
6bcca6d024 Add main menu for newIDE 2017-07-23 16:49:07 +02:00
Florian Rival
3c6b100188 Enable context menu in text inputs in newIDE 2017-07-23 15:29:32 +02:00
Florian Rival
24cd4b52f6 Fix include case mismatch in AndroidExporter 2017-07-19 00:05:12 +02:00
Florian Rival
f63a8fc36e Refactor ProjectManager items to allow to make style changes between item and nested items 2017-07-18 23:02:27 +02:00
Florian Rival
70f6aab913 Add newIDE MessageBox to have better system integration and error analytics 2017-07-18 22:36:21 +02:00
Florian Rival
4c12ad5f1d Bump newIDE version 2017-07-18 22:10:06 +02:00
Florian Rival
6d5e4e388f Merge pull request #359 from 4ian/feature/new-ide-object-editors
Add object editors for newIDE, buttons to add, remove, name objects and objects list sorting
2017-07-18 21:58:09 +02:00
Florian Rival
415b05b1dc Add message when an animation is renamed with the same name as another 2017-07-18 21:50:07 +02:00
Florian Rival
78e2f8d705 Factor properties management in PropertiesMapToSchema and update TextEditor toolbar design 2017-07-18 21:34:27 +02:00
Ryan Jentzsch
7b0fb791cb Add instructions on running the newIDE as an Electron app from Linux. (#364) 2017-07-18 21:15:31 +02:00
Florian Rival
bd993b2c43 [WIP] Add AdMobEditor and factor properties edition in PropertiesEditor 2017-07-18 01:25:30 +02:00
Florian Rival
6a8e15a07f Add ShapePainterEditor and EmptyEditor in newIDE and rework Column margins 2017-07-18 00:30:38 +02:00
Florian Rival
fa6033250c [WIP] Add Behavior tab to newIDE ObjectEditorDialog 2017-07-16 23:59:22 +02:00
Florian Rival
b176699827 Implement drag'n'drop in newIDE ObjectsList to make objects sortable 2017-07-16 22:54:20 +02:00
Florian Rival
3bf0a14951 Avoid flickering while resizing InstancesEditorContainer in newIDE 2017-07-16 14:39:54 +02:00
Florian Rival
0c380629d5 [WIP] Improve newIDE ObjectsList to make it sortable 2017-07-16 14:39:33 +02:00
Florian Rival
79f756a6f1 Add button to add a new scene and fix various minor bugs in newIDE 2017-07-15 16:27:51 +02:00
Lizard-13
d35edb72b2 Add some tests for gdjs.Variable (#362) 2017-07-15 15:49:55 +02:00
Florian Rival
cc9851b49c Make objects list displayed in a draggable panel in newIDE 2017-07-15 14:56:07 +02:00
Florian Rival
369bcfdda5 Make Properties panel draggable 2017-07-14 20:38:42 +02:00
wild-master
c0e8f9e2a1 Fixed link to GDevelop.js (#363)
It was leading to a 404 page
2017-07-14 18:19:59 +02:00
Florian Rival
7223da00b7 Add ResourceSelectorWithThumbnail in newIDE and use it in Panel/TiledSpriteEditor 2017-07-12 22:01:26 +02:00
Lizard-13
0987ca8b3e Fix GDJS CopyRuntimeToGD script on Windows when using path with spaces
Fix xcopy crashes with an "Invalid number of parameters" error
2017-07-12 00:15:21 +02:00
Florian Rival
a886049f72 Refactor project when renaming/deleting object in newIDE 2017-07-09 17:11:08 +02:00
Florian Rival
168f06b535 Use WholeProjectRefactorer to refactor project after object renaming/deletion in IDE 2017-07-09 14:06:58 +02:00
Florian Rival
def81b6a62 Move DependenciesAnalyzer to GDCore and added WholeProjectRefactorer 2017-07-09 13:28:45 +02:00
Florian Rival
311e451a2f Allow any Event to dependencies to source files (only used by CppCodeEvent for now)
This is to avoid casting events to CppCodeEvent (and so relying explicitly on them) when doing dependencies analysis.
2017-07-04 22:59:03 +02:00
Florian Rival
8c7b4cc7bd Add npm run storybook command in README. 2017-07-03 23:01:48 +02:00
Lizard-13
2494f984a9 Fix numeric variable detection and initialisation in GDJS 2017-07-03 22:06:39 +02:00
Florian Rival
cec0ca0b71 Refactor project saving/opening in LocalProject[Writer/Opener] 2017-07-02 23:12:26 +02:00
Florian Rival
a262cebdfb [WIP] Implement delete/rename object in ObjectsList *without* refactoring of the rest of the game 2017-07-02 22:40:07 +02:00
Florian Rival
49145136d8 [WIP] Add NewObjectDialog to choose an object to create in a scene 2017-07-02 15:04:05 +02:00
Florian Rival
9e01231334 Fix description of objects not properly displayed 2017-07-02 14:43:25 +02:00
Florian Rival
0d869b9f7b Add ObjectsList in storybook 2017-07-02 12:47:41 +02:00
Florian Rival
ad333dff69 [WIP] Improve object editors 2017-07-01 18:19:04 +02:00
Florian Rival
16ae5dd0aa [WIP] Enhance SpriteEditor with images, drag'n'drop support 2017-07-01 00:27:15 +02:00
Florian Rival
f778f4302b Fix rendering error with cocos2d-JS 3.15.1 in gdjs.LayerCocosRenderer 2017-06-27 23:26:57 +02:00
Florian Rival
f948fd14a4 [WIP] Started SpriteEditor for newIDE 2017-06-27 22:56:02 +02:00
Florian Rival
9d05dbdd42 [WIP] Add PanelSpritEditor and LocalResourceSources 2017-06-22 23:51:18 +02:00
Florian Rival
70cbe5156e [WIP] Add editors for TiledSpriteObject and TextObject in newIDE 2017-06-20 23:25:32 +02:00
712 changed files with 204604 additions and 137890 deletions

26
.clang_complete Normal file
View File

@@ -0,0 +1,26 @@
-DGDJS_EXPORTS
-DGD_API=
-DGD_CORE_API=
-DGD_EXTENSION_API=
-DGD_IDE_ONLY
-DMACOS
-DRELEASE
-DWXUSINGDLL
-D_FILE_OFFSET_BITS=64
-D__WXMAC__
-D__WXOSX_COCOA__
-D__WXOSX__
-DwxDEBUG_LEVEL=0
-D_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_
-Wno-potentially-evaluated-expression
-std=gnu++11
-I/usr/local/Cellar/wxmac/3.0.2/include/wx-3.0
-DNDEBUG
-fPIC
-I/Users/florian/Projects/F/GD/ExtLibs/SFML/include
-I/Users/florian/Projects/F/GD/Core
-I/usr/local/Cellar/wxmac/3.0.2/lib/wx/include/osx_cocoa-unicode-3.0
-I/usr/local/Cellar/wxmac/3.0.2/include/wx-3.0
-I/Users/florian/Projects/F/GD/GDCpp/.
-I/Users/florian/Projects/F/GD/GDJS/.
-F/Users/florian/Projects/F/GD/ExtLibs/SFML/extlibs/libs-osx/Frameworks

3
.gitignore vendored
View File

@@ -65,8 +65,7 @@ Binaries/Packaging/logs
!/scripts/libgettextlib-0-17.dll
!/scripts/libgettextsrc-0-17.dll
!/xgettext.exe
!/Binaries/Output/Release_Windows/locale/libgettextlib-0-17.dll
!/Binaries/Output/Release_Windows/locale/libgettextsrc-0-17.dll
!/Binaries/Output/Release_Windows/locale/*.dll
!/Binaries/Output/Release_Windows/locale/msgcat.exe
!/Binaries/Output/Release_Windows/locale/msgfmt.exe
!/ExtLibs/curl.exe

View File

@@ -37,6 +37,12 @@ before_install:
- "sh -e /etc/init.d/xvfb start"
install:
#Install newIDE tests dependencies
- cd newIDE/app && npm install
- cd ../..
#Install GDJS tests dependencies
- cd GDJS/tests && npm install
- cd ../..
#Get the correct version of gcc/g++
- if [ "$CXX" = "g++" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
#Compile the tests only
@@ -45,19 +51,18 @@ install:
- cmake -DBUILD_GDJS=FALSE -DBUILD_IDE=FALSE -DBUILD_TESTS=TRUE -DNO_GUI=TRUE -DCMAKE_CXX_COMPILER=$(which $CXX) -DCMAKE_C_COMPILER=$(which $CC) ..
- make -j 4
- cd ..
#Install GDJS tests dependencies
- cd GDJS/tests
- npm install
- cd ../..
script:
#GDJS game engine tests:
- cd GDJS/tests
#newIDE tests:
- cd newIDE/app
- npm test
- npm run flow
- cd ../..
#GDJS game engine tests:
- cd GDJS/tests && npm test
- cd ../..
#GDCore and GDCpp game engine tests:
- cd .build-tests
# - export LD_LIBRARY_PATH=$PWD/Binaries/Output/Release_Linux:$PWD/.build-tests/ExtLibs/SFML/lib:$LD_LIBRARY_PATH
- Core/GDCore_tests
- GDCpp/GDCpp_tests
- Extensions/PathfindingBehavior/PathfindingBehavior_Runtime_tests

120
.vscode/c_cpp_properties.json vendored Normal file
View File

@@ -0,0 +1,120 @@
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceRoot}",
"${workspaceRoot}/IDE",
"${workspaceRoot}/GDCpp",
"${workspaceRoot}/GDJS",
"${workspaceRoot}/Extensions",
"${workspaceRoot}/Core",
"${workspaceRoot}/ExtLibs/SFML/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1",
"/usr/local/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
"/usr/include",
"${workspaceRoot}"
],
"defines": [
"GD_IDE_ONLY",
"__WXMAC__",
"__WXOSX__",
"__WXOSX_COCOA__",
"GD_CORE_API=\/* Macro used to export classes on Windows, please ignore *\/",
"GD_API=\/* Macro used to export classes on Windows, please ignore *\/",
"GD_EXTENSION_API=\/* Macro used to export classes on Windows, please ignore *\/",
"WXUSINGDLL"
],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1",
"/usr/local/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
"/usr/include",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
]
},
{
"name": "Linux",
"includePath": [
"${workspaceRoot}",
"${workspaceRoot}/IDE",
"${workspaceRoot}/GDCpp",
"${workspaceRoot}/GDJS",
"${workspaceRoot}/Extensions",
"${workspaceRoot}/Core",
"${workspaceRoot}/ExtLibs/SFML/include",
"/usr/include",
"/usr/local/include",
"${workspaceRoot}"
],
"defines": [
"GD_IDE_ONLY",
"__WXMAC__",
"__WXOSX__",
"__WXOSX_COCOA__",
"GD_CORE_API=\/* Macro used to export classes on Windows, please ignore *\/",
"GD_API=\/* Macro used to export classes on Windows, please ignore *\/",
"GD_EXTENSION_API=\/* Macro used to export classes on Windows, please ignore *\/",
"WXUSINGDLL"
],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
},
{
"name": "Win32",
"includePath": [
"${workspaceRoot}",
"${workspaceRoot}/IDE",
"${workspaceRoot}/GDCpp",
"${workspaceRoot}/GDJS",
"${workspaceRoot}/Extensions",
"${workspaceRoot}/Core",
"${workspaceRoot}/ExtLibs/SFML/include",
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include",
"${workspaceRoot}"
],
"defines": [
"_DEBUG",
"UNICODE",
"GD_IDE_ONLY",
"__WXMAC__",
"__WXOSX__",
"__WXOSX_COCOA__",
"GD_CORE_API=\/* Macro used to export classes on Windows, please ignore *\/",
"GD_API=\/* Macro used to export classes on Windows, please ignore *\/",
"GD_EXTENSION_API=\/* Macro used to export classes on Windows, please ignore *\/",
"WXUSINGDLL"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}
],
"version": 3
}

93
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,93 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.associations": {
"*.idl": "java",
"iosfwd": "cpp",
"functional": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"algorithm": "cpp",
"random": "cpp",
"__config": "cpp",
"cstddef": "cpp",
"exception": "cpp",
"initializer_list": "cpp",
"new": "cpp",
"stdexcept": "cpp",
"typeinfo": "cpp",
"*.tcc": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"complex": "cpp",
"cstdarg": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"istream": "cpp",
"limits": "cpp",
"memory": "cpp",
"ostream": "cpp",
"sstream": "cpp",
"streambuf": "cpp",
"hashtable": "cpp",
"tuple": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"__split_buffer": "cpp",
"deque": "cpp",
"iterator": "cpp",
"list": "cpp",
"map": "cpp",
"queue": "cpp",
"regex": "cpp",
"set": "cpp",
"stack": "cpp",
"string": "cpp",
"vector": "cpp",
"iostream": "cpp",
"__functional_03": "cpp",
"__hash_table": "cpp",
"__tree": "cpp",
"bitset": "cpp",
"__bit_reference": "cpp",
"__mutex_base": "cpp",
"fstream": "cpp",
"ios": "cpp",
"__locale": "cpp",
"valarray": "cpp",
"freeglut_spaceball.c": "cpp",
"__tuple": "cpp",
"hash_map": "cpp",
"hash_set": "cpp",
"system_error": "cpp",
"__nullptr": "cpp",
"__functional_base": "cpp",
"__functional_base_03": "cpp",
"chrono": "cpp",
"ratio": "cpp",
"atomic": "cpp",
"locale": "cpp",
"string_view": "cpp",
"__string": "cpp"
},
"files.exclude": {
"Binaries/*build*": true,
"Binaries/Output": true,
"Binaries/Packaging/GDevelop.app": true,
"ExtLibs/SFML": true,
"docs": true,
"GDJS/docs": true,
"GDCpp/docs": true,
"Core/docs": true,
"Extensions/CommonDialogs/dlib-18.16": true,
"newIDE/electron-app/dist": true,
"newIDE/app/build": true,
"newIDE/app/resources/GDJS": true,
"newIDE/electron-app/app/www": true
},
// Support for Flowtype:
"javascript.validate.enable": false
}

View File

@@ -0,0 +1,748 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project firstLayout="">
<gdVersion build="95" major="4" minor="0" revision="8" />
<properties folderProject="false" linuxExecutableFilename="" macExecutableFilename="" packageName="com.example.gamename" projectFile="C:\Users\Maciel\Programacion\gits\GD\Binaries\Output\Release_Windows\Examples\Copy_Variables.gdg" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
<extension name="TextObject" />
</extensions>
<platforms>
<platform name="GDevelop C++ platform" />
<platform name="GDevelop JS platform" />
</platforms>
<currentPlatform>GDevelop C++ platform</currentPlatform>
</properties>
<resources>
<resources />
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="30" disableInputWhenNotFocused="true" mangledName="Scene" name="Scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="30" standardSortMethod="false" stopSoundsOnStartup="true" title="" v="30">
<uiSettings grid="false" gridB="80" gridG="80" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="80" gridWidth="32" snap="true" windowMask="false" zoomFactor="0.701632" />
<objectsGroups />
<variables>
<variable name="Scene">
<children>
<variable name="A" value="5" />
<variable name="B">
<children>
<variable name="alpha">
<children>
<variable name="x" value="5.5" />
<variable name="y" value="-8" />
</children>
</variable>
<variable name="beta" value="150;255;150" />
<variable name="gamma" value="Apples" />
</children>
</variable>
</children>
</variable>
</variables>
<instances>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="DebugText" width="0.000000" x="400.000000" y="300.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables>
<variable name="ID" value="3" />
</initialVariables>
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="DebugText" width="0.000000" x="20.000000" y="20.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables>
<variable name="ID" value="0" />
</initialVariables>
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="DebugText" width="0.000000" x="400.000000" y="20.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables>
<variable name="ID" value="1" />
</initialVariables>
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="DebugText" width="0.000000" x="20.000000" y="300.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables>
<variable name="ID" value="2" />
</initialVariables>
</instance>
</instances>
<objects>
<object bold="false" italic="false" name="DebugText" smoothed="true" type="TextObject::Text" underlined="false">
<variables />
<behaviors />
<string>DebugText</string>
<font></font>
<characterSize>24</characterSize>
<color b="220" g="220" r="220" />
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="128" g="255" r="128" textB="0" textG="0" textR="0" />
<comment>Update debug text at the beginning (only Scene variable will be drawn because others haven&apos;t childrend)</comment>
<comment2></comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="DepartScene" />
<parameters>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="ModVarScene" />
<parameters>
<parameter>Update</parameter>
<parameter>=</parameter>
<parameter>1</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="128" g="255" r="128" textB="0" textG="0" textR="0" />
<comment>If &quot;A&quot; key is pressed, convert the Scene variable into JSON and parse it into a Global variable, then randomize a child from the Global structure, to identify it</comment>
<comment2></comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyPressed" />
<parameters>
<parameter></parameter>
<parameter>a</parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="BuiltinCommonInstructions::Once" />
<parameters />
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="JSONToGlobalVariableStructure" />
<parameters>
<parameter>ToJSON(Scene)</parameter>
<parameter>Global</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="ModVarGlobal" />
<parameters>
<parameter>Global.B.alpha.x</parameter>
<parameter>=</parameter>
<parameter>Random(1000)</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="ModVarScene" />
<parameters>
<parameter>Update</parameter>
<parameter>=</parameter>
<parameter>1</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="128" g="255" r="128" textB="0" textG="0" textR="0" />
<comment>If &quot;S&quot; key is pressed, convert the Global variable into JSON and parse it into an Object variable, then randomize another child from the Object structure, to identify it</comment>
<comment2></comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyPressed" />
<parameters>
<parameter></parameter>
<parameter>s</parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="VarObjet" />
<parameters>
<parameter>DebugText</parameter>
<parameter>ID</parameter>
<parameter>=</parameter>
<parameter>2</parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="BuiltinCommonInstructions::Once" />
<parameters />
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="JSONToObjectVariableStructure" />
<parameters>
<parameter>GlobalVarToJSON(Global)</parameter>
<parameter>DebugText</parameter>
<parameter>Object</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="ModVarObjet" />
<parameters>
<parameter>DebugText</parameter>
<parameter>Object.B.alpha.y</parameter>
<parameter>=</parameter>
<parameter>Random(1000)</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="ModVarScene" />
<parameters>
<parameter>Update</parameter>
<parameter>=</parameter>
<parameter>1</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="128" g="255" r="128" textB="0" textG="0" textR="0" />
<comment>If &quot;D&quot; key is pressed, convert the Object variable into JSON (note there are no whitespaces after the &quot;,&quot; before the variable name in the ObjectVarToJSON) and parse it into another scene variable Scene_2</comment>
<comment2></comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyPressed" />
<parameters>
<parameter></parameter>
<parameter>d</parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="VarObjet" />
<parameters>
<parameter>DebugText</parameter>
<parameter>ID</parameter>
<parameter>=</parameter>
<parameter>2</parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="BuiltinCommonInstructions::Once" />
<parameters />
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="JSONToVariableStructure" />
<parameters>
<parameter>ObjectVarToJSON(DebugText,Object)</parameter>
<parameter>Scene_2</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="ModVarScene" />
<parameters>
<parameter>Update</parameter>
<parameter>=</parameter>
<parameter>1</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="128" g="255" r="128" textB="0" textG="0" textR="0" />
<comment>Time to update the debug text objects, set Update = 0 to update it only once, and start a counter &quot;i&quot; = 0</comment>
<comment2></comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="VarScene" />
<parameters>
<parameter>Update</parameter>
<parameter>=</parameter>
<parameter>1</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="ModVarScene" />
<parameters>
<parameter>Update</parameter>
<parameter>=</parameter>
<parameter>0</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="ModVarScene" />
<parameters>
<parameter>i</parameter>
<parameter>=</parameter>
<parameter>0</parameter>
</parameters>
<subActions />
</action>
</actions>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="128" g="255" r="128" textB="0" textG="0" textR="0" />
<comment>Repeat 4 times because there are 4 debug objects, in each repeat select the object with ID = i (counter variable)&#x0A;Update the counter variable (i + 1)&#x0A;Clear the temporal variable Temp, otherwise children are kept from one update to another, messing up the test</comment>
<comment2></comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Repeat</type>
<repeatExpression>4</repeatExpression>
<conditions>
<condition>
<type inverted="false" value="VarObjet" />
<parameters>
<parameter>DebugText</parameter>
<parameter>ID</parameter>
<parameter>=</parameter>
<parameter>Variable(i)</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="ModVarScene" />
<parameters>
<parameter>i</parameter>
<parameter>+</parameter>
<parameter>1</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="VariableClearChildren" />
<parameters>
<parameter>Temp</parameter>
</parameters>
<subActions />
</action>
</actions>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="128" g="255" r="128" textB="0" textG="0" textR="0" />
<comment>Set starting title in function of the debug object ID, and copy the testing variables into the variable Temp (this way Temp will be equal to one of the variables under test)</comment>
<comment2></comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="VarObjet" />
<parameters>
<parameter>DebugText</parameter>
<parameter>ID</parameter>
<parameter>=</parameter>
<parameter>0</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>DebugText</parameter>
<parameter>=</parameter>
<parameter>&quot;Scene&quot; + NewLine()</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="JSONToVariableStructure" />
<parameters>
<parameter>ToJSON(Scene)</parameter>
<parameter>Temp</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="VarObjet" />
<parameters>
<parameter>DebugText</parameter>
<parameter>ID</parameter>
<parameter>=</parameter>
<parameter>1</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>DebugText</parameter>
<parameter>=</parameter>
<parameter>&quot;Global&quot; + NewLine()</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="JSONToVariableStructure" />
<parameters>
<parameter>GlobalVarToJSON(Global)</parameter>
<parameter>Temp</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="VarObjet" />
<parameters>
<parameter>DebugText</parameter>
<parameter>ID</parameter>
<parameter>=</parameter>
<parameter>2</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>DebugText</parameter>
<parameter>=</parameter>
<parameter>&quot;Object&quot; + NewLine()</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="JSONToVariableStructure" />
<parameters>
<parameter>ObjectVarToJSON(DebugText,Object)</parameter>
<parameter>Temp</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="VarObjet" />
<parameters>
<parameter>DebugText</parameter>
<parameter>ID</parameter>
<parameter>=</parameter>
<parameter>3</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>DebugText</parameter>
<parameter>=</parameter>
<parameter>&quot;Scene_2&quot; + NewLine()</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="JSONToVariableStructure" />
<parameters>
<parameter>ToJSON(Scene_2)</parameter>
<parameter>Temp</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="128" g="255" r="128" textB="0" textG="0" textR="0" />
<comment>Copy values from variable Test in the debug object, to draw it, one debug object is selected at each iteration and one variable is copy into Temp variable</comment>
<comment2></comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="VariableChildExists" />
<parameters>
<parameter>Temp</parameter>
<parameter>&quot;A&quot;</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>DebugText</parameter>
<parameter>+</parameter>
<parameter>&quot;____A = &quot; + VariableString(Temp.A) + NewLine()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="VariableChildExists" />
<parameters>
<parameter>Temp</parameter>
<parameter>&quot;B&quot;</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>DebugText</parameter>
<parameter>+</parameter>
<parameter>&quot;____B&quot; + NewLine()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="VariableChildExists" />
<parameters>
<parameter>Temp.B</parameter>
<parameter>&quot;alpha&quot;</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>DebugText</parameter>
<parameter>+</parameter>
<parameter>&quot;________alpha&quot; + NewLine()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="VariableChildExists" />
<parameters>
<parameter>Temp.B.alpha</parameter>
<parameter>&quot;x&quot;</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>DebugText</parameter>
<parameter>+</parameter>
<parameter>&quot;____________x = &quot; + VariableString(Temp.B.alpha.x) + NewLine()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="VariableChildExists" />
<parameters>
<parameter>Temp.B.alpha</parameter>
<parameter>&quot;y&quot;</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>DebugText</parameter>
<parameter>+</parameter>
<parameter>&quot;____________y = &quot; + VariableString(Temp.B.alpha.y) + NewLine()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="VariableChildExists" />
<parameters>
<parameter>Temp.B</parameter>
<parameter>&quot;beta&quot;</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>DebugText</parameter>
<parameter>+</parameter>
<parameter>&quot;________beta = &quot; + VariableString(Temp.B.beta) + NewLine()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="VariableChildExists" />
<parameters>
<parameter>Temp.B</parameter>
<parameter>&quot;gamma&quot;</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>DebugText</parameter>
<parameter>+</parameter>
<parameter>&quot;________gamma = &quot; + VariableString(Temp.B.gamma)</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
</event>
</events>
</event>
</events>
</event>
</events>
<layers>
<layer name="New layer" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
<effects />
</layer>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
<effects />
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -2,7 +2,9 @@
Version=1.0
Name=GDevelop
GenericName=Game creator IDE
GenericName[de]=Entwicklungsumgebung für Spiele
Comment=HTML5 and native game development software
Comment[de]=Entwicklungsumgebung für native und HTML5-Spiele
Exec=sh -c "gdevelop %F"
MimeType=application/x-gdevelop-project;
Icon=GDevelop

View File

@@ -1,4 +1,4 @@
; Inno Setup installation script for GDevelop.
; Inno Setup installation script for GDevelop 4.
[Setup]
AppName=GDevelop
@@ -13,14 +13,14 @@ AllowNoIcons=yes
LicenseFile=..\Output\Release_Windows\License-en.rtf
InfoBeforeFile=..\Output\Release_Windows\Informations-en.rtf
OutputDir=.\
OutputBaseFilename=gd4090
OutputBaseFilename=gd4096
Compression=lzma
SolidCompression=yes
SetupIconFile=..\Output\Release_Windows\res\icon.ico
VersionInfoVersion=4.0
WizardImageFile=Setup bitmap\wizbmp.bmp
WizardSmallImageFile=Setup bitmap/smallicon.bmp
AppCopyright=2008-2016 Florian Rival
AppCopyright=2008-2017 Florian Rival
VersionInfoCompany=Florian Rival
VersionInfoDescription=GDevelop setup
VersionInfoCopyright=2008-2016 Florian Rival

View File

@@ -29,6 +29,19 @@ public:
virtual ~CommentEvent() {};
virtual gd::CommentEvent * Clone() const { return new CommentEvent(*this);}
int GetBackgroundColorRed() const { return r; }
int GetBackgroundColorGreen() const { return v; }
int GetBackgroundColorBlue() const { return b; }
void SetBackgroundColor(int r_, int g_, int b_) { r = r_; v = g_; b = b_; }
int GetTextColorRed() const { return textR; }
int GetTextColorGreen() const { return textG; }
int GetTextColorBlue() const { return textB; }
void SetTextColor(int r_, int g_, int b_) { textR = r_; textG = g_; textB = b_; }
const gd::String & GetComment() const { return com1; }
void SetComment(const gd::String & comment) { com1 = comment; }
virtual void SerializeTo(SerializerElement & element) const;
virtual void UnserializeFrom(gd::Project & project, const SerializerElement & element);
@@ -40,8 +53,8 @@ public:
int textG; ///< Text color Green component
int textB; ///< Text color Blue component
gd::String com1; ///< Comment gd::String
gd::String com2; ///< Optional second comment gd::String
gd::String com1; ///< Comment
gd::String com2; ///< Optional second column comment, deprecated
/**
* Called by event editor to draw the event.

View File

@@ -80,16 +80,16 @@ vector < const gd::Expression* > ForEachEvent::GetAllExpressions() const
void ForEachEvent::SerializeTo(SerializerElement & element) const
{
element.AddChild("object").SetValue(objectsToPick.GetPlainString());
gd::EventsListSerialization::SaveConditions(conditions, element.AddChild("conditions"));
gd::EventsListSerialization::SaveActions(actions, element.AddChild("actions"));
gd::EventsListSerialization::SerializeInstructionsTo(conditions, element.AddChild("conditions"));
gd::EventsListSerialization::SerializeInstructionsTo(actions, element.AddChild("actions"));
gd::EventsListSerialization::SerializeEventsTo(events, element.AddChild("events"));
}
void ForEachEvent::UnserializeFrom(gd::Project & project, const SerializerElement & element)
{
objectsToPick = gd::Expression(element.GetChild("object", 0, "Object").GetValue().GetString());
gd::EventsListSerialization::OpenConditions(project, conditions, element.GetChild("conditions", 0, "Conditions"));
gd::EventsListSerialization::OpenActions(project, actions, element.GetChild("actions", 0, "Actions"));
gd::EventsListSerialization::UnserializeInstructionsFrom(project, conditions, element.GetChild("conditions", 0, "Conditions"));
gd::EventsListSerialization::UnserializeInstructionsFrom(project, actions, element.GetChild("actions", 0, "Actions"));
gd::EventsListSerialization::UnserializeEventsFrom(project, events, element.GetChild("events", 0, "Events"));
}

View File

@@ -79,16 +79,16 @@ vector < const gd::Expression* > RepeatEvent::GetAllExpressions() const
void RepeatEvent::SerializeTo(SerializerElement & element) const
{
element.AddChild("repeatExpression").SetValue(repeatNumberExpression.GetPlainString());
gd::EventsListSerialization::SaveConditions(conditions, element.AddChild("conditions"));
gd::EventsListSerialization::SaveActions(actions, element.AddChild("actions"));
gd::EventsListSerialization::SerializeInstructionsTo(conditions, element.AddChild("conditions"));
gd::EventsListSerialization::SerializeInstructionsTo(actions, element.AddChild("actions"));
gd::EventsListSerialization::SerializeEventsTo(events, element.AddChild("events"));
}
void RepeatEvent::UnserializeFrom(gd::Project & project, const SerializerElement & element)
{
repeatNumberExpression = gd::Expression(element.GetChild("repeatExpression", 0, "RepeatExpression").GetValue().GetString());
gd::EventsListSerialization::OpenConditions(project, conditions, element.GetChild("conditions", 0, "Conditions"));
gd::EventsListSerialization::OpenActions(project, actions, element.GetChild("actions", 0, "Actions"));
gd::EventsListSerialization::UnserializeInstructionsFrom(project, conditions, element.GetChild("conditions", 0, "Conditions"));
gd::EventsListSerialization::UnserializeInstructionsFrom(project, actions, element.GetChild("actions", 0, "Actions"));
gd::EventsListSerialization::UnserializeEventsFrom(project, events, element.GetChild("events", 0, "Events"));
}

View File

@@ -62,15 +62,15 @@ vector < gd::InstructionsList* > StandardEvent::GetAllActionsVectors()
void StandardEvent::SerializeTo(SerializerElement & element) const
{
gd::EventsListSerialization::SaveConditions(conditions, element.AddChild("conditions"));
gd::EventsListSerialization::SaveActions(actions, element.AddChild("actions"));
gd::EventsListSerialization::SerializeInstructionsTo(conditions, element.AddChild("conditions"));
gd::EventsListSerialization::SerializeInstructionsTo(actions, element.AddChild("actions"));
gd::EventsListSerialization::SerializeEventsTo(events, element.AddChild("events"));
}
void StandardEvent::UnserializeFrom(gd::Project & project, const SerializerElement & element)
{
gd::EventsListSerialization::OpenConditions(project, conditions, element.GetChild("conditions", 0, "Conditions"));
gd::EventsListSerialization::OpenActions(project, actions, element.GetChild("actions", 0, "Actions"));
gd::EventsListSerialization::UnserializeInstructionsFrom(project, conditions, element.GetChild("conditions", 0, "Conditions"));
gd::EventsListSerialization::UnserializeInstructionsFrom(project, actions, element.GetChild("actions", 0, "Actions"));
gd::EventsListSerialization::UnserializeEventsFrom(project, events, element.GetChild("events", 0, "Events"));
}

View File

@@ -62,9 +62,9 @@ vector < const gd::InstructionsList* > WhileEvent::GetAllActionsVectors() const
void WhileEvent::SerializeTo(SerializerElement & element) const
{
element.SetAttribute("infiniteLoopWarning", infiniteLoopWarning);
gd::EventsListSerialization::SaveConditions(whileConditions, element.AddChild("whileConditions"));
gd::EventsListSerialization::SaveConditions(conditions, element.AddChild("conditions"));
gd::EventsListSerialization::SaveActions(actions, element.AddChild("actions"));
gd::EventsListSerialization::SerializeInstructionsTo(whileConditions, element.AddChild("whileConditions"));
gd::EventsListSerialization::SerializeInstructionsTo(conditions, element.AddChild("conditions"));
gd::EventsListSerialization::SerializeInstructionsTo(actions, element.AddChild("actions"));
gd::EventsListSerialization::SerializeEventsTo(events, element.AddChild("events"));
}
@@ -72,9 +72,9 @@ void WhileEvent::UnserializeFrom(gd::Project & project, const SerializerElement
{
justCreatedByTheUser = false;
infiniteLoopWarning = element.GetBoolAttribute("infiniteLoopWarning");
gd::EventsListSerialization::OpenConditions(project, whileConditions, element.GetChild("whileConditions", 0, "WhileConditions"));
gd::EventsListSerialization::OpenConditions(project, conditions, element.GetChild("conditions", 0, "Conditions"));
gd::EventsListSerialization::OpenActions(project, actions, element.GetChild("actions", 0, "Actions"));
gd::EventsListSerialization::UnserializeInstructionsFrom(project, whileConditions, element.GetChild("whileConditions", 0, "WhileConditions"));
gd::EventsListSerialization::UnserializeInstructionsFrom(project, conditions, element.GetChild("conditions", 0, "Conditions"));
gd::EventsListSerialization::UnserializeInstructionsFrom(project, actions, element.GetChild("actions", 0, "Actions"));
gd::EventsListSerialization::UnserializeEventsFrom(project, events, element.GetChild("events", 0, "Events"));
}

View File

@@ -258,8 +258,8 @@ gd::String EventsCodeGenerator::GenerateConditionCode(gd::Instruction & conditio
gd::String objectInParameter = condition.GetParameter(pNb).GetPlainString();
if ( !scene.HasObjectNamed(objectInParameter) && !project.HasObjectNamed(objectInParameter)
&& find_if(scene.GetObjectGroups().begin(), scene.GetObjectGroups().end(), bind2nd(gd::GroupHasTheSameName(), objectInParameter) ) == scene.GetObjectGroups().end()
&& find_if(project.GetObjectGroups().begin(), project.GetObjectGroups().end(), bind2nd(gd::GroupHasTheSameName(), objectInParameter) ) == project.GetObjectGroups().end() )
&& !scene.GetObjectGroups().Has(objectInParameter)
&& !project.GetObjectGroups().Has(objectInParameter))
{
condition.SetParameter(pNb, gd::Expression(""));
condition.SetType("");
@@ -398,8 +398,8 @@ gd::String EventsCodeGenerator::GenerateActionCode(gd::Instruction & action, Eve
{
gd::String objectInParameter = action.GetParameter(pNb).GetPlainString();
if ( !scene.HasObjectNamed(objectInParameter) && !project.HasObjectNamed(objectInParameter)
&& find_if(scene.GetObjectGroups().begin(), scene.GetObjectGroups().end(), bind2nd(gd::GroupHasTheSameName(), objectInParameter) ) == scene.GetObjectGroups().end()
&& find_if(project.GetObjectGroups().begin(), project.GetObjectGroups().end(), bind2nd(gd::GroupHasTheSameName(), objectInParameter) ) == project.GetObjectGroups().end() )
&& !scene.GetObjectGroups().Has(objectInParameter)
&& !project.GetObjectGroups().Has(objectInParameter))
{
action.SetParameter(pNb, gd::Expression(""));
action.SetType("");
@@ -500,7 +500,7 @@ gd::String EventsCodeGenerator::GenerateParameterCodes(const gd::String & parame
gd::ExpressionParser parser(parameter);
if ( !parser.ParseMathExpression(platform, project, scene, callbacks) )
{
cout << "Error :" << parser.firstErrorStr << " in: "<< parameter << endl;
cout << "Error :" << parser.GetFirstError() << " in: "<< parameter << endl;
argOutput = "0";
}
@@ -514,7 +514,7 @@ gd::String EventsCodeGenerator::GenerateParameterCodes(const gd::String & parame
gd::ExpressionParser parser(parameter);
if ( !parser.ParseStringExpression(platform, project, scene, callbacks) )
{
cout << "Error in text expression" << parser.firstErrorStr << endl;
cout << "Error in text expression" << parser.GetFirstError() << endl;
argOutput = "\"\"";
}
@@ -742,17 +742,10 @@ gd::String EventsCodeGenerator::ConvertToStringExplicit(gd::String plainString)
std::vector<gd::String> EventsCodeGenerator::ExpandObjectsName(const gd::String & objectName, const EventsCodeGenerationContext & context) const
{
std::vector<gd::String> realObjects;
vector< gd::ObjectGroup >::const_iterator globalGroup = find_if(project.GetObjectGroups().begin(),
project.GetObjectGroups().end(),
bind2nd(gd::GroupHasTheSameName(), objectName));
vector< gd::ObjectGroup >::const_iterator sceneGroup = find_if(scene.GetObjectGroups().begin(),
scene.GetObjectGroups().end(),
bind2nd(gd::GroupHasTheSameName(), objectName));
if ( globalGroup != project.GetObjectGroups().end() )
realObjects = (*globalGroup).GetAllObjectsNames();
else if ( sceneGroup != scene.GetObjectGroups().end() )
realObjects = (*sceneGroup).GetAllObjectsNames();
if (project.GetObjectGroups().Has(objectName))
realObjects = project.GetObjectGroups().Get(objectName).GetAllObjectsNames();
else if (scene.GetObjectGroups().Has(objectName))
realObjects = scene.GetObjectGroups().Get(objectName).GetAllObjectsNames();
else
realObjects.push_back(objectName);

View File

@@ -169,8 +169,8 @@ bool CallbacksForGeneratingExpressionCode::OnSubMathExpression(const gd::Platfor
if ( !parser.ParseMathExpression(platform, project, layout, callbacks) )
{
#if defined(GD_IDE_ONLY)
firstErrorStr = callbacks.firstErrorStr;
firstErrorPos = callbacks.firstErrorPos;
firstErrorStr = callbacks.GetFirstError();
firstErrorPos = callbacks.GetFirstErrorPosition();
#endif
return false;
}
@@ -188,8 +188,8 @@ bool CallbacksForGeneratingExpressionCode::OnSubTextExpression(const gd::Platfor
if ( !parser.ParseStringExpression(platform, project, layout, callbacks) )
{
#if defined(GD_IDE_ONLY)
firstErrorStr = callbacks.firstErrorStr;
firstErrorPos = callbacks.firstErrorPos;
firstErrorStr = callbacks.GetFirstError();
firstErrorPos = callbacks.GetFirstErrorPosition();
#endif
return false;
}

View File

@@ -14,6 +14,8 @@ namespace gd
{
EventsList BaseEvent::badSubEvents;
std::vector< gd::String > BaseEvent::emptyDependencies;
gd::String BaseEvent::emptySourceFile;
BaseEvent::BaseEvent() :
eventHeightNeedUpdate(true),

View File

@@ -111,6 +111,19 @@ public:
virtual std::vector < gd::Expression* > GetAllExpressions() { std::vector < gd::Expression* > noExpr; return noExpr;};
virtual std::vector < const gd::Expression* > GetAllExpressions() const { std::vector < const gd::Expression* > noExpr; return noExpr;};
/**
* \brief Returns the dependencies on source files of the project.
* \note Default implementation returns an empty list of dependencies. This is fine for most events that
* are not related to adding custom user source code.
*/
virtual const std::vector<gd::String> & GetSourceFileDependencies() const { return emptyDependencies; };
/**
* \brief Returns the name of the source file associated with the event
* \note Default implementation returns an empty string. This is fine for most events that
* are not related to adding custom user source code.
*/
virtual const gd::String & GetAssociatedGDManagedSourceFile(gd::Project & project) const { return emptySourceFile; };
///@}
/** \name Code generation
@@ -263,11 +276,13 @@ protected:
mutable unsigned int renderedHeight;
private:
bool folded; ///< True if the subevents should be hidden in the events editor
bool folded; ///< True if the subevents should be hidden in the events editor
bool disabled; ///<True if the event is disabled and must not be executed
gd::String type; ///<Type of the event. Must be assigned at the creation. Used for saving the event for instance.
static gd::EventsList badSubEvents;
static std::vector< gd::String > emptyDependencies;
static gd::String emptySourceFile;
};
/**

View File

@@ -150,13 +150,13 @@ public:
*/
///@{
/**
* \brief Save the objects to xml
* \brief Serialize the events to the specified element
* \see EventsListSerialization
*/
void SerializeTo(SerializerElement & element) const;
/**
* \brief Load the objects from xml
* \brief Load the events from the specified element
* \see EventsListSerialization
*/
void UnserializeFrom(gd::Project & project, const SerializerElement & element);

View File

@@ -8,17 +8,12 @@
#include "GDCore/String.h"
#include <vector>
#include "GDCore/Events/Expression.h"
#include "GDCore/Tools/SPtrList.h"
#include "GDCore/Events/InstructionsList.h"
#include "GDCore/String.h"
namespace gd
{
class Instruction;
template<typename T> class SPtrList;
typedef SPtrList<Instruction> InstructionsList;
/**
* \brief An instruction is a member of an event: It can be a condition or an action.
*

View File

@@ -0,0 +1,42 @@
/*
* GDevelop Core
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights reserved.
* This project is released under the MIT License.
*/
#include "InstructionsList.h"
#include "GDCore/Project/Project.h"
#include "GDCore/Events/Instruction.h"
#include "Serialization.h"
namespace gd
{
void InstructionsList::InsertInstructions(const InstructionsList & list, size_t begin, size_t end, size_t position)
{
if (begin >= list.size()) return;
if (end < begin) return;
if (end >= list.size()) end = list.size()-1;
for (std::size_t insertPos = 0;insertPos <= (end-begin);insertPos++)
{
const Instruction & instruction = *list.elements[begin+insertPos];
std::shared_ptr<Instruction> copiedInstruction = std::make_shared<Instruction>(instruction);
if (position != (size_t)-1 && position+insertPos < elements.size())
elements.insert(elements.begin()+position+insertPos, copiedInstruction);
else
elements.push_back(copiedInstruction);
}
}
void InstructionsList::SerializeTo(SerializerElement & element) const
{
EventsListSerialization::SerializeInstructionsTo(*this, element);
}
void InstructionsList::UnserializeFrom(gd::Project & project, const SerializerElement & element)
{
EventsListSerialization::UnserializeInstructionsFrom(project, *this, element);
}
}

View File

@@ -6,17 +6,37 @@
#ifndef GDCORE_INSTRUCTIONSLIST_H
#define GDCORE_INSTRUCTIONSLIST_H
#include <memory>
#include <vector>
#include "GDCore/Events/Instruction.h"
#include "GDCore/Tools/SPtrList.h"
namespace gd { class Instruction; }
namespace gd { class Project; }
namespace gd { class SerializerElement; }
namespace gd
{
typedef SPtrList<gd::Instruction> InstructionsList;
class InstructionsList : public SPtrList<gd::Instruction> {
public:
void InsertInstructions(const InstructionsList & list, size_t begin, size_t end, size_t position = (size_t)-1);
/** \name Serialization
*/
///@{
/**
* \brief Serialize the instructions to the specified element
* \see EventsListSerialization
*/
void SerializeTo(gd::SerializerElement & element) const;
/**
* \brief Load the instructions from the specified element
* \see EventsListSerialization
*/
void UnserializeFrom(gd::Project & project, const gd::SerializerElement & element);
///@}
};
}

View File

@@ -31,21 +31,31 @@ public:
virtual ~ExpressionParser() {};
/**
* Parse the expression, calling each functor when necessary
* \brief Parse the expression, calling each functor when necessary
* \return True if expression was correctly parsed.
*/
bool ParseMathExpression(const gd::Platform & platform, const gd::Project & project, const gd::Layout & layout, gd::ParserCallbacks & callbacks);
/**
* Parse the expression, calling each functor when necessary
* \brief Parse the expression, calling each functor when necessary
* \return True if expression was correctly parsed.
*/
bool ParseStringExpression(const gd::Platform & platform, const gd::Project & project, const gd::Layout & layout, gd::ParserCallbacks & callbacks);
gd::String firstErrorStr;
size_t firstErrorPos;
/**
* \brief Return the description of the error that was found
*/
const gd::String & GetFirstError() { return firstErrorStr; }
/**
* \brief Return the position of the error that was found
* \return The position, or gd::String::npos if no error is found
*/
size_t GetFirstErrorPosition() { return firstErrorPos; }
private:
gd::String firstErrorStr;
size_t firstErrorPos;
/**
* Tool function to add a parameter
@@ -103,8 +113,21 @@ public:
virtual bool OnSubMathExpression(const gd::Platform & platform, const gd::Project & project, const gd::Layout & layout, gd::Expression & expression) = 0;
virtual bool OnSubTextExpression(const gd::Platform & platform, const gd::Project & project, const gd::Layout & layout, gd::Expression & expression) = 0;
/**
* \brief Return the description of the error that was found
*/
const gd::String & GetFirstError() { return firstErrorStr; }
/**
* \brief Return the position of the error that was found
* \return The position, or gd::String::npos if no error is found
*/
size_t GetFirstErrorPosition() { return firstErrorPos; }
protected:
gd::String firstErrorStr;
size_t firstErrorPos;
private:
/**
* \brief Set the return type of the expression: Done by ExpressionParser according to

View File

@@ -30,7 +30,7 @@ namespace gd
gd::VariableParser parser(parameter);
if ( !parser.Parse(callbacks) )
cout << "Error :" << parser.firstErrorStr << " in: "<< parameter << endl;
cout << "Error :" << parser.GetFirstError() << " in: "<< parameter << endl;
\endcode
*
* Here is the parsed grammar: <br>
@@ -61,6 +61,17 @@ public:
*/
bool Parse(VariableParserCallbacks & callbacks);
/**
* \brief Return the description of the error that was found
*/
const gd::String & GetFirstError() { return firstErrorStr; }
/**
* \brief Return the position of the error that was found
* \return The position, or gd::String::npos if no error is found
*/
size_t GetFirstErrorPosition() { return firstErrorPos; }
gd::String firstErrorStr;
size_t firstErrorPos;

View File

@@ -6,6 +6,7 @@
#include "GDCore/Project/Project.h"
#include "GDCore/Extensions/Platform.h"
#include "GDCore/Extensions/Metadata/InstructionMetadata.h"
#include "GDCore/Events/InstructionsList.h"
#include "GDCore/Events/EventsList.h"
#include "GDCore/Events/Event.h"
#include "GDCore/Events/Serialization.h"
@@ -21,7 +22,7 @@ using namespace std;
namespace gd
{
void EventsListSerialization::UpdateInstructionsFromGD31x(gd::Project & project, gd::InstructionsList & list, bool instructionsAreActions)
void EventsListSerialization::UpdateInstructionsFromGD31x(gd::Project & project, gd::InstructionsList & list)
{
for (std::size_t i = 0;i<list.size();++i)
{
@@ -47,8 +48,6 @@ void EventsListSerialization::UpdateInstructionsFromGD31x(gd::Project & project,
{
instr.SetParameter(1, gd::Expression("\""+instr.GetParameter(1).GetPlainString()+"\""));
}
//UpdateInstructionsFromGD31x(project, instr.GetSubInstructions(), instructionsAreActions);
}
}
@@ -201,79 +200,39 @@ void EventsListSerialization::SerializeEventsTo(const EventsList & list, Seriali
using namespace std;
void gd::EventsListSerialization::OpenConditions(gd::Project & project, gd::InstructionsList & conditions, const SerializerElement & elem)
void gd::EventsListSerialization::UnserializeInstructionsFrom(gd::Project & project, gd::InstructionsList & instructions, const SerializerElement & elem)
{
elem.ConsiderAsArrayOf("condition", "Condition");
elem.ConsiderAsArrayOf("instruction");
//Compatibility with GD <= 4.0.95
if (elem.HasChild("condition", "Condition"))
elem.ConsiderAsArrayOf("condition", "Condition");
else if (elem.HasChild("action", "Action"))
elem.ConsiderAsArrayOf("action", "Action");
//end of compatibility code
for(std::size_t i = 0; i<elem.GetChildrenCount(); ++i)
{
gd::Instruction instruction;
const SerializerElement & conditionElem = elem.GetChild(i);
const SerializerElement & instrElement = elem.GetChild(i);
instruction.SetType(conditionElem.GetChild("type", 0, "Type").GetStringAttribute("value")
.FindAndReplace("Automatism", "Behavior")); //Compatibility with GD <= 4
instruction.SetInverted(conditionElem.GetChild("type", 0, "Type").GetBoolAttribute("inverted", false, "Contraire"));
//Read parameters
vector < gd::Expression > parameters;
//Compatibility with GD <= 3.3
if (conditionElem.HasChild("Parametre")) {
for (std::size_t j = 0;j<conditionElem.GetChildrenCount("Parametre");++j)
parameters.push_back(gd::Expression(conditionElem.GetChild("Parametre", j).GetValue().GetString()));
}
//end of compatibility code
else
{
const SerializerElement & parametersElem = conditionElem.GetChild("parameters");
parametersElem.ConsiderAsArrayOf("parameter");
for (std::size_t j = 0;j<parametersElem.GetChildrenCount();++j)
parameters.push_back(gd::Expression(parametersElem.GetChild(j).GetValue().GetString()));
}
instruction.SetParameters( parameters );
//Read sub conditions
if ( conditionElem.HasChild("subConditions", "SubConditions") )
OpenConditions(project, instruction.GetSubInstructions(), conditionElem.GetChild("subConditions", 0, "SubConditions" ));
conditions.Insert( instruction );
}
if ( project.GetLastSaveGDMajorVersion() < 3 ||
(project.GetLastSaveGDMajorVersion() == 3 && project.GetLastSaveGDMinorVersion() <= 1 ) )
UpdateInstructionsFromGD31x(project, conditions, false);
if ( project.GetLastSaveGDMajorVersion() < 3 )
UpdateInstructionsFromGD2x(project, conditions, false);
}
void gd::EventsListSerialization::OpenActions(gd::Project & project, gd::InstructionsList & actions, const SerializerElement & elem)
{
elem.ConsiderAsArrayOf("action", "Action");
for(std::size_t i = 0; i<elem.GetChildrenCount(); ++i)
{
gd::Instruction instruction;
const SerializerElement & actionElem = elem.GetChild(i);
instruction.SetType(actionElem.GetChild("type", 0, "Type").GetStringAttribute("value")
instruction.SetType(instrElement.GetChild("type", 0, "Type").GetStringAttribute("value")
.FindAndReplace("Automatism", "Behavior")); //Compatibility with GD <= 4
instruction.SetInverted(instrElement.GetChild("type", 0, "Type").GetBoolAttribute("inverted", false, "Contraire"));
//Read parameters
vector < gd::Expression > parameters;
//Compatibility with GD <= 3.3
if (actionElem.HasChild("Parametre")) {
if (instrElement.HasChild("Parametre")) {
for (std::size_t j = 0;j<actionElem.GetChildrenCount("Parametre");++j)
parameters.push_back(gd::Expression(actionElem.GetChild("Parametre", j).GetValue().GetString()));
for (std::size_t j = 0;j<instrElement.GetChildrenCount("Parametre");++j)
parameters.push_back(gd::Expression(instrElement.GetChild("Parametre", j).GetValue().GetString()));
}
//end of compatibility code
else
{
const SerializerElement & parametersElem = actionElem.GetChild("parameters");
const SerializerElement & parametersElem = instrElement.GetChild("parameters");
parametersElem.ConsiderAsArrayOf("parameter");
for (std::size_t j = 0;j<parametersElem.GetChildrenCount();++j)
parameters.push_back(gd::Expression(parametersElem.GetChild(j).GetValue().GetString()));
@@ -281,62 +240,48 @@ void gd::EventsListSerialization::OpenActions(gd::Project & project, gd::Instruc
instruction.SetParameters( parameters );
//Read sub actions
if ( actionElem.HasChild("subActions", "SubActions") )
OpenActions(project, instruction.GetSubInstructions(), actionElem.GetChild("subActions", 0, "SubActions" ));
//Read sub instructions
if ( instrElement.HasChild("subInstructions") )
UnserializeInstructionsFrom(project, instruction.GetSubInstructions(), instrElement.GetChild("subInstructions"));
//Compatibility with GD <= 4.0.95
if ( instrElement.HasChild("subConditions", "SubConditions") )
UnserializeInstructionsFrom(project, instruction.GetSubInstructions(), instrElement.GetChild("subConditions", 0, "SubConditions" ));
if ( instrElement.HasChild("subActions", "SubActions") )
UnserializeInstructionsFrom(project, instruction.GetSubInstructions(), instrElement.GetChild("subActions", 0, "SubActions" ));
//end of compatibility code
actions.Insert( instruction );
instructions.Insert( instruction );
}
//Compatibility with GD <= 3.1
if ( project.GetLastSaveGDMajorVersion() < 3 ||
(project.GetLastSaveGDMajorVersion() == 3 && project.GetLastSaveGDMinorVersion() <= 1 ) )
UpdateInstructionsFromGD31x(project, actions, true);
UpdateInstructionsFromGD31x(project, instructions);
if ( project.GetLastSaveGDMajorVersion() < 3 )
UpdateInstructionsFromGD2x(project, actions, true);
UpdateInstructionsFromGD2x(project, instructions, elem.HasChild("action", "Action"));
//end of compatibility code
}
void gd::EventsListSerialization::SaveActions(const gd::InstructionsList & list, SerializerElement & actions)
void gd::EventsListSerialization::SerializeInstructionsTo(const gd::InstructionsList & list, SerializerElement & instructions)
{
actions.ConsiderAsArrayOf("action");
instructions.ConsiderAsArrayOf("instruction");
for ( std::size_t k = 0;k < list.size();k++ )
{
SerializerElement & action = actions.AddChild("action");
action.AddChild("type")
SerializerElement & instruction = instructions.AddChild("instruction");
instruction.AddChild("type")
.SetAttribute("value", list[k].GetType())
.SetAttribute("inverted", list[k].IsInverted());
//Parameters
SerializerElement & parameters = action.AddChild("parameters");
SerializerElement & parameters = instruction.AddChild("parameters");
parameters.ConsiderAsArrayOf("parameter");
for ( std::size_t l = 0;l < list[k].GetParameters().size();l++ )
parameters.AddChild("parameter").SetValue(list[k].GetParameter(l).GetPlainString());
//Sub instructions
SerializerElement & subActions = action.AddChild("subActions");
SaveActions(list[k].GetSubInstructions(), subActions);
}
}
void gd::EventsListSerialization::SaveConditions(const gd::InstructionsList & list, SerializerElement & conditions)
{
conditions.ConsiderAsArrayOf("condition");
for ( std::size_t k = 0;k < list.size();k++ )
{
SerializerElement & condition = conditions.AddChild("condition");
condition.AddChild("type")
.SetAttribute("value", list[k].GetType())
.SetAttribute("inverted", list[k].IsInverted());
//Parameters
SerializerElement & parameters = condition.AddChild("parameters");
parameters.ConsiderAsArrayOf("parameter");
for ( std::size_t l = 0;l < list[k].GetParameters().size();l++ )
parameters.AddChild("parameter").SetValue(list[k].GetParameter(l).GetPlainString());
//Sub instructions
SerializerElement & subConditions = condition.AddChild("subConditions");
SaveConditions(list[k].GetSubInstructions(), subConditions);
SerializerElement & subInstructions = instruction.AddChild("subInstructions");
SerializeInstructionsTo(list[k].GetSubInstructions(), subInstructions);
}
}

View File

@@ -5,9 +5,9 @@
*/
#ifndef GDCORE_EVENTS_SERIALIZATION_H
#define GDCORE_EVENTS_SERIALIZATION_H
#include "GDCore/Events/Instruction.h"
#include "GDCore/Serialization/Serializer.h"
#include <vector>
namespace gd { class InstructionsList; }
namespace gd { class Project; }
namespace gd { class EventsList; }
@@ -15,46 +15,37 @@ namespace gd
{
/**
* \brief Contains tools for loading and saving events to XML.
* \brief Contains tools for loading and saving events to SerializerElement.
*/
class GD_CORE_API EventsListSerialization
{
public:
/**
* \brief Load an events list from a TiXmlElement
* \brief Load an events list from a SerializerElement
* \param project The project the events belongs to.
* \param list The event list in which the events must be loaded.
* \param events The TiXmlElement containing the events
* \param events The SerializerElement containing the events
*/
static void UnserializeEventsFrom(gd::Project & project, gd::EventsList & list, const SerializerElement & events);
/**
* \brief Save an events list from a TiXmlElement
* \brief Save an events list to a SerializerElement
* \param list The event list to be saved.
* \param events The TiXmlElement in which the events must be saved.
* \param events The SerializerElement in which the events must be serialized.
*/
static void SerializeEventsTo(const gd::EventsList & list, SerializerElement & events);
/**
* \brief Load a list of conditions from a TiXmlElement
* \brief Unserialize a list of instructions
*/
static void OpenConditions(gd::Project & project, gd::InstructionsList & list, const SerializerElement & elem);
static void UnserializeInstructionsFrom(gd::Project & project, gd::InstructionsList & list, const SerializerElement & elem);
/**
* \brief Load a list of actions from a TiXmlElement
* \brief Serialize a list of instructions
*/
static void OpenActions(gd::Project & project, gd::InstructionsList & list, const SerializerElement & elem);
/**
* \brief Save a list of conditions to a TiXmlElement
*/
static void SaveConditions(const gd::InstructionsList & list, SerializerElement & elem);
/**
* \brief Save a list of actions to a TiXmlElement
*/
static void SaveActions(const gd::InstructionsList & list, SerializerElement & elem);
static void SerializeInstructionsTo(const gd::InstructionsList & list, SerializerElement & elem);
private:
/**
* \brief Internal method called when opening events created with GD2.x
*
@@ -67,7 +58,7 @@ public:
*
* Variables related and some storage instructions have been changed.
*/
static void UpdateInstructionsFromGD31x(gd::Project & project, gd::InstructionsList & list, bool instructionsAreActions);
static void UpdateInstructionsFromGD31x(gd::Project & project, gd::InstructionsList & list);
};
}

View File

@@ -21,7 +21,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAdvancedExtension(gd::P
#if defined(GD_IDE_ONLY)
extension.AddCondition("Toujours",
_("Always"),
_("This condition returns always true (or always false if condition is inverted)."),
_("This condition always returns true (or always false, if the condition is inverted)."),
_("Always"),
_("Other"),
"res/conditions/toujours24.png",

View File

@@ -21,8 +21,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
#if defined(GD_IDE_ONLY)
extension.AddAction("PlaySoundCanal",
_("Play a sound on a channel"),
_("Play a sound (small audio file) on a specific channel,\nso as to be able to manipulate it."),
_("Play the sound _PARAM1_ on the channel _PARAM2_"),
_("Play a sound (small audio file) on a specific channel,\nso you'll be able to manipulate it."),
_("Play the sound _PARAM1_ on the channel _PARAM2_, vol.: _PARAM4_, loop: _PARAM3_"),
_("Audio/Sounds on channels"),
"res/actions/son24.png",
"res/actions/son.png")
@@ -68,10 +68,10 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
.MarkAsAdvanced();
extension.AddAction("PlayMusicCanal",
_("Play a music on a channel"),
_("Play a music an on specific channel,\nso as to be able to interact with later."),
_("Play the music _PARAM1_ on channel _PARAM2_"),
_("Audio/Musics on channels"),
_("Play a music file on a channel"),
_("Play a music file on a specific channel,\nso you'll be able to interact with it later."),
_("Play the music _PARAM1_ on channel _PARAM2_, vol.: _PARAM4_, loop: _PARAM3_"),
_("Audio/Music on channels"),
"res/actions/music24.png",
"res/actions/music.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -86,7 +86,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
_("Stop the music on a channel"),
_("Stop the music on the specified channel"),
_("Stop the music of channel _PARAM1_"),
_("Audio/Musics on channels"),
_("Audio/Music on channels"),
"res/actions/music24.png",
"res/actions/music.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -97,7 +97,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
_("Pause the music of a channel"),
_("Pause the music on the specified channel."),
_("Pause the music of channel _PARAM1_"),
_("Audio/Musics on channels"),
_("Audio/Music on channels"),
"res/actions/music24.png",
"res/actions/music.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -108,7 +108,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
_("Play the music of a channel"),
_("Play the music of the channel."),
_("Play the music of channel _PARAM1_"),
_("Audio/Musics on channels"),
_("Audio/Music on channels"),
"res/actions/music24.png",
"res/actions/music.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -117,7 +117,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
extension.AddAction("ModVolumeSoundCanal",
_("Volume of the sound on a channel"),
_("This action modify the volume of the sound on the specified channel. The volume is between 0 and 100."),
_("This action modifies the volume of the sound on the specified channel. The volume is between 0 and 100."),
_("Do _PARAM2__PARAM3_ to the volume of the sound on channel _PARAM1_"),
_("Audio/Sounds on channels"),
"res/actions/sonVolume24.png",
@@ -131,9 +131,9 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
extension.AddAction("ModVolumeMusicCanal",
_("Volume of the music on a channel"),
_("This action modify the volume of the music on the specified channel. The volume is between 0 and 100."),
_("This action modifies the volume of the music on the specified channel. The volume is between 0 and 100."),
_("Do _PARAM2__PARAM3_ to the volume of the music on channel _PARAM1_"),
_("Audio/Musics on channels"),
_("Audio/Music on channels"),
"res/actions/musicVolume24.png",
"res/actions/musicVolume.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -145,7 +145,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
extension.AddAction("ModGlobalVolume",
_("Game global volume"),
_("This action modify the global volume of the game. The volume is between 0 and 100."),
_("This action modifies the global volume of the game. The volume is between 0 and 100."),
_("Do _PARAM1__PARAM2_ to global sound level"),
_("Audio"),
"res/actions/volume24.png",
@@ -158,7 +158,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
extension.AddAction("ModPitchSoundChannel",
_("Pitch of the sound of a channel"),
_("This action modify pitch (speed) of the sound on a channel.\n1 is the default pitch."),
_("This action modifies the pitch (speed) of the sound on a channel.\n1 is the default pitch."),
_("Do _PARAM2__PARAM3_ to the pitch of the sound on channel _PARAM1_"),
_("Audio/Sounds on channels"),
"res/actions/son24.png",
@@ -172,9 +172,9 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
extension.AddAction("ModPitchMusicChannel",
_("Pitch of the music on a channel"),
_("This action modify the pitch of the music on the specified channel. 1 is the default pitch"),
_("This action modifies the pitch of the music on the specified channel. 1 is the default pitch"),
_("Do _PARAM2__PARAM3_ to the pitch of the music on channel _PARAM1_"),
_("Audio/Musics on channels"),
_("Audio/Music on channels"),
"res/actions/music24.png",
"res/actions/music.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -186,7 +186,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
extension.AddAction("ModPlayingOffsetSoundChannel",
_("Playing offset of the sound on a channel"),
_("This action modify the playing offset of the sound on a channel"),
_("This action modifies the playing offset of the sound on a channel"),
_("Do _PARAM2__PARAM3_ to the playing offset of the sound on channel _PARAM1_"),
_("Audio/Sounds on channels"),
"res/actions/son24.png",
@@ -200,9 +200,9 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
extension.AddAction("ModPlayingOffsetMusicChannel",
_("Playing offset of the music on a channel"),
_("This action modify the playing offset of the music on the specified channel"),
_("This action modifies the playing offset of the music on the specified channel"),
_("Do _PARAM2__PARAM3_ to the playing offset of the music on channel _PARAM1_"),
_("Audio/Musics on channels"),
_("Audio/Music on channels"),
"res/actions/music24.png",
"res/actions/music.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -215,7 +215,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
extension.AddAction("PlaySound",
_("Play a sound"),
_("Play a sound."),
_("Play the sound _PARAM1_"),
_("Play the sound _PARAM1_, vol.: _PARAM3_, loop: _PARAM2_)"),
_("Audio"),
"res/actions/son24.png",
"res/actions/son.png")
@@ -227,9 +227,9 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
.MarkAsSimple();
extension.AddAction("PlayMusic",
_("Play a music"),
_("Play a music."),
_("Play the music _PARAM1_"),
_("Play a music file"),
_("Play a music file."),
_("Play the music _PARAM1_, vol.: _PARAM3_, loop: _PARAM2_)"),
_("Audio"),
"res/actions/music24.png",
"res/actions/music.png")
@@ -241,10 +241,10 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
.MarkAsSimple();
extension.AddCondition("MusicPlaying",
_("A music is being played"),
_("A music file is being played"),
_("Test if the music on a channel is being played"),
_("Music on channel _PARAM1_ is being played"),
_("Audio/Musics on channels"),
_("Audio/Music on channels"),
"res/conditions/musicplaying24.png",
"res/conditions/musicplaying.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -252,10 +252,10 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
.MarkAsAdvanced();
extension.AddCondition("MusicPaused",
_("A music is paused"),
_("A music file is paused"),
_("Test if the music on the specified channel is paused."),
_("Music on channel _PARAM1_ is paused"),
_("Audio/Musics on channels"),
_("Audio/Music on channels"),
"res/conditions/musicpaused24.png",
"res/conditions/musicpaused.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -263,10 +263,10 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
.MarkAsAdvanced();
extension.AddCondition("MusicStopped",
_("A music is stopped"),
_("A music file is stopped"),
_("Test if the music on the specified channel is stopped."),
_("Music on channel _PARAM1_ is stopped"),
_("Audio/Musics on channels"),
_("Audio/Music on channels"),
"res/conditions/musicstopped24.png",
"res/conditions/musicstopped.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -322,9 +322,9 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
extension.AddCondition("MusicCanalVolume",
_("Volume of the music on a channel"),
_("Test the volume of the music on specified channel. The volume is between 0 and 100."),
_("Test the volume of the music on a specified channel. The volume is between 0 and 100."),
_("The volume of the music on channel _PARAM1_ is _PARAM2__PARAM3_"),
_("Audio/Musics on channels"),
_("Audio/Music on channels"),
"res/conditions/musicVolume24.png",
"res/conditions/musicVolume.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -362,9 +362,9 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
extension.AddCondition("MusicChannelPitch",
_("Pitch of the music on a channel"),
_("Test the pitch (speed) of the music on specified channel. 1 is the default pitch."),
_("The volume of the music on channel _PARAM1_ is _PARAM2__PARAM3_"),
_("Audio/Musics on channels"),
_("Test the pitch (speed) of the music on a specified channel. 1 is the default pitch."),
_("The pitch of the music on channel _PARAM1_ is _PARAM2__PARAM3_"),
_("Audio/Music on channels"),
"res/conditions/musicVolume24.png",
"res/conditions/musicVolume.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -392,7 +392,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
_("Playing offset of the music on a channel"),
_("Test the playing offset of the music on the specified channel."),
_("The playing offset of the music on channel _PARAM1_ is _PARAM2__PARAM3_"),
_("Audio/Musics on channels"),
_("Audio/Music on channels"),
"res/conditions/musicVolume24.png",
"res/conditions/musicVolume.png")
.AddCodeOnlyParameter("currentScene", "")
@@ -406,7 +406,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("expression", _("Channel"));
extension.AddExpression("MusicChannelPlayingOffset", _("Music playing offset"), _("Music playing offset"), _("Musics"), "res/actions/music.png")
extension.AddExpression("MusicChannelPlayingOffset", _("Music playing offset"), _("Music playing offset"), _("Music"), "res/actions/music.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("expression", _("Channel"));
@@ -414,7 +414,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("expression", _("Channel"));
extension.AddExpression("MusicChannelVolume", _("Music volume"), _("Music volume"), _("Musics"), "res/actions/music.png")
extension.AddExpression("MusicChannelVolume", _("Music volume"), _("Music volume"), _("Music"), "res/actions/music.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("expression", _("Channel"));
@@ -422,7 +422,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(gd::Plat
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("expression", _("Channel"));
extension.AddExpression("MusicChannelPitch", _("Music's pitch"), _("Music's pitch"), _("Musics"), "res/actions/music.png")
extension.AddExpression("MusicChannelPitch", _("Music's pitch"), _("Music's pitch"), _("Music"), "res/actions/music.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("expression", _("Channel"));

View File

@@ -177,7 +177,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddAction("AddForceXY",
_("Add a force"),
_("Add a force to an object. The object will move according to all forces it has."),
_("Add a force to an object. The object will move according to all of the forces it has."),
_("Add to _PARAM0_ a force of _PARAM1_ p/s on X axis and _PARAM2_ p/s on Y axis"),
_("Movement"),
"res/actions/force24.png",
@@ -191,7 +191,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddAction("AddForceAL",
_("Add a force (angle)"),
_("Add a force to an object. The object will move according to all forces it has. This action creates the force using the specified angle and length."),
_("Add a force to an object. The object will move according to all of the forces it has. This action creates the force using the specified angle and length."),
_("Add to _PARAM0_ a force, angle: _PARAM1_ degrees and length: _PARAM2_ pixels"),
_("Movement"),
"res/actions/force24.png",
@@ -221,8 +221,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
.MarkAsAdvanced();
obj.AddAction("AddForceTournePos",
_("Add a force to move around an position"),
_("Add a force to an object to make it rotate around a position.\nNote that the movement is not precise, especially if the speed is high.\nTo position an object around a position more precisly, use the actions in the category \"Position\"."),
_("Add a force to move around a position"),
_("Add a force to an object to make it rotate around a position.\nNote that the movement is not precise, especially if the speed is high.\nTo position an object around a position more precisely, use the actions in the category \"Position\"."),
_("Rotate _PARAM0_ around _PARAM1_;_PARAM2_ at _PARAM3_ deg/sec and _PARAM4_ pixels away"),
_("Movement"),
"res/actions/forceTourne24.png",
@@ -239,7 +239,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddAction("Arreter",
_("Stop the object"),
_("Stop the object by deleting all its forces."),
_("Stop the object by deleting all of its forces."),
_("Stop the object _PARAM0_"),
_("Movement"),
"res/actions/arreter24.png",
@@ -263,7 +263,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddAction("ChangePlan",
_("Z order"),
_("Modify the z order of an object"),
_("Modify the Z-order of an object"),
_("Do _PARAM1__PARAM2_ to z-Order of _PARAM0_"),
_("Z order"),
"res/actions/planicon24.png",
@@ -276,14 +276,14 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddAction("ChangeLayer",
_("Layer"),
_("Change the layer where is the object."),
_("Move the object to a different layer."),
_("Put _PARAM0_ on the layer _PARAM1_"),
_("Layers and cameras"),
"res/actions/layer24.png",
"res/actions/layer.png")
.AddParameter("object", _("Object"))
.AddParameter("layer", _("Put on the layer (base layer if empty)")).SetDefaultValue("\"\"")
.AddParameter("layer", _("Move it to this layer (base layer if empty)")).SetDefaultValue("\"\"")
.MarkAsAdvanced();
obj.AddAction("ModVarObjet",
@@ -338,6 +338,17 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
.AddParameter("string", _("Child's name"))
.MarkAsAdvanced();
obj.AddAction("ObjectVariableClearChildren",
_("Clear variable"),
_("Remove all the children from the object variable."),
_("Clear children from variable _PARAM1_ of _PARAM0_"),
_("Variables/Structure"),
"res/actions/var24.png",
"res/actions/var.png")
.AddParameter("object", _("Object"))
.AddParameter("objectvar", _("Variable"))
.MarkAsAdvanced();
obj.AddAction("Cache",
_("Hide"),
_("Hide the specified object."),
@@ -363,7 +374,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddCondition("Angle",
_("Angle"),
_("Compare angle of the specified object."),
_("Compare the angle of the specified object."),
_("Angle of _PARAM0_ is _PARAM1__PARAM2_ deg."),
_("Angle"),
"res/conditions/direction24.png",
@@ -377,7 +388,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddCondition("Plan",
_("Compare Z order"),
_("Compare the z-order of the specified object."),
_("Compare the Z-order of the specified object."),
_("Z Order of _PARAM0_ is _PARAM1__PARAM2_"),
_("Z order"),
"res/conditions/planicon24.png",
@@ -391,7 +402,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddCondition("Layer",
_("Compare layer"),
_("Test if the object is on the specified layer."),
_("Check if the object is on the specified layer."),
_("_PARAM0_ is on layer _PARAM1_"),
_("Layer"),
"res/conditions/layer24.png",
@@ -403,7 +414,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddCondition("Visible",
_("Visibility of an object"),
_("Test if an object is not hidden."),
_("Check if an object is visible."),
_("The object _PARAM0_ is visible"),
_("Visibility"),
"res/conditions/visibilite24.png",
@@ -414,7 +425,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddCondition("Invisible",
_("Invisibility of an object"),
_("Test if an object is hidden."),
_("Check if an object is hidden."),
_("_PARAM0_ is hidden"),
_("Visibility"),
"res/conditions/visibilite24.png",
@@ -425,7 +436,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddCondition("Arret",
_("Object is stopped"),
_("Test if an object does not move"),
_("Check if an object is not moving"),
_("_PARAM0_ is stopped"),
_("Movement"),
"res/conditions/arret24.png",
@@ -449,7 +460,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
.SetManipulatedType("number");
obj.AddCondition("AngleOfDisplacement",
_("Angle of moving"),
_("Angle of movement"),
_("Compare the angle of displacement of an object"),
_("Angle of displacement of _PARAM0_ is _PARAM1_ (tolerance : _PARAM2_ degrees)"),
_("Movement"),
@@ -491,7 +502,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddCondition("VarObjetDef",
_("Variable defined"),
_("Test "),
_("Check if the variable is defined."),
_("Variable _PARAM1 of _PARAM0_ is defined"),
_("Variables"),
"res/conditions/var24.png",
@@ -542,7 +553,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddAction("AddForceTourne",
_("Add a force to move around an object"),
_("Add a force to an object to make it rotate around another.\nNote that the movement is not precise, especially if the speed is high.\nTo position an object around a position more precisly, use the actions in category \"Position\"."),
_("Add a force to an object to make it rotate around another.\nNote that the movement is not precise, especially if the speed is high.\nTo position an object around a position more precisely, use the actions in category \"Position\"."),
_("Rotate _PARAM0_ around _PARAM1_ at _PARAM2_ deg/sec and _PARAM3_ pixels away"),
_("Movement"),
"res/actions/forceTourne24.png",
@@ -574,7 +585,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddAction("Rebondir",
_("Move an object away from another"),
_("Move an object away from another, using forces."),
_("Move _PARAM0_ away of _PARAM1_ (only _PARAM0_ will move)"),
_("Move _PARAM0_ away from _PARAM1_ (only _PARAM0_ will move)"),
_("Movement"),
"res/actions/ecarter24.png",
"res/actions/ecarter.png")
@@ -588,7 +599,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddAction("Ecarter",
_("Move an object away from another"),
_("Move an object away from another without using forces."),
_("Move _PARAM0_ away of _PARAM2_ (only _PARAM0_ will move)"),
_("Move _PARAM0_ away from _PARAM2_ (only _PARAM0_ will move)"),
_("Position"),
"res/actions/ecarter24.png",
"res/actions/ecarter.png")
@@ -600,8 +611,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
obj.AddAction("SeparateFromObjects",
_("Separate two objects"),
_("Move an object away from another using their collision masks.\nBe sure to call this action on a reasonable number of objects so as\nnot to slow down the game."),
_("Move _PARAM0_ away of _PARAM1_ (only _PARAM0_ will move)"),
_("Move an object away from another using their collision masks.\nBe sure to call this action on a reasonable number of objects\nto avoid slowing down the game."),
_("Move _PARAM0_ away from _PARAM1_ (only _PARAM0_ will move)"),
_("Position"),
"res/actions/ecarter24.png",
"res/actions/ecarter.png")
@@ -610,6 +621,18 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
.AddParameter("objectList", _("Objects"))
.MarkAsSimple();
obj.AddCondition("CollisionPoint",
_("Point inside object"),
_("Test if a point is inside the object collision masks."),
_("_PARAM1_;_PARAM2_ is inside _PARAM0_"),
_("Collision"),
"res/conditions/collisionPoint24.png",
"res/conditions/collisionPoint.png")
.AddParameter("object", _("Object"))
.AddParameter("expression", _("X position of the point"))
.AddParameter("expression", _("Y position of the point"))
.MarkAsSimple();
obj.AddExpression("X", _("X position"), _("X position of the object"), _("Position"), "res/actions/position.png")
.AddParameter("object", _("Object"));
@@ -693,13 +716,13 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
extension.AddAction("CreateByName",
_("Create an object from its name"),
_("Among the objects of the specified group, the action will create the object with the specified name."),
_("Among the objects of the specified group, this action will create the object with the specified name."),
_("Among objects _PARAM1_, create object named _PARAM2_ at position _PARAM3_;_PARAM4_"),
_("Objects"),
"res/actions/create24.png",
"res/actions/create.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("objectListWithoutPicking", _("Groups containing objects which can be created by the action"))
.AddParameter("objectListWithoutPicking", _("Groups containing objects that can be created by the action"))
.AddParameter("string", _("Text representing the name of the object to create"))
.AddParameter("expression", _("X position"))
.AddParameter("expression", _("Y position"))
@@ -719,7 +742,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
extension.AddAction("AjoutHasard",
_("Pick a random object"),
_("Pick only one object with this name among all"),
_("Pick only one object with this name, among all"),
_("Pick a random _PARAM1_"),
_("Objects"),
"res/actions/ajouthasard24.png",
@@ -729,9 +752,9 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
.MarkAsSimple();
extension.AddAction("MoveObjects",
_("Apply objects movement"),
_("Moves the objects according to the forces they have. GDevelop call this action at the end of the events by default."),
_("Apply objects movement"),
_("Apply movement to all objects"),
_("Moves all objects according to the forces they have. GDevelop calls this action at the end of the events by default."),
_("Apply movement to all objects"),
_("Movement"),
"res/actions/doMove24.png",
"res/actions/doMove.png")
@@ -777,7 +800,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
extension.AddCondition("AjoutHasard",
_("Pick a random object"),
_("Pick only one object with this name among all"),
_("Pick only one object with this name, among all"),
_("Pick a random _PARAM1_"),
_("Objects"),
"res/conditions/ajouthasard24.png",
@@ -814,7 +837,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
extension.AddCondition("CollisionNP", //"CollisionNP" cames from an old condition to test collision between two sprites non precisely.
_("Collision"),
_("Test the collision between two objects using their collision mask.\nNote that some objects may not have a collision mask.\nSome others, like Sprite, provide also more precise collision conditions."),
_("Test the collision between two objects using their collision masks.\nNote that some objects may not have collision masks.\nSome others, like Sprite objects, also provide more precise collision conditions."),
_("_PARAM0_ is in collision with _PARAM1_"),
_("Collision"),
"res/conditions/collision24.png",
@@ -826,7 +849,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(gd:
extension.AddCondition("EstTourne",
_("An object is turned toward another"),
_("Test if an object is turned toward another"),
_("Check if an object is turned toward another"),
_("_PARAM0_ is rotated towards _PARAM1_"),
_("Angle"),
"res/conditions/estTourne24.png",

View File

@@ -14,7 +14,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(gd::Pla
{
extension.SetExtensionInformation("BuiltinCamera",
_("Cameras and layers features"),
_("Builtin camera extension"),
_("Built-in camera extension"),
"Florian Rival",
"Open source (MIT License)");
@@ -36,8 +36,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(gd::Pla
extension.AddCondition("CameraY",
_("Camera center Y position"),
_("Compare the Y position of a the center of a camera."),
_("The Y position of camera _PARAM4_ is _PARAM1__PARAM2_ (layer: _PARAM3_)"),
_("Compare the Y position of the center of a camera."),
_("The Y position of camera _PARAM4_ is _PARAM1__PARAM2_ (layer: _PARAM3_)"),
_("Layers and cameras"),
"res/conditions/camera24.png",
"res/conditions/camera.png")
@@ -51,7 +51,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(gd::Pla
extension.AddAction("CameraX",
_("Camera center X position"),
_("Change X position of the center of the specified camera."),
_("Change the X position of the center of the specified camera."),
_("Do _PARAM1__PARAM2_ to X position of camera _PARAM4_ (layer: _PARAM3_)"),
_("Layers and cameras"),
"res/conditions/camera24.png",
@@ -66,7 +66,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(gd::Pla
extension.AddAction("CameraY",
_("Camera center Y position"),
_("Change Y position of the center of the specified camera."),
_("Change the Y position of the center of the specified camera."),
_("Do _PARAM1__PARAM2_ to Y position of camera _PARAM4_ (layer: _PARAM3_)"),
_("Layers and cameras"),
"res/conditions/camera24.png",
@@ -126,7 +126,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(gd::Pla
extension.AddAction("RotateCamera",
_("Change camera angle"),
_("This action modify the angle of a camera of the specified layer."),
_("This action modifies the angle of a camera in the specified layer."),
_("Do _PARAM1__PARAM2_ to angle of camera (layer: _PARAM3_, camera: _PARAM4_)"),
_("Layers and cameras"),
"res/actions/camera24.png",
@@ -140,7 +140,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(gd::Pla
extension.AddAction("AddCamera",
_("Add a camera to a layer"),
_("This action add a camera to a layer"),
_("This action adds a camera to a layer"),
_("Add a camera to layer _PARAM1_"),
_("Layers and cameras"),
"res/actions/camera24.png",
@@ -169,7 +169,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(gd::Pla
extension.AddAction("CameraSize",
_("Modify the size of a camera"),
_("This action modify the size of a camera of the specified layer. The zoom will be reset."),
_("This action modifies the size of a camera of the specified layer. The zoom will be reset."),
_("Change the size of camera _PARAM2_ of _PARAM1_ to _PARAM3_*_PARAM4_"),
_("Layers and cameras"),
"res/actions/camera24.png",
@@ -183,7 +183,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(gd::Pla
extension.AddAction("CameraViewport",
_("Modify the render zone of a camera"),
_("This action modify the render zone of a camera of the specified layer."),
_("This action modifies the render zone of a camera of the specified layer."),
_("Set the render zone of camera _PARAM2_ from layer _PARAM1_ to _PARAM3_;_PARAM4_ _PARAM5_;_PARAM6_"),
_("Layers and cameras"),
"res/actions/camera24.png",
@@ -265,7 +265,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(gd::Pla
extension.AddCondition("LayerVisible",
_("Visibility of a layer"),
_("Test if a layer is displayed"),
_("Test if a layer is set as visible."),
_("Layer _PARAM1_ is visible"),
_("Layers and cameras"),
"res/conditions/layer24.png",
@@ -290,7 +290,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(gd::Pla
extension.AddCondition("LayerTimeScale",
_("Layer time scale"),
_("Compare the time scale applied on the objects of the layer."),
_("Compare the time scale applied to the objects of the layer."),
_("The time scale of layer _PARAM1_ is _PARAM2__PARAM3_"),
_("Layers and cameras/Time"),
"res/conditions/time24.png",
@@ -304,7 +304,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(gd::Pla
extension.AddAction("ChangeLayerTimeScale",
_("Change layer time scale"),
_("Change the time scale applied on the objects of the layer."),
_("Change the time scale applied to the objects of the layer."),
_("Set time scale of layer _PARAM1_ to _PARAM2_"),
_("Layers and cameras/Time"),
"res/actions/time24.png",

View File

@@ -25,21 +25,21 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCommonConversionsExtens
_("Convert the text to a number"),
_("Conversion"),
"res/conditions/toujours24.png")
.AddParameter("string", _("Text to convert in a number"));
.AddParameter("string", _("Text to convert to a number"));
extension.AddStrExpression("ToString",
_("Number > Text"),
_("Convert the result of the expression in a text"),
_("Convert the result of the expression to text"),
_("Conversion"),
"res/conditions/toujours24.png")
.AddParameter("expression", _("Expression to be converted to a text"));
.AddParameter("expression", _("Expression to be converted to text"));
extension.AddStrExpression("LargeNumberToString",
_("Number > Text ( without scientific notation )"),
_("Convert the result of the expression in a text, without using the scientific notation"),
_("Convert the result of the expression to text, without using the scientific notation"),
_("Conversion"),
"res/conditions/toujours24.png")
.AddParameter("expression", _("Expression to be converted to a text"));
.AddParameter("expression", _("Expression to be converted to text"));
extension.AddExpression("ToRad",
_("Degrees > Radians"),

View File

@@ -22,7 +22,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsExternalLayoutsExtensio
extension.AddAction("CreateObjectsFromExternalLayout",
_("Create objects from an external layout"),
_("Create objects from an external layout."),
_("Create objects from the external layout _PARAM1_"),
_("Create objects from the external layout named _PARAM1_"),
_("External layouts"),
"res/conditions/fichier24.png",
"res/conditions/fichier.png")

View File

@@ -32,7 +32,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsFileExtension(gd::Platf
extension.AddAction("LoadFile",
_("Load a structured file in memory"),
_("This action load the structured file in memory, so as to write and read it.\nYou can open and write without using this action, but it will be slower.\nIf you use this action, do not forget to unload the file from memory.\n\nFor the native platform, the file format is XML."),
_("This action loads the structured file in memory, so you can write and read it.\nYou can open and write without using this action, but it will be slower.\nIf you use this action, do not forget to unload the file from memory.\n\nFor the native platform, the file format is XML."),
_("Load structured file _PARAM0_ in memory"),
_("Storage"),
"res/actions/fichier24.png",
@@ -42,7 +42,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsFileExtension(gd::Platf
extension.AddAction("UnloadFile",
_("Close a structured file"),
_("This action close the structured file previously loaded in memory, saving all changes made."),
_("This action closes the structured file previously loaded in memory, saving all changes made."),
_("Close structured file _PARAM0_"),
_("Storage"),
"res/actions/fichier24.png",
@@ -98,7 +98,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsFileExtension(gd::Platf
extension.AddAction("DeleteGroupFichier",
_("Delete an element"),
_("This action delete the specified element from the structured file.\nSpecify the structure leading to the element using / (example : Root/Level/Current)\nSpaces are forbidden in element names."),
_("This action deletes the specified element from the structured file.\nSpecify the structure leading to the element using / (example : Root/Level/Current)\nSpaces are forbidden in element names."),
_("Delete _PARAM1_ from the file _PARAM0_"),
_("Storage"),
"res/actions/delete24.png",
@@ -127,8 +127,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsFileExtension(gd::Platf
.MarkAsAdvanced();
extension.AddAction("LaunchFile",
_("Open an URL or a file"),
_("This action launch the specified file or URL, in a browser (or in a new tab if the game is using the Web platform and is launched inside a browser)."),
_("Open a URL or a file"),
_("This action launches the specified file or URL, in a browser (or in a new tab if the game is using the Web platform and is launched inside a browser)."),
_("Open URL (or file) _PARAM0_"),
_("Files"),
"res/actions/launchFile24.png",
@@ -138,7 +138,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsFileExtension(gd::Platf
extension.AddAction("ExecuteCmd",
_("Execute a command"),
_("This action execute the specified command."),
_("This action executes the specified command."),
_("Execute _PARAM0_"),
_("Files"),
"res/actions/launchFile24.png",

View File

@@ -14,14 +14,14 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsJoystickExtension(gd::P
{
extension.SetExtensionInformation("BuiltinJoystick",
_("Joysticks features"),
_("Built-in extension allowing to use joysticks"),
_("Built-in extension that enables the use of joysticks"),
"Florian Rival",
"Open source (MIT License)");
#if defined(GD_IDE_ONLY)
extension.AddCondition("JoystickButtonDown",
_("A button of a joystick is pressed"),
_("Test if a button of a joystick is pressed."),
_("A button on a joystick is pressed"),
_("Test if a button on a joystick is pressed."),
_("The button _PARAM2_ of joystick _PARAM1_ is pressed"),
_("Joystick"),
"res/conditions/joystick24.png",
@@ -46,7 +46,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsJoystickExtension(gd::P
extension.AddAction("GetJoystickAxis",
_("Get the value of the axis of a joystick"),
_("Save in the variable the value of the axis of the joystick (from -100 to 100)."),
_("Save the value of the axis of the joystick (from -100 to 100)."),
_("Save in _PARAM3_ the value of axis _PARAM2_ of joystick _PARAM1_"),
_("Joystick"),
"res/actions/joystick24.png",
@@ -54,7 +54,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsJoystickExtension(gd::P
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("expression", _("Joystick number (first joystick: 0)"))
.AddParameter("joyaxis", _("Axis"))
.AddParameter("scenevar", _("Save result to scene variable"))
.AddParameter("scenevar", _("Save the result to the scene variable"))
.SetManipulatedType("number");
extension.AddExpression("GetJoystickAxis",

View File

@@ -14,7 +14,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsKeyboardExtension(gd::P
{
extension.SetExtensionInformation("BuiltinKeyboard",
_("Keyboard features"),
_("Built-in extension allowing to use keyboard"),
_("Built-in extension that enables the use of a keyboard"),
"Florian Rival",
"Open source (MIT License)");

View File

@@ -14,7 +14,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsMouseExtension(gd::Plat
{
extension.SetExtensionInformation("BuiltinMouse",
_("Mouse features"),
_("Built-in extension allowing to use the mouse"),
_("Built-in extension that enables the use of a mouse"),
"Florian Rival",
"Open source (MIT License)");
@@ -34,8 +34,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsMouseExtension(gd::Plat
.MarkAsSimple();
extension.AddAction("TouchSimulateMouse",
_("De/activate moving mouse cursor with touches"),
_("When activated, any touch made on a touchscreen will also move the mouse cursor. When deactivated, mouse and touch positions will be completely independant.\nBy default, this is activated so that you can simply use the mouse conditions to also support touchscreens. If you want to have multitouch and differentiate mouse and touches, just deactivate it with this action."),
_("De/activate moving the mouse cursor with touches"),
_("When activated, any touch made on a touchscreen will also move the mouse cursor. When deactivated, mouse and touch positions will be completely independent.\nBy default, this is activated so that you can simply use the mouse conditions to also support touchscreens. If you want to have multitouch and differentiate mouse movement and touches, just deactivate it with this action."),
_("Move mouse cursor when touching screen: _PARAM1_"),
_("Mouse and touch"),
"res/conditions/touch24.png",
@@ -141,8 +141,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsMouseExtension(gd::Plat
.SetManipulatedType("number");
extension.AddCondition("SourisBouton",
_("Mouse button down or touch held"),
_("Return true if the specified button of the mouse is down or if any touch is in contact with the screen."),
_("Mouse button pressed or touch held"),
_("Return true if the specified mouse button is pressed or if a touch is in contact with the screen."),
_("Touch or _PARAM1_ mouse button is down"),
_("Mouse and touch"),
"res/conditions/mouse24.png",
@@ -153,7 +153,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsMouseExtension(gd::Plat
extension.AddCondition("MouseButtonReleased",
_("Mouse button released"),
_("Return true if the specified button of the mouse was released."),
_("Return true if the specified mouse button was released."),
_("_PARAM1_ mouse button was released"),
_("Mouse and touch"),
"res/conditions/mouse24.png",
@@ -194,7 +194,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsMouseExtension(gd::Plat
extension.AddCondition("PopStartedTouch",
_("A new touch has started"),
_("Return true if a touch has started. The touch identifier can be accessed using LastTouchId().\nAs more than one touch can have started, this condition is only true once for each touch: the next time you use it, it will be for a new touch or it will return false if there is no more touch that just started."),
_("Return true if a touch has started. The touch identifier can be accessed using LastTouchId().\nAs more than one touch can be started, this condition is only true once for each touch: the next time you use it, it will be for a new touch, or it will return false if no more touches have just started."),
_("A new touch has started"),
_("Mouse and touch/Multitouch"),
"res/conditions/touch24.png",
@@ -203,7 +203,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsMouseExtension(gd::Plat
extension.AddCondition("PopEndedTouch",
_("A touch has ended"),
_("Return true if a touch has ended. The touch identifier can be accessed using LastEndedTouchId().\nAs more than one touch can have ended, this condition is only true once for each touch: the next time you use it, it will be for a new touch or it will return false if there is no more touch that just ended."),
_("Return true if a touch has ended. The touch identifier can be accessed using LastEndedTouchId().\nAs more than one touch can be ended, this condition is only true once for each touch: the next time you use it, it will be for a new touch, or it will return false if no more touches have just ended."),
_("A touch has ended"),
_("Mouse and touch/Multitouch"),
"res/conditions/touch24.png",

View File

@@ -20,9 +20,9 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsNetworkExtension(gd::Pl
#if defined(GD_IDE_ONLY)
extension.AddAction("EnvoiDataNet",
_("Send datas to a website"),
_("Send datas to a specified web site.\nYou need to set up a .php page on your web site so as to receive this datas.\nEnter here a password, and enter the same in the configuration of your .php page.\nRead the help file to get more informations."),
_("Send to _PARAM0_ the following datas : _PARAM2_, _PARAM3_,_PARAM4_,_PARAM5_,_PARAM6_,_PARAM7_"),
_("Send data to a website"),
_("Send data to a specified web site.\nYou need to set up a .php page on your web site to receive this data.\nEnter a password here, and enter the same password in the configuration of your .php page.\nRead the help file to get more information."),
_("Send to _PARAM0_ the following data : _PARAM2_, _PARAM3_,_PARAM4_,_PARAM5_,_PARAM6_,_PARAM7_"),
_("Network"),
"res/actions/net24.png",
"res/actions/net.png")
@@ -63,7 +63,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsNetworkExtension(gd::Pl
.AddParameter("string", _("Save as"));
extension.AddAction("JSONToVariableStructure",
_("Convert JSON to variable"),
_("Convert JSON to a variable"),
_("Parse a JSON object and store it into a variable"),
_("Parse JSON string _PARAM0_ and store it into variable _PARAM1_"),
_("Network"),
@@ -73,12 +73,50 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsNetworkExtension(gd::Pl
.AddParameter("scenevar", _("Variable where store the JSON object"))
.MarkAsAdvanced();
extension.AddAction("JSONToGlobalVariableStructure",
_("Convert JSON to global variable"),
_("Parse a JSON object and store it into a global variable"),
_("Parse JSON string _PARAM0_ and store it into global variable _PARAM1_"),
_("Network"),
"res/actions/net24.png",
"res/actions/net.png")
.AddParameter("string", _("JSON string"))
.AddParameter("globalvar", _("Global variable where store the JSON object"))
.MarkAsAdvanced();
extension.AddAction("JSONToObjectVariableStructure",
_("Convert JSON to object variable"),
_("Parse a JSON object and store it into an object variable"),
_("Parse JSON string _PARAM0_ and store it into variable _PARAM2_ of _PARAM1_"),
_("Network"),
"res/actions/net24.png",
"res/actions/net.png")
.AddParameter("string", _("JSON string"))
.AddParameter("objectPtr", _("Object"))
.AddParameter("objectvar", _("Object variable where store the JSON object"))
.MarkAsAdvanced();
extension.AddStrExpression("ToJSON",
_("Convert to JSON"),
_("Convert variable to JSON"),
_("Convert a variable to JSON"),
_("Conversion"),
"res/conditions/toujours24.png")
.AddParameter("scenevar", _("The variable to be stringify"));
.AddParameter("scenevar", _("The variable to be stringified"));
extension.AddStrExpression("GlobalVarToJSON",
_("Convert global variable to JSON"),
_("Convert a global variable to JSON"),
_("Conversion"),
"res/conditions/toujours24.png")
.AddParameter("globalvar", _("The global variable to be stringified"));
extension.AddStrExpression("ObjectVarToJSON",
_("Convert object variable to JSON"),
_("Convert an object variable to JSON"),
_("Conversion"),
"res/conditions/toujours24.png")
.AddParameter("objectPtr", _("The object with the variable"))
.AddParameter("objectvar", _("The object variable to be stringified"));
#endif
}

View File

@@ -14,7 +14,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension(gd::Plat
{
extension.SetExtensionInformation("BuiltinScene",
_("Scene management features"),
_("Built-in extension allowing to manipulate scenes"),
_("This Built-in extension allows you to manipulate scenes"),
"Florian Rival",
"Open source (MIT License)");
@@ -50,7 +50,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension(gd::Plat
extension.AddAction("PushScene",
_("Pause and start a new scene"),
_("Pause this scene and start the specified one.\nLater, you can use \"Stop and go back to previous scene\" action to go back to this scene."),
_("Pause this scene and start the specified one.\nLater, you can use the \"Stop and go back to previous scene\" action to go back to this scene."),
_("Pause the scene and start _PARAM1_"),
_("Scene"),
"res/actions/pushScene24.png",
@@ -61,7 +61,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension(gd::Plat
extension.AddAction("PopScene",
_("Stop and go back to previous scene"),
_("Stop this scene and go back to the previous paused one.\nTo pause a scene, use \"Pause and start a new scene\" action."),
_("Stop this scene and go back to the previous paused one.\nTo pause a scene, use the \"Pause and start a new scene\" action."),
_("Stop the scene and go back to the previous paused one"),
_("Scene"),
"res/actions/popScene24.png",
@@ -92,7 +92,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension(gd::Plat
extension.AddAction("DisableInputWhenFocusIsLost",
_("Disable input when focus is lost"),
_("Set if the keyboard and mouse buttons must be taken into account even\nif the window is not active."),
_("Decide if the keyboard and mouse buttons must be taken into account even\nif the window is not active."),
_("Disable input when focus is lost: _PARAM1_"),
_("Scene"),
"res/actions/window24.png",
@@ -103,7 +103,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension(gd::Plat
extension.AddCondition("Egal",
_("Compare two expressions"),
_("Test the two expression"),
_("Test the two expressions"),
_("_PARAM0_ _PARAM1_ _PARAM2_"),
_("Other"),
"res/conditions/egal24.png",

View File

@@ -62,6 +62,16 @@ void Direction::SwapSprites(std::size_t firstSpriteIndex, std::size_t secondSpri
swap(sprites[firstSpriteIndex], sprites[secondSpriteIndex]);
}
void Direction::MoveSprite(std::size_t oldIndex, std::size_t newIndex)
{
if ( oldIndex >= sprites.size() || newIndex >= sprites.size())
return;
auto sprite = sprites[oldIndex];
sprites.erase(sprites.begin() + oldIndex);
sprites.insert(sprites.begin() + newIndex, sprite);
}
bool Direction::HasNoSprites() const
{
return sprites.empty();

View File

@@ -95,6 +95,11 @@ public:
*/
void SwapSprites(std::size_t firstSpriteIndex, std::size_t secondSpriteIndex);
/**
* Change the position of the specified sprite.
*/
void MoveSprite(std::size_t oldIndex, std::size_t newIndex);
void UnserializeFrom(const gd::SerializerElement & element);
#if defined(GD_IDE_ONLY)
void SerializeTo(gd::SerializerElement & element) const;

View File

@@ -131,7 +131,7 @@ public:
* \warning If the image has not been loaded (using LoadImage) and the center point is set as automatic,
* the returned point won't be correct.
*/
inline Point & GetCenter() { automaticCentre = false; return centre; }
inline Point & GetCenter() { return centre; }
/**
* \brief Return true if the center point is automatically computed.

View File

@@ -47,6 +47,7 @@ void SpriteObject::DoUnserializeFrom(gd::Project & project, const gd::Serializer
{
updateIfNotVisible = element.GetBoolAttribute("updateIfNotVisible", true);
RemoveAllAnimations();
const gd::SerializerElement & animationsElement = element.GetChild("animations", 0, "Animations");
animationsElement.ConsiderAsArrayOf("animation", "Animation");
for (std::size_t i = 0; i < animationsElement.GetChildrenCount(); ++i)
@@ -315,4 +316,14 @@ void SpriteObject::SwapAnimations(std::size_t firstIndex, std::size_t secondInde
std::swap(animations[firstIndex], animations[secondIndex]);
}
void SpriteObject::MoveAnimation(std::size_t oldIndex, std::size_t newIndex)
{
if ( oldIndex >= animations.size() || newIndex >= animations.size())
return;
auto animation = animations[oldIndex];
animations.erase(animations.begin() + oldIndex);
animations.insert(animations.begin() + newIndex, animation);
}
}

View File

@@ -112,6 +112,11 @@ public :
*/
void SwapAnimations(std::size_t firstIndex, std::size_t secondIndex);
/**
* \brief Change the position of the specified animation
*/
void MoveAnimation(std::size_t oldIndex, std::size_t newIndex);
/**
* \brief Return a read-only reference to the vector containing all the animation of the object.
*/

View File

@@ -14,7 +14,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExten
{
extension.SetExtensionInformation("BuiltinStringInstructions",
_("Text manipulation"),
_("Built-in extension providing expressions for manipulating texts."),
_("Built-in extension providing expressions for manipulating text objects."),
"Florian Rival",
"Open source (MIT License)");
@@ -22,13 +22,13 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExten
extension.AddStrExpression("NewLine",
_("Insert a new line"),
_("Insert a new line"),
_("Manipulation on text"),
_("Manipulation of text"),
"res/conditions/toujours24.png");
extension.AddStrExpression("FromCodePoint",
_("Get character from code point"),
_("Get character from code point"),
_("Manipulation on text"),
_("Manipulation of text"),
"res/conditions/toujours24.png")
.AddParameter("expression", _("Code point"));
@@ -36,7 +36,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExten
extension.AddStrExpression("ToUpperCase",
_("Uppercase a text"),
_("Uppercase a text"),
_("Manipulation on text"),
_("Manipulation of text"),
"res/conditions/toujours24.png")
.AddParameter("string", _("Text"));
@@ -44,7 +44,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExten
extension.AddStrExpression("ToLowerCase",
_("Lowercase a text"),
_("Lowercase a text"),
_("Manipulation on text"),
_("Manipulation of text"),
"res/conditions/toujours24.png")
.AddParameter("string", _("Text"));
@@ -52,7 +52,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExten
extension.AddStrExpression("SubStr",
_("Get a portion of a text"),
_("Get a portion of a text"),
_("Manipulation on text"),
_("Manipulation of text"),
"res/conditions/toujours24.png")
.AddParameter("string", _("Text"))
@@ -62,7 +62,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExten
extension.AddStrExpression("StrAt",
_("Get a character from a text"),
_("Get a character from a text"),
_("Manipulation on text"),
_("Manipulation of text"),
"res/conditions/toujours24.png")
.AddParameter("string", _("Text"))
@@ -71,7 +71,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExten
extension.AddStrExpression("StrRepeat",
_("Repeat a text"),
_("Repeat a text"),
_("Manipulation on text"),
_("Manipulation of text"),
"res/conditions/toujours24.png")
.AddParameter("string", _("Text to repeat"))
@@ -80,7 +80,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExten
extension.AddExpression("StrLength",
_("Length of a text"),
_("Length of a text"),
_("Manipulation on text"),
_("Manipulation of text"),
"res/conditions/toujours24.png")
.AddParameter("string", _("Text"));
@@ -89,7 +89,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExten
extension.AddExpression("StrFind",
_("Search in a text"),
_("Search in a text (return the position of the result or -1 if not found)"),
_("Manipulation on text"),
_("Manipulation of text"),
"res/conditions/toujours24.png")
.AddParameter("string", _("Text"))
@@ -97,9 +97,9 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExten
extension.AddExpression("StrRFind",
_("Search in a text from end"),
_("Search in a text from the end"),
_("Search in a text from the end (return the position of the result or -1 if not found)"),
_("Manipulation on text"),
_("Manipulation of text"),
"res/conditions/toujours24.png")
.AddParameter("string", _("Text"))
@@ -109,8 +109,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExten
extension.AddExpression("StrFindFrom",
_("Search in a text, starting from a position"),
_("Search in a text starting from a position (return the position of the result or -1 if not found)"),
_("Manipulation on text"),
_("Search in a text, starting from a position (return the position of the result or -1 if not found)"),
_("Manipulation of text"),
"res/conditions/toujours24.png")
.AddParameter("string", _("Text"))
@@ -122,7 +122,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExten
extension.AddExpression("StrRFindFrom",
_("Search in a text from the end, starting from a position"),
_("Search in a text from the end, starting from a position (return the position of the result or -1 if not found)"),
_("Manipulation on text"),
_("Manipulation of text"),
"res/conditions/toujours24.png")
.AddParameter("string", _("Text"))

View File

@@ -14,7 +14,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsTimeExtension(gd::Platf
{
extension.SetExtensionInformation("BuiltinTime",
_("Time"),
_("Built-in extension providing actions and conditions about the time."),
_("Built-in extension providing actions and conditions related to time."),
"Florian Rival",
"Open source (MIT License)");
@@ -146,7 +146,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsTimeExtension(gd::Platf
extension.AddExpression("Time", _("Current time"), _("Current time"), _("Time"), "res/actions/time.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("", _("Hour : hour\nMinutes : min\nSeconds : sec\nDay in the month : mday\nMonths since January : mon\nYear since 1900 : year\nDays since sunday :wday\nDays since January 1st : yday"));
.AddParameter("", _("Hour : hour\nMinutes : min\nSeconds : sec\nDay of the month : mday\nMonths since January : mon\nYear since 1900 : year\nDays since sunday :wday\nDays since January 1st : yday"));
#endif
}

View File

@@ -14,7 +14,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsVariablesExtension(gd::
{
extension.SetExtensionInformation("BuiltinVariables",
_("Variable features"),
_("Built-in extension allowing to manipulate variables"),
_("This Built-in extension allows the manipulation of variables"),
"Florian Rival",
"Open source (MIT License)");
@@ -186,10 +186,30 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsVariablesExtension(gd::
.AddParameter("string", _("Child's name"))
.MarkAsAdvanced();
extension.AddExpression("GlobalVariableChildCount", _("Global variable number of children"), _("Get the number of children from global variable"), _("Variables"), "res/actions/var.png")
extension.AddAction("VariableClearChildren",
_("Clear variable"),
_("Remove all the children from the variable."),
_("Clear children from variable _PARAM0_"),
_("Variables/Structure"),
"res/actions/var24.png",
"res/actions/var.png")
.AddParameter("scenevar", _("Variable"))
.MarkAsAdvanced();
extension.AddAction("GlobalVariableClearChildren",
_("Clear global variable"),
_("Remove all the children from the global variable."),
_("Clear children from global variable _PARAM0_"),
_("Variables/Global variables/Structure"),
"res/actions/var24.png",
"res/actions/var.png")
.AddParameter("globalvar", _("Variable"))
.MarkAsAdvanced();
extension.AddExpression("GlobalVariableChildCount", _("Global variable number of children"), _("Get the number of children of a global variable"), _("Variables"), "res/actions/var.png")
.AddParameter("globalvar", _("Variable"));
extension.AddExpression("VariableChildCount", _("Scene variable number of children"), _("Get the number of children from scene variable"), _("Variables"), "res/actions/var.png")
extension.AddExpression("VariableChildCount", _("Scene variable number of children"), _("Get the number of children of a scene variable"), _("Variables"), "res/actions/var.png")
.AddParameter("scenevar", _("Variable"));
extension.AddExpression("Variable", _("Scene variables"), _("Scene variables"), _("Variables"), "res/actions/var.png")

View File

@@ -14,14 +14,14 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsWindowExtension(gd::Pla
{
extension.SetExtensionInformation("BuiltinWindow",
_("Window features"),
_("Built-in extension allowing to manipulate the game's window"),
_("This Built-in extension enables the manipulation of the game's window"),
"Florian Rival",
"Open source (MIT License)");
#if defined(GD_IDE_ONLY)
extension.AddAction("SetFullScreen",
_("De/activate fullscreen"),
_("This action activate or desactivate fullscreen."),
_("This action activates or deactivates fullscreen."),
_("Activate fullscreen: _PARAM1_ (keep aspect ratio: _PARAM2_)"),
_("Game's window"),
"res/actions/fullscreen24.png",
@@ -31,8 +31,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsWindowExtension(gd::Pla
.AddParameter("yesorno", _("Keep aspect ratio (HTML5 games only, yes by default)"), "",true).SetDefaultValue("yes");
extension.AddAction("SetWindowMargins",
_("Change window's margins"),
_("This action change the margins, in pixels, of the game's window."),
_("Change the window's margins"),
_("This action changes the margins, in pixels, of the game's window."),
_("Set margins of game window to _PARAM1_;_PARAM2_;_PARAM3_;_PARAM4_"),
_("Game's window"),
"res/actions/window24.png",
@@ -44,8 +44,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsWindowExtension(gd::Pla
.AddParameter("expression", _("Left"));
extension.AddAction("SetWindowSize",
_("Change the size of the screen"),
_("This action change the size of the game window."),
_("Change the size of the window"),
_("This action changes the size of the game's window."),
_("Change window size: _PARAM1_x_PARAM2_"),
_("Game's window"),
"res/actions/window24.png",
@@ -53,12 +53,12 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsWindowExtension(gd::Pla
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("expression", _("Width"))
.AddParameter("expression", _("Height"))
.AddParameter("yesorno", _("Use this size as default size for new scene cameras\?\n(Yes to change extend the game area, No to stretch the game to the window's size)."));
.AddParameter("yesorno", _("Do you want to use this size as the default size for new scene cameras\?\n(Yes to change the size of the game's viewable area,\nNo to stretch the game to the window's size)."));
extension.AddAction("SetWindowIcon",
_("Change window's icon"),
_("This action change the icon of the game's window."),
_("Use _PARAM1_ as icon for the game's window."),
_("Change the window's icon"),
_("This action changes the icon of the game's window."),
_("Use _PARAM1_ as the icon for the game's window."),
_("Game's window"),
"res/actions/window24.png",
"res/actions/window.png")
@@ -66,8 +66,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsWindowExtension(gd::Pla
.AddParameter("string", _("Name of the image to be used as the icon"));
extension.AddAction("SetWindowTitle",
_("Change window's title"),
_("This action change the title of the game window."),
_("Change the window's title"),
_("This action changes the title of the game's window."),
_("Change window title to _PARAM1_"),
_("Game's window"),
"res/actions/window24.png",

View File

@@ -32,15 +32,18 @@ ObjectMetadata::ObjectMetadata(const gd::String & extensionNamespace_,
SetDescription(gd::String(informations_));
iconFilename = icon24x24;
#if !defined(GD_NO_WX_GUI)
if ( gd::SkinHelper::IconExists(icon24x24, 24) )
SetBitmapIcon(gd::SkinHelper::GetIcon(icon24x24, 24));
else if ( wxFile::Exists(icon24x24) )
SetBitmapIcon(wxBitmap(icon24x24, wxBITMAP_TYPE_ANY));
else {
std::cout << "Warning: The icon file for object \"" << name_
<< " was not found in the current skin icons"
<< " and the specified name is not an existing filename.";
SetBitmapIcon(wxBitmap(24,24));
if (!iconFilename.empty())
{
if ( gd::SkinHelper::IconExists(icon24x24, 24) )
SetBitmapIcon(gd::SkinHelper::GetIcon(icon24x24, 24));
else if ( wxFile::Exists(icon24x24) )
SetBitmapIcon(wxBitmap(icon24x24, wxBITMAP_TYPE_ANY));
else {
std::cout << "Warning: The icon file for object \"" << name_
<< " was not found in the current skin icons"
<< " and the specified name is not an existing filename.";
SetBitmapIcon(wxBitmap(24,24));
}
}
#endif
#endif

View File

@@ -23,7 +23,7 @@ gd::ObjectMetadata & PlatformExtension::AddObject(const gd::String & name,
GetNameSpace(),
nameWithNamespace,
fullname,
informations,
description,
icon24x24,
[](gd::String name) -> std::unique_ptr<gd::Object> { return gd::make_unique<T>(name); }
);

View File

@@ -147,6 +147,8 @@ std::vector<gd::String> NativeFileSystem::ReadDir(const gd::String & path, const
bool NativeFileSystem::CopyFile(const gd::String & file, const gd::String & destination)
{
if (file == destination) return true; //No copy needed
wxLogNull noLogPlease;
return wxCopyFile( file, destination, true );
}

View File

@@ -1,3 +1,9 @@
/*
* GDevelop Core
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights reserved.
* This project is released under the MIT License.
*/
#if defined(GD_IDE_ONLY)
#include <algorithm>
#include "GDCore/Events/EventsList.h"
@@ -7,7 +13,6 @@
#include "GDCore/Project/Project.h"
#include "GDCore/Project/SourceFile.h"
#include "GDCore/Events/Builtin/LinkEvent.h"
#include "GDCpp/Events/Builtin/CppCodeEvent.h"
#include "DependenciesAnalyzer.h"
DependenciesAnalyzer::DependenciesAnalyzer(gd::Project & project_, gd::Layout & layout_) :
@@ -54,12 +59,12 @@ bool DependenciesAnalyzer::Analyze(gd::EventsList & events, bool isOnTopLevel)
{
for (unsigned int i = 0;i<events.size();++i)
{
try {
gd::LinkEvent & linkEvent = dynamic_cast<gd::LinkEvent &>(events[i]);
gd::LinkEvent* linkEvent = dynamic_cast<gd::LinkEvent*>(&events[i]);
if (linkEvent)
{
DependenciesAnalyzer analyzer(*this);
gd::String linked = linkEvent.GetTarget();
gd::String linked = linkEvent->GetTarget();
if ( project.HasExternalEventsNamed(linked) )
{
if ( std::find(parentExternalEvents.begin(), parentExternalEvents.end(), linked) != parentExternalEvents.end() )
@@ -96,16 +101,16 @@ bool DependenciesAnalyzer::Analyze(gd::EventsList & events, bool isOnTopLevel)
notTopLevelScenesDependencies.insert(analyzer.GetScenesDependencies().begin(), analyzer.GetScenesDependencies().end());
notTopLevelExternalEventsDependencies.insert(analyzer.GetExternalEventsDependencies().begin(), analyzer.GetExternalEventsDependencies().end());
}
} catch(...) {}
}
try {
CppCodeEvent & cppCodeEvent = dynamic_cast<CppCodeEvent &>(events[i]);
// Search for source files dependencies
std::vector<gd::String> dependencies = events[i].GetSourceFileDependencies();
sourceFilesDependencies.insert(dependencies.begin(), dependencies.end());
const std::vector<gd::String> & dependencies = cppCodeEvent.GetDependencies();
sourceFilesDependencies.insert(dependencies.begin(), dependencies.end());
sourceFilesDependencies.insert(cppCodeEvent.GetAssociatedGDManagedSourceFile(project));
} catch(...) {}
const gd::String & associatedSourceFile = events[i].GetAssociatedGDManagedSourceFile(project);
if (!associatedSourceFile.empty()) sourceFilesDependencies.insert(associatedSourceFile);
// Analyze sub events dependencies
if ( events[i].CanHaveSubEvents() )
{
if ( !Analyze(events[i].GetSubEvents(), false) )

View File

@@ -1,5 +1,5 @@
/*
* GDevelop C++ Platform
* GDevelop Core
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights reserved.
* This project is released under the MIT License.
*/
@@ -10,7 +10,7 @@
#include <string>
#include <vector>
#include <memory>
#include "GDCpp/Runtime/String.h"
#include "GDCore/String.h"
namespace gd { class EventsList; }
namespace gd { class BaseEvent; }
namespace gd { class Project; }
@@ -20,7 +20,7 @@ namespace gd { class ExternalEvents; }
/**
* \brief Compute the dependencies of a scene or external events.
*/
class DependenciesAnalyzer
class GD_CORE_API DependenciesAnalyzer
{
public:

View File

@@ -146,7 +146,7 @@ ChooseVariableDialog::ChooseVariableDialog(wxWindow* parent, gd::VariablesContai
toolbar->SetToolBitmapSize( wxSize( 16, 16 ) );
toolbar->AddTool( idAddVar, _( "Add a variable" ), gd::SkinHelper::GetIcon("add", 16), _("Add a variable") );
toolbar->AddTool( idEditVar, _( "Edit the initial value of the variable" ), gd::SkinHelper::GetIcon("edit", 16), _("Edit the initial value of the variable") );
toolbar->AddTool( idRenameVar, _( "Rename variable" ), gd::SkinHelper::GetIcon("editname", 16), _("Rename variable") );
toolbar->AddTool( idRenameVar, _( "Rename the variable" ), gd::SkinHelper::GetIcon("editname", 16), _("Rename the variable") );
toolbar->AddTool( idDelVar, _( "Delete the selected variable" ), gd::SkinHelper::GetIcon("delete", 16), _("Delete the selected variable") );
toolbar->AddSeparator();
toolbar->AddTool( idMoveUpVar, _( "Move up" ), gd::SkinHelper::GetIcon("up", 16), _("Move up") );

View File

@@ -477,8 +477,8 @@ void EditExpressionDialog::TextModified(wxStyledTextEvent& event)
gd::ExpressionParser expressionParser(expression);
if ( !expressionParser.ParseMathExpression(project.GetCurrentPlatform(), project, layout, callbacks) )
{
errorTxt->SetLabel(expressionParser.firstErrorStr);
lastErrorPos = expressionParser.firstErrorPos;
errorTxt->SetLabel(expressionParser.GetFirstError());
lastErrorPos = expressionParser.GetFirstErrorPosition();
}
else
{

View File

@@ -516,8 +516,8 @@ void EditStrExpressionDialog::TextModified(wxStyledTextEvent& event)
gd::ExpressionParser expressionParser(text);
if ( !expressionParser.ParseStringExpression(project.GetCurrentPlatform(), project, layout, callbacks) )
{
errorTxt->SetLabel(expressionParser.firstErrorStr);
lastErrorPos = expressionParser.firstErrorPos;
errorTxt->SetLabel(expressionParser.GetFirstError());
lastErrorPos = expressionParser.GetFirstErrorPosition();
}
else
{

View File

@@ -11,6 +11,8 @@
#include <wx/dcclient.h>
#include <wx/dcmemory.h>
#include <wx/renderer.h>
#include "GDCore/String.h"
#include "GDCore/Events/InstructionsList.h"
#include "GDCore/Events/Instruction.h"
#include "GDCore/Extensions/Platform.h"
#include "GDCore/Extensions/Metadata/MetadataProvider.h"

View File

@@ -10,7 +10,7 @@
#include <wx/html/htmprint.h>
#include <vector>
#include "GDCore/Events/InstructionsList.h"
namespace gd { class String; }
namespace gd { class BaseEvent; }
namespace gd { class Instruction; }
namespace gd { class Platform; }

View File

@@ -42,7 +42,7 @@ bool ExternalEditor::Launch(const gd::String & editorName, const gd::String edit
String cmd = GetExternalGDevelopIDEExecutable();
// Uncomment and adapt to launch a local development version of the GDevelop IDE:
// cmd = "/Users/florian/Projects/F/GD/newIDE/electron-app/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron /Users/florian/Projects/F/GD/newIDE/electron-app/app";
cmd = "/Users/florian/Projects/F/GD/newIDE/electron-app/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron /Users/florian/Projects/F/GD/newIDE/electron-app/app";
cmd += " --mode=integrated";
if (editorName != "") cmd += " --editor " + editorName;

View File

@@ -207,7 +207,7 @@ private:
// CPU usage while waiting for messages.
// Note that this is not done if a message was received, as
// other chunks could be received just after.
sf::sleep(sf::milliseconds(75));
sf::sleep(sf::milliseconds(150));
}
//Send messages

View File

@@ -494,7 +494,7 @@ void LayoutEditorCanvas::LaunchPreview()
void LayoutEditorCanvas::OnEditionBtClick( wxCommandEvent & event )
{
if ( editing ) return;
std::cout << "Switching to edition mode..." << std::endl;
std::cout << "Switching to editing mode..." << std::endl;
editing = true;
//Notice the previewer it must stop preview.
@@ -1127,7 +1127,7 @@ void LayoutEditorCanvas::OnMotion(wxMouseEvent &)
double mouseX = GetMouseXOnLayout();
double mouseY = GetMouseYOnLayout();
gd::LogStatus( wxString::Format( wxString(_( "Position %f;%f. SHIFT for multiple selection, right click for more options." )),
gd::LogStatus( wxString::Format( wxString(_( "Position %f;%f. Hold SHIFT to select multiple items, and right-click for more options." )),
mouseX, mouseY ));
//Check if there is a gui element hovered inside the layout
@@ -1253,6 +1253,24 @@ void LayoutEditorCanvas::OnKey( wxKeyEvent& evt )
eventIsOnlyForMe = true;
}
else if ( evt.GetModifiers() == wxMOD_CMD ) //Ctrl-xxx
{
switch ( evt.GetKeyCode() )
{
case 89: //Ctrl-Y
{
Redo();
break;
}
case 90: //Ctrl-Z
{
Undo();
break;
}
default:
break;
}
}
if (eventIsOnlyForMe)
evt.StopPropagation();

View File

@@ -6,6 +6,7 @@
#if defined(GD_IDE_ONLY)
#include "ObjectListDialogsHelper.h"
#include "GDCore/Project/Project.h"
#include "GDCore/Project/ObjectGroupsContainer.h"
#include "GDCore/Project/Layout.h"
#include "GDCore/Project/Object.h"
#include "GDCore/CommonTools.h"
@@ -133,7 +134,7 @@ wxTreeItemId ObjectListDialogsHelper::AddObjectsToList(wxTreeCtrl * objectsList,
return lastAddedItem;
}
wxTreeItemId ObjectListDialogsHelper::AddGroupsToList(wxTreeCtrl * objectsList, wxTreeItemId rootItem, const std::vector <ObjectGroup> & groups, bool globalGroups)
wxTreeItemId ObjectListDialogsHelper::AddGroupsToList(wxTreeCtrl * objectsList, wxTreeItemId rootItem, const gd::ObjectGroupsContainer & groups, bool globalGroups)
{
bool searching = searchText.empty() ? false : true;

View File

@@ -14,6 +14,7 @@ namespace gd { class Project; }
namespace gd { class Layout; }
namespace gd { class Object; }
namespace gd { class ClassWithObjects; }
namespace gd { class ObjectGroupsContainer; }
namespace gd { class ObjectGroup; }
class wxTreeCtrl;
class wxTreeItemId;
@@ -109,7 +110,7 @@ public:
private:
#if !defined(GD_NO_WX_GUI)
wxTreeItemId AddObjectsToList(wxTreeCtrl * tree, wxTreeItemId rootItem, const gd::ClassWithObjects & objects, bool globalObjects);
wxTreeItemId AddGroupsToList(wxTreeCtrl * tree, wxTreeItemId rootItem, const std::vector <gd::ObjectGroup> & groups, bool globalGroup);
wxTreeItemId AddGroupsToList(wxTreeCtrl * tree, wxTreeItemId rootItem, const gd::ObjectGroupsContainer & groups, bool globalGroup);
/**
* \brief Generate the thumnail for the specified object, add it to the image list of the

View File

@@ -103,7 +103,7 @@ ProjectExtensionsDialog::ProjectExtensionsDialog(wxWindow* parent, gd::Project &
FlexGridSizer6->AddGrowableCol(0);
platformList = new wxListCtrl(this, ID_LISTCTRL1, wxDefaultPosition, wxSize(713,106), wxLC_REPORT|wxLC_NO_HEADER, wxDefaultValidator, _T("ID_LISTCTRL1"));
FlexGridSizer6->Add(platformList, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("Right click to add or remove a platform.\nPlatforms which are not used by the project are grayed."), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT, _T("ID_STATICTEXT1"));
StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("Right-click to add or remove a platform.\nPlatforms that are not used by the project are grayed."), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT, _T("ID_STATICTEXT1"));
FlexGridSizer6->Add(StaticText1, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
FlexGridSizer1->Add(FlexGridSizer6, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
FlexGridSizer12 = new wxFlexGridSizer(0, 3, 0, 0);
@@ -171,9 +171,9 @@ ProjectExtensionsDialog::ProjectExtensionsDialog(wxWindow* parent, gd::Project &
FlexGridSizer3->Add(-1,-1,1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
StaticBoxSizer3 = new wxStaticBoxSizer(wxHORIZONTAL, this, _("More extensions"));
FlexGridSizer11 = new wxFlexGridSizer(0, 1, 0, 0);
StaticText6 = new wxStaticText(this, ID_STATICTEXT8, _("A list of extensions provided by others developers is available on the wiki :"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT8"));
StaticText6 = new wxStaticText(this, ID_STATICTEXT8, _("If you create new extensions for GDevelop, please share them here :"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT8"));
FlexGridSizer11->Add(StaticText6, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
HyperlinkCtrl1 = new wxHyperlinkCtrl(this, ID_HYPERLINKCTRL1, _("Go to the wiki unofficial extensions page"), _("http://compilgames.net/wiki/doku.php/game_develop/extensions"), wxDefaultPosition, wxDefaultSize, wxHL_CONTEXTMENU|wxHL_ALIGN_CENTRE|wxNO_BORDER, _T("ID_HYPERLINKCTRL1"));
HyperlinkCtrl1 = new wxHyperlinkCtrl(this, ID_HYPERLINKCTRL1, _("Go to the Wiki page for unofficial extensions"), _("http://wiki.compilgames.net/doku.php/gdevelop/extensions"), wxDefaultPosition, wxDefaultSize, wxHL_CONTEXTMENU|wxHL_ALIGN_CENTRE|wxNO_BORDER, _T("ID_HYPERLINKCTRL1"));
FlexGridSizer11->Add(HyperlinkCtrl1, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
StaticBoxSizer3->Add(FlexGridSizer11, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
FlexGridSizer3->Add(StaticBoxSizer3, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
@@ -191,7 +191,7 @@ ProjectExtensionsDialog::ProjectExtensionsDialog(wxWindow* parent, gd::Project &
helpBt->SetToolTip(_("Display help about this window"));
FlexGridSizer17->Add(helpBt, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
FlexGridSizer4->Add(FlexGridSizer17, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 0);
StaticText2 = new wxStaticText(this, ID_STATICTEXT2, _("Close and reopen scene editors so as to take in account newly added extensions."), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT2"));
StaticText2 = new wxStaticText(this, ID_STATICTEXT2, _("You must close and reopen scene editors for newly-added extensions to become active."), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT2"));
wxFont StaticText2Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
if ( !StaticText2Font.Ok() ) StaticText2Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
StaticText2Font.SetStyle(wxFONTSTYLE_ITALIC);

View File

@@ -945,7 +945,7 @@ void ResourcesEditor::Refresh()
gd::ResourceFolder & folder = project.GetResourcesManager().GetFolder(folders[i]);
wxTreeItemId folderItem = resourcesTree->AppendItem( resourcesTree->GetRootItem(), folders[i], -1, -1, new gd::TreeItemStringData("Folder", folders[i] ));
std::vector<gd::String> resources = folder.GetAllResourcesList();
std::vector<gd::String> resources = folder.GetAllResourceNames();
for (std::size_t j=0;j<resources.size();++j)
{
gd::Resource & resource = folder.GetResource(resources[j]);
@@ -959,7 +959,7 @@ void ResourcesEditor::Refresh()
//All images
allImagesItem = resourcesTree->AppendItem( resourcesTree->GetRootItem(), _("All images"), -1,-1, new gd::TreeItemStringData("BaseFolder", "" ));
std::vector<gd::String> resources = project.GetResourcesManager().GetAllResourcesList();
std::vector<gd::String> resources = project.GetResourcesManager().GetAllResourceNames();
for ( std::size_t i = 0;i <resources.size();i++ )
{
gd::Resource & resource = project.GetResourcesManager().GetResource(resources[i]);

Some files were not shown because too many files have changed in this diff Show More