Compare commits

...

111 Commits

Author SHA1 Message Date
Florian Rival
46338bf314 Bump newIDE version 2018-08-28 00:32:32 +01:00
Florian Rival
0a7880f98e Fix monaco-editor/vs/loader.js breaking libraries (as defining "define" globally) 2018-08-28 00:27:31 +01:00
Florian Rival
38ae17595e Update newIDE README 2018-08-27 23:29:09 +01:00
Florian Rival
545caa1dbd Bump newIDE version 2018-08-27 23:25:44 +01:00
Florian Rival
3be23212a6 Fix invalid verification of object name leading to memory corruption (libGD.js) 2018-08-27 23:05:51 +01:00
Florian Rival
54b6bf969c Clone drag'n'dropped instructions when Ctrl (or Cmd) is pressed 2018-08-27 22:07:48 +01:00
Lizard-13
d449a478f5 Fix behavior activated condition (#597) 2018-08-27 21:45:12 +01:00
Florian Rival
b410a1e1b3 Merge pull request #596 from 4ian/feature/instructions-dnd
Add support for drag'n'dropping (multiple) conditions and actions
2018-08-27 20:48:50 +01:00
Florian Rival
6d6d86a325 Fix selected events being deleted after drag'n'dropping instructions 2018-08-27 20:46:44 +01:00
Florian Rival
291d6663f2 Avoid calling drop/moveSelectionToInstructionsList more than once 2018-08-27 11:49:57 +01:00
Florian Rival
4ab27e0954 Fix flow typing of authentification 2018-08-27 01:33:06 +01:00
Florian Rival
28ffcf923b Display red indicator if drop can't be done (actions on conditions and vice-versa) 2018-08-27 01:18:05 +01:00
Florian Rival
af5faa2e10 Add drag'n'drop support for instructions 2018-08-27 01:09:22 +01:00
Florian Rival
4bfdc4a2a1 Add flowtype definition for multiple dependencies 2018-08-27 00:52:33 +01:00
Florian Rival
c6141322c5 Avoid potential memory issues by limiting undo/redo history to 50 states 2018-08-26 16:05:32 +01:00
Florian Rival
59f8421a03 Fix potential memory (libGD.js) corruption/crashs by clearing selection after undo/redo in SceneEditor 2018-08-26 15:32:09 +01:00
Florian Rival
b217f80c23 Prevent negative width/height when resizing + fix properties not updated 2018-08-26 15:04:01 +01:00
Florian Rival
70635d1655 Fix modifier key like Shift wrongly detected as pressed in scene editor focused out while pressed 2018-08-26 14:30:32 +01:00
Florian Rival
9dfbe94c13 Round width/height when resizing to avoid floating values in instance sizes 2018-08-26 14:12:12 +01:00
Florian Rival
7244885fd6 Fix React warning 2018-08-26 12:22:58 +01:00
Florian Rival
f8e5ac7828 Fix selected object not highlighted in Objects list 2018-08-26 12:22:28 +01:00
Florian Rival
030f873433 Add missing description for two examples 2018-08-26 02:19:36 +01:00
Florian Rival
74e5b4862e Add menu items to move up/down layout/external events/external layouts 2018-08-26 02:19:13 +01:00
Florian Rival
87f20b82f1 Allow case insensitive search in examples 2018-08-25 17:12:37 +01:00
Florian Rival
992c00c096 Add descriptions for all examples and fix typo in Breakout example name 2018-08-25 17:02:33 +01:00
Florian Rival
2673c1526d Update exit-app example to use Quit Game action now that it is working 2018-08-25 15:52:01 +01:00
Florian Rival
2ddc451691 Merge pull request #593 from 4ian/feature/events-types-lister
Add search bar and chips to filter examples
2018-08-25 13:05:58 +01:00
Florian Rival
0a77880dc3 Improve colors of chips of examples 2018-08-25 12:59:07 +01:00
Florian Rival
aefddd0bf4 Update ExamplesExtensionsUsage.js 2018-08-25 12:38:14 +01:00
Florian Rival
1e1b3a7a42 Fix warning from Webpack with OptionalRequire.js 2018-08-25 12:37:00 +01:00
Florian Rival
e9a50f1146 Add chips to search in examples by extension and a text search 2018-08-25 12:14:45 +01:00
Florian Rival
28957c5662 Factor functions of newIDE scripts, allow to discover JS extensions and dynamically read examples list 2018-08-24 18:29:19 +01:00
Florian Rival
303a489a41 Adapt JsExtensionsLoader to allow it to be used from Node.js 2018-08-24 16:57:37 +01:00
Florian Rival
fe7d66dc1c [WIP] Improve update-stats-from-resources-examples to return used extensions 2018-08-24 14:25:04 +01:00
Florian Rival
a287e24c6b Add MetadataProvider methods that can return the associated extension 2018-08-24 00:23:33 +01:00
Florian Rival
8ec191ebf5 [WIP] Add MetadataProvider methods that can return the associated extension 2018-08-23 18:25:28 +01:00
Florian Rival
9e6a40a07e [WIP] Add EventsTypesLister 2018-08-23 09:04:28 +01:00
Florian Rival
b785b3d2fc Enhance typings/documentation of GDJS 2018-08-22 23:08:20 +01:00
Florian Rival
5bf75f8cd6 Add support for fullscreen and close the app on Electron/Cordova (#590)
* Move openURL to RuntimeGameRenderer for consistency/portability
* Add support for Fullscreen in Electron
* Add support for closing the game/app on Electron and Cordova
* Improve typings and allow RuntimeGame.adaptRendererSizeToFillScreen to be called without args
2018-08-22 21:58:22 +01:00
Florian Rival
e71e019415 Add DeviceSensors to web-app and examples 2018-08-22 20:12:40 +01:00
Wend1go
1bd73f3ff4 Add compass example and add value ranges to orientation instructions (#591) 2018-08-22 19:54:13 +01:00
Florian Rival
f1148655d5 Add 8 examples and update one 2018-08-21 21:14:17 +01:00
Florian Rival
cadfc98b47 Add help links for DeviceSensors extension 2018-08-21 20:19:05 +01:00
Wend1go
bda4a790b9 Add orientation sensor extension with examples (#587) 2018-08-21 17:32:10 +01:00
Bouh
be34bbc0af Fix flickering on mobile and transparent background (#588) 2018-08-20 10:48:10 +02:00
Florian Rival
da91917b40 Remove useless console.log 2018-08-19 15:46:06 +02:00
Florian Rival
9c6978b70a Ensure any new window opened from a link is opened in default browser 2018-08-19 15:44:50 +02:00
Florian Rival
feec79d9de Allow to choose a custom theme for the Monaco code editor 2018-08-19 15:25:17 +02:00
Florian Rival
ed872b8c95 Fix error message of ObjectField not always triggering properly 2018-08-19 14:24:20 +02:00
Florian Rival
04ea7d16fe Fix name of JsCode events 2018-08-19 13:46:36 +02:00
Florian Rival
7ae838bff4 Fix docsearch by directly using algoliasearch and formatting results with ListItems 2018-08-18 19:50:21 +02:00
Florian Rival
a324405695 Improve some documentation/typing for gdjs.Force 2018-08-18 19:21:14 +02:00
Florian Rival
204f6cd1f1 Merge pull request #586 from 4ian/feature/monaco-editor
Add Monaco Editor for editing JavaScript events, with autocompletions
2018-08-18 12:06:56 +02:00
Florian Rival
1a0dcc01df Add example of Platformer with Javascript code blocks to replace events 2018-08-18 00:02:36 +02:00
Florian Rival
bf125a3312 Fix display of tooltip/boxes of CodeEditor overflowing the editor 2018-08-17 23:43:09 +02:00
Florian Rival
747e2961b3 Add autocompletion support for extensions in CodeEditor 2018-08-17 23:42:43 +02:00
Florian Rival
011932ba27 Improve some documentation/typing for GDJS 2018-08-17 23:42:16 +02:00
Florian Rival
2037176b1e Avoid overflow on the right of the content of JsCodeEvent 2018-08-17 21:17:35 +02:00
Florian Rival
525b99697b Improve some documentation/typing for gdjs.RuntimeObject 2018-08-17 21:07:47 +02:00
Florian Rival
69849cb7be Fix resize of JsCodeEvent after the editor is loaded 2018-08-17 18:50:40 +02:00
Florian Rival
c8e56c60c5 Make wording to select objects to pass to JavaScript more explicit 2018-08-17 18:34:38 +02:00
Florian Rival
f182ed0704 Enhance/fix types in documentation of GDJS 2018-08-17 18:34:22 +02:00
Florian Rival
98f97f7b17 Add Monaco editor for JavaScript code events, with autocompletion support 2018-08-17 18:03:06 +02:00
Florian Rival
a60eee9924 Add Content-Security-Policy to newIDE index.html 2018-08-16 17:04:27 +02:00
Florian Rival
6b6cd0b61d Code split between local/browser specific code for slightly faster startup/loading 2018-08-16 17:04:27 +02:00
Florian Rival
5c19c9bb14 Update newIDE to Electron 2.0.7 2018-08-16 17:04:27 +02:00
Florian Rival
3f4d1d66ef Merge branch 'master' of github.com:4ian/GD 2018-08-16 17:04:00 +02:00
Florian Rival
c17fcaf9ac Improve layout of InstancePropertiesEditor (by adding support for grouping by rows) 2018-08-16 17:03:40 +02:00
Bouh
687758a41f Update links to Discord to send users to #announces channel (#583) 2018-08-14 10:37:11 +01:00
Florian Rival
bbb541ce48 Add accelerator shortcut in the tooltip for searching events panel 2018-08-13 21:21:02 +02:00
Florian Rival
10ef38978d Allow to open search panel with Ctrl+F 2018-08-13 21:13:56 +02:00
Florian Rival
c70604f196 Update flow to v0.78 2018-08-13 20:37:39 +02:00
Florian Rival
c5ffa44aa2 Fix tests 2018-08-13 20:33:34 +02:00
Florian Rival
bf69037e46 Fix broken stories in Storybook 2018-08-13 20:26:35 +02:00
Florian Rival
2c422a5927 Reduce margins of newIDE to 4px 2018-08-13 20:12:02 +02:00
Florian Rival
f5149d7c61 Add search/replace panel (SearchPanel) to EventsSheet (#581) 2018-08-13 17:46:37 +01:00
Florian Rival
a1a56f1b3b Add help links for Facebook Instant Games actions 2018-08-10 08:10:59 +01:00
Florian Rival
dcec81519b Bump newIDE version 2018-08-09 22:19:33 +01:00
Florian Rival
c9c2e41bd9 Delay check for updates to 10 seconds after start and fix default theme preference 2018-08-09 22:05:40 +01:00
Florian Rival
39a6aa2a90 Bump Electron version of exported GDJS games to 2.0.7 2018-08-09 17:48:57 +01:00
Florian Rival
f4532e7e4c Rework preferences to allow users to disable auto-updates (#578) 2018-08-09 17:45:28 +01:00
Florian Rival
9a551673e8 Add explicit dependency on electron with a pinned version for GDJS Electron export 2018-08-07 23:04:44 +01:00
Florian Rival
39887ccc80 Add help links in actions/conditions editor (#576)
* Add support for help links in InstructionParametersEditor.
* Add help paths for extensions/objects/behaviors/instructions
2018-08-07 23:03:50 +01:00
Bouh
97c0761288 Change TextField to SemiControlledTextField in TiledSpriteEditor (#577) 2018-08-07 22:22:51 +01:00
Wend1go
edb33e805f Fix object being selected for insertion on scene after double click #574 (#575)
Clicking the canvas after opening and closing the edit object window via double click no longer adds an object
2018-08-05 11:01:26 +01:00
Florian Rival
e1cfca6930 Bump newIDE version 2018-08-02 20:52:02 +01:00
Florian Rival
26ffcda159 Update Bomb The Crate example 2018-08-02 20:43:51 +01:00
Florian Rival
ee905f4f04 Increase timing before sending HelpFinder analytics 2018-08-02 20:19:01 +01:00
Florian Rival
e4b2fe677b Fix Debugger with Pathfinding behavior (fix #570)
This was due to the HSHG grid being serialized.
Also removed unnecessary circular serialization of behavior owners
2018-08-01 08:52:35 +01:00
Lizard-13
2ed9b058be Add minor fixes on Skeleton extension (#568) 2018-07-31 09:24:39 +01:00
Wend1go
35e3015d66 Fix Pixi flickering on some mobile phones (#566)
* Fix flickering on some mobile devices (Android/Ubuntu Touch)
2018-07-30 16:55:58 +01:00
Florian Rival
b6707d62b2 Fix default font loading for Text object 2018-07-28 12:59:50 +01:00
Florian Rival
76466af778 Bump newIDE version 2018-07-25 22:18:29 +01:00
Florian Rival
193b8fa36e Add/update 7 examples 2018-07-25 22:07:03 +01:00
Florian Rival
1c24e4f14d Fix RuntimeObject::PutAroundAPosition and gdjs.RuntimeObject.prototype.putAround
Positioning was not made using center of object which was making it inconsistent
with other related actions/expressions (like the expression to get distance).
2018-07-25 22:06:34 +01:00
Florian Rival
d0bfb37680 Merge branch 'master' of github.com:4ian/GD 2018-07-23 23:11:53 +01:00
Florian Rival
db480f09d8 Add analytics to help links 2018-07-23 22:35:47 +01:00
Lizard-13
b2b3307ff7 Add RandomInRange, RandomFloat and other random functions (#558) 2018-07-21 19:06:26 +01:00
Florian Rival
17754d4fe5 Add bomb-the-crate example 2018-07-20 17:20:34 +01:00
Florian Rival
0f912472ce Fix opening of HelpIcon links in browser 2018-07-20 17:00:30 +01:00
Florian Rival
8c13b051ad Fix ProjectTitlebar not updating according to the project file path/url 2018-07-20 13:48:11 +01:00
Florian Rival
268075b8bc Don't display intro dialog if a project is opened at startup 2018-07-20 13:37:30 +01:00
Florian Rival
23e899d93d Add support for opening a file from command line option or from url "project" option 2018-07-20 13:26:02 +01:00
Florian Rival
1a76ad9069 Add center-object-within-another example 2018-07-20 08:53:16 +01:00
Florian Rival
1ac26ab8ce Add isometric game example (thanks Mickael Hoarau!) 2018-07-19 20:57:03 +01:00
Wend1go
69fa249db5 Allow to double click to edit object and add Duplicate item menu (#545)
* Open "edit Object" dialog via double click on object
* Add "Duplicate" option to context menu of object list
2018-07-19 14:10:58 +01:00
Florian Rival
f31b46cb14 Update links in README 2018-07-18 14:39:37 +01:00
Todor Imreorov
9e5ca5fb0b Add text field to rename object from object editor (#547) 2018-07-16 23:25:49 +01:00
Lizard-13
b64eeebcbe Add missing functions and bugfix for particles (#555)
* Add missing functions and bugfix for particles

* parseInt in base 10
2018-07-16 23:03:45 +01:00
Lizard-13
c9ae252ae8 Avoid potential errors by using parseInt in base 10 on sprite color (#557) 2018-07-16 23:02:41 +01:00
Florian Rival
ca789c7b0b Fix PlatformerObject behavior not properly staying on floor after object resize 2018-07-12 23:11:24 +01:00
1088 changed files with 166265 additions and 6701 deletions

View File

@@ -75,7 +75,8 @@
"cstring": "cpp",
"iomanip": "cpp",
"cstdint": "cpp",
"forward_list": "cpp"
"forward_list": "cpp",
"mutex": "cpp"
},
"files.exclude": {
"Binaries/*build*": true,

View File

@@ -0,0 +1,241 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 31.999999 32.000001"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="orientation_active.svg"
inkscape:export-filename="/home/matthias/Programme/GD_MyFork/orientation_icons/orientation_active_32px.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<inkscape:path-effect
effect="skeletal"
id="path-effect6855"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect6842"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect4583"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4234"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#617da1;fill-opacity:1;fill-rule:evenodd;stroke:#617da1;stroke-width:1pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lstart"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4231"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
transform="matrix(0.8,0,0,0.8,10,0)"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="20.233951"
inkscape:cy="7.2727048"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="false"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:window-width="1920"
inkscape:window-height="1026"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-global="false"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="false"
inkscape:object-nodes="false"
inkscape:snap-smooth-nodes="false"
inkscape:snap-midpoints="false"
inkscape:snap-nodes="true"
units="px">
<inkscape:grid
type="xygrid"
id="grid6838" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="bg"
inkscape:groupmode="layer"
id="layer1"
style="opacity:0"
sodipodi:insensitive="true"
transform="translate(0,-1020.3622)">
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.48900003;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5d3b0b;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4136"
width="537.14288"
height="537.14288"
x="108.57143"
y="232.3622"
ry="0" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="vg"
transform="translate(0,-1020.3622)">
<path
inkscape:connector-curvature="0"
id="path4260"
d="M 17.705339,1047.9202 3.8554509,1034.0703 a 9.8935231,9.8935231 0 0 0 0.865828,12.9857 9.8935231,9.8935231 0 0 0 12.9840601,0.8642 z"
style="opacity:1;fill:#617da1;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path4262"
d="m 15.476114,1045.691 -9.3874081,-9.3874 a 6.7720372,6.7720372 0 0 0 0.839681,8.5453 6.7720372,6.7720372 0 0 0 8.5477271,0.8421 z"
style="opacity:1;fill:#55687f;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path4264"
d="m 13.104478,1043.3194 -4.6473891,-4.6474 a 3.5447378,3.5447378 0 0 0 0.752875,3.8953 3.5447378,3.5447378 0 0 0 3.8945141,0.7521 z"
style="opacity:1;fill:#45505d;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<g
id="g4271">
<path
inkscape:connector-curvature="0"
id="path4193"
d="m 14.330666,1025.0237 13.849888,13.8499 a 9.8935231,9.8935231 0 0 0 -0.865828,-12.9857 9.8935231,9.8935231 0 0 0 -12.98406,-0.8642 z"
style="opacity:1;fill:#617da1;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="circle4209"
d="m 16.559891,1027.2529 9.387408,9.3874 a 6.7720372,6.7720372 0 0 0 -0.839681,-8.5453 6.7720372,6.7720372 0 0 0 -8.547727,-0.8421 z"
style="opacity:1;fill:#55687f;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="circle4211"
d="m 18.931527,1029.6245 4.647389,4.6474 a 3.5447378,3.5447378 0 0 0 -0.752875,-3.8953 3.5447378,3.5447378 0 0 0 -3.894514,-0.7521 z"
style="opacity:1;fill:#45505d;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g4185"
transform="matrix(0,1,-1,0,1052.3622,1020.3622)">
<g
transform="matrix(-0.70710678,-0.70710678,-0.70710678,0.70710678,761.06108,315.93318)"
id="g4164">
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#2d2d2d;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4139"
width="29.490231"
height="13.97627"
x="1021.5129"
y="-24.405632"
ry="1.9309319"
transform="matrix(0,1,-1,0,0,0)" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.9;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#4c4c4c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 23.516546,1048.5704 c -0.04767,-8.3635 0.05771,-16.73 -0.05645,-25.0917 -0.235339,-0.805 -1.013989,-0.9207 -1.576996,-0.7735 -3.050625,0.074 -6.121697,-0.1942 -9.156515,0.1468 -0.564763,0.4707 -0.49652,1.4656 -0.445964,2.2244 0.02634,7.9894 -0.06398,15.9823 0.04892,23.9695 0.230948,0.7665 0.973094,0.9226 1.519542,0.7675 3.04799,-0.056 6.10727,0.141 9.14698,-0.1067 0.315625,-0.2087 0.529513,-0.6681 0.519728,-1.1359 z"
id="rect4181"
inkscape:connector-curvature="0" />
<g
id="g4177"
transform="matrix(0,0.07409604,-0.0615007,0,50.235037,1008.3136)">
<path
inkscape:connector-curvature="0"
id="path4159"
d="m 293.62058,434.43653 c -16.41699,0.21869 -32.83277,0.54314 -49.24609,0.9982 40.22318,60.65317 80.41322,121.37951 120.66406,181.98201 16.66541,0.0638 33.3307,0.12377 49.99609,0.17961 -40.50006,-61.0078 -80.91528,-122.15931 -121.41406,-183.15982 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#616161;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
inkscape:connector-curvature="0"
id="path4163"
d="m 368.01511,434.63361 c -9.86715,-0.003 -19.73317,0.02 -29.59961,0.0587 40.58372,60.98623 81.13273,122.04569 121.7461,182.97743 16.59016,-0.003 33.17905,-0.0421 49.76562,-0.16726 -40.56648,-60.89249 -81.04682,-121.93216 -121.60937,-182.82191 -6.76751,-0.0159 -13.53548,-0.0448 -20.30274,-0.0469 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5e5e5e;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
</g>
</g>
</g>
<path
style="fill:#80b03e;fill-opacity:1;fill-rule:evenodd;stroke:#676767;stroke-width:0.48377252;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 8.967328,1032.9255 -5.0968894,2.4621 8.2068554,10.928 17.536753,-22.2017 -7.083812,0.086 -10.107389,12.699 z"
id="path4181"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,223 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 31.999999 32.000001"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="orientation_alpha.svg"
inkscape:export-filename="/home/svisor/Dokumente/orientation/orientation_alpha_16px.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45">
<defs
id="defs4">
<inkscape:path-effect
effect="skeletal"
id="path-effect6855"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect6842"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect4583"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4234"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#617da1;fill-opacity:1;fill-rule:evenodd;stroke:#617da1;stroke-width:1pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lstart"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4231"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
transform="matrix(0.8,0,0,0.8,10,0)"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.9195959"
inkscape:cx="-10.727491"
inkscape:cy="13.240628"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="false"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:window-width="1784"
inkscape:window-height="965"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-global="false"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="false"
inkscape:object-nodes="false"
inkscape:snap-smooth-nodes="false"
inkscape:snap-midpoints="false"
inkscape:snap-nodes="true"
units="px">
<inkscape:grid
type="xygrid"
id="grid6838" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="bg"
inkscape:groupmode="layer"
id="layer1"
style="opacity:0"
sodipodi:insensitive="true"
transform="translate(0,-1020.3622)">
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.48900003;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5d3b0b;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4136"
width="537.14288"
height="537.14288"
x="108.57143"
y="232.3622"
ry="0" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="vg"
transform="translate(0,-1020.3622)">
<path
sodipodi:type="spiral"
style="fill:none;fill-rule:evenodd;stroke:#617da1;stroke-width:117.59577179;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4225"
sodipodi:cx="381.83768"
sodipodi:cy="500.81891"
sodipodi:expansion="2"
sodipodi:revolution="39.947353"
sodipodi:radius="263.47296"
sodipodi:argument="-251.55106"
sodipodi:t0="0.98124301"
d="M 514.43027,717.09103 C 396.34495,790.81298 236.37332,752.97207 162.79805,635.10821 88.142361,515.51357 126.46914,353.5023 245.84088,278.99418 366.57474,203.63587 530.09521,241.93425 605.84226,362.11077"
transform="matrix(-0.01300789,-0.04848619,0.0485461,-0.01299183,-3.1820691,1060.7591)" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#2d2d2d;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4139"
width="23.508087"
height="11.14116"
x="4.2458982"
y="1031.1785"
ry="1.5392392" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.9;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#4c4c4c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 25.814829,1031.8872 c -6.667001,0.038 -13.336293,-0.046 -20.0018744,0.045 -0.6416148,0.1876 -0.7339823,0.8083 -0.6166024,1.2571 0.059129,2.4318 -0.1547636,4.8799 0.1170802,7.2991 0.37515,0.4502 1.1682938,0.3958 1.7731176,0.3555 6.36877,-0.021 12.74023,0.051 19.107241,-0.039 0.61102,-0.1841 0.735486,-0.7757 0.611786,-1.2113 -0.04476,-2.4297 0.112409,-4.8684 -0.08527,-7.2915 -0.166424,-0.2516 -0.532577,-0.4221 -0.905478,-0.4143 z"
id="rect4181"
inkscape:connector-curvature="0" />
<g
id="g4177"
transform="matrix(0.05906553,0,0,0.04902518,-6.2759034,1010.5886)">
<path
inkscape:connector-curvature="0"
id="path4159"
d="m 293.62058,434.43653 c -16.41699,0.21869 -32.83277,0.54314 -49.24609,0.9982 40.22318,60.65317 80.41322,121.37951 120.66406,181.98201 16.66541,0.0638 33.3307,0.12377 49.99609,0.17961 -40.50006,-61.0078 -80.91528,-122.15931 -121.41406,-183.15982 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#616161;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
inkscape:connector-curvature="0"
id="path4163"
d="m 368.01511,434.63361 c -9.86715,-0.003 -19.73317,0.02 -29.59961,0.0587 40.58372,60.98623 81.13273,122.04569 121.7461,182.97743 16.59016,-0.003 33.17905,-0.0421 49.76562,-0.16726 -40.56648,-60.89249 -81.04682,-121.93216 -121.60937,-182.82191 -6.76751,-0.0159 -13.53548,-0.0448 -20.30274,-0.0469 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5e5e5e;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
</g>
<path
style="fill:#617da1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 13.198999,1021.0966 0.01639,12.0632 -12.99441834,-11.989 z"
id="path6840"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path6846"
d="m 18.75867,1021.0966 -0.01639,12.0632 12.994419,-11.989 z"
style="fill:#617da1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:none;fill-rule:evenodd;stroke:#b54d4d;stroke-width:2.95327663;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 16.084308,1037.0443 0,-10.6452"
id="path6853"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 31.999999 32.000001"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="orientation_beta.svg"
inkscape:export-filename="/home/svisor/Dokumente/orientation/orientation_beta_32px.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<inkscape:path-effect
effect="skeletal"
id="path-effect6933"
is_visible="true"
pattern="m -9.5367432e-7,1025.3622 c 0,-2.76 2.23999995367432,-5 4.99999995367432,-5 2.76,0 5,2.24 5,5 0,2.76 -2.24,5 -5,5 -2.76,0 -4.99999995367432,-2.24 -4.99999995367432,-5 z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect6855"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect6842"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect4583"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4234"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#617da1;fill-opacity:1;fill-rule:evenodd;stroke:#617da1;stroke-width:1pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lstart"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4231"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
transform="matrix(0.8,0,0,0.8,10,0)"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6568543"
inkscape:cx="46.575938"
inkscape:cy="27.265886"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="true"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:window-width="1784"
inkscape:window-height="965"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-global="false"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="false"
inkscape:object-nodes="false"
inkscape:snap-smooth-nodes="false"
inkscape:snap-midpoints="false"
inkscape:snap-nodes="true"
units="px">
<inkscape:grid
type="xygrid"
id="grid6838" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="bg"
inkscape:groupmode="layer"
id="layer1"
style="opacity:0"
sodipodi:insensitive="true"
transform="translate(0,-1020.3622)">
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.48900003;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5d3b0b;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4136"
width="537.14288"
height="537.14288"
x="108.57143"
y="232.3622"
ry="0" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="vg"
transform="translate(0,-1020.3622)">
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#617da1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 1.1903085,1030.3763 7.9884604,1.0094 7.7057061,2.0649 7.705714,2.0646 7.422963,3.1201 -1.004649,3.7494 -7.988449,-1.0095 -7.705717,-2.0648 -7.7057052,-2.0647 -7.42297142,-3.12 z"
id="rect6929"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccc" />
<g
id="g6920"
transform="matrix(0.96592583,0.25881905,-0.25881905,0.96592583,268.87497,31.190367)">
<rect
ry="1.5392392"
y="1031.1785"
x="4.2458982"
height="11.14116"
width="23.508087"
id="rect4139"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#2d2d2d;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
inkscape:connector-curvature="0"
id="rect4181"
d="m 25.814829,1031.8872 c -6.667001,0.038 -13.336293,-0.046 -20.0018744,0.045 -0.6416148,0.1876 -0.7339823,0.8083 -0.6166024,1.2571 0.059129,2.4318 -0.1547636,4.8799 0.1170802,7.2991 0.37515,0.4502 1.1682938,0.3958 1.7731176,0.3555 6.36877,-0.021 12.74023,0.051 19.107241,-0.039 0.61102,-0.1841 0.735486,-0.7757 0.611786,-1.2113 -0.04476,-2.4297 0.112409,-4.8684 -0.08527,-7.2915 -0.166424,-0.2516 -0.532577,-0.4221 -0.905478,-0.4143 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.9;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#4c4c4c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<g
transform="matrix(0.05906553,0,0,0.04902518,-6.2759034,1010.5886)"
id="g4177">
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#616161;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 293.62058,434.43653 c -16.41699,0.21869 -32.83277,0.54314 -49.24609,0.9982 40.22318,60.65317 80.41322,121.37951 120.66406,181.98201 16.66541,0.0638 33.3307,0.12377 49.99609,0.17961 -40.50006,-61.0078 -80.91528,-122.15931 -121.41406,-183.15982 z"
id="path4159"
inkscape:connector-curvature="0" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5e5e5e;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 368.01511,434.63361 c -9.86715,-0.003 -19.73317,0.02 -29.59961,0.0587 40.58372,60.98623 81.13273,122.04569 121.7461,182.97743 16.59016,-0.003 33.17905,-0.0421 49.76562,-0.16726 -40.56648,-60.89249 -81.04682,-121.93216 -121.60937,-182.82191 -6.76751,-0.0159 -13.53548,-0.0448 -20.30274,-0.0469 z"
id="path4163"
inkscape:connector-curvature="0" />
</g>
</g>
<path
style="fill:none;fill-rule:evenodd;stroke:#b54d4d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 12.288338,1050.5605 7.59194,-28.3336"
id="path6853"
inkscape:connector-curvature="0" />
<path
style="fill:#617da1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 11.341431,1034.9779 -8.3653553,4.8296 3.535615,-13.195 z"
id="path6931"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path6937"
d="m 20.954687,1037.7169 4.982679,8.6302 3.647574,-13.6128 z"
style="fill:#617da1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,266 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 31.999999 32.000001"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="orientation_gamma.svg"
inkscape:export-filename="/home/svisor/Dokumente/orientation/orientation_gamma_32px.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
id="linearGradient4173">
<stop
style="stop-color:#465b76;stop-opacity:1;"
offset="0"
id="stop4175" />
<stop
id="stop4193"
offset="0.11647766"
style="stop-color:#617da1;stop-opacity:1" />
<stop
style="stop-color:#090f1a;stop-opacity:0.62352943"
offset="0.48119751"
id="stop4201" />
<stop
style="stop-color:#617da1;stop-opacity:1"
offset="0.84591734"
id="stop4199" />
<stop
style="stop-color:#35465e;stop-opacity:0.81176472"
offset="1"
id="stop4177" />
</linearGradient>
<inkscape:path-effect
effect="skeletal"
id="path-effect6933"
is_visible="true"
pattern="m -9.5367432e-7,1025.3622 c 0,-2.76 2.23999995367432,-5 4.99999995367432,-5 2.76,0 5,2.24 5,5 0,2.76 -2.24,5 -5,5 -2.76,0 -4.99999995367432,-2.24 -4.99999995367432,-5 z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect6855"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect6842"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect4583"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4234"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#617da1;fill-opacity:1;fill-rule:evenodd;stroke:#617da1;stroke-width:1pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lstart"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4231"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
transform="matrix(0.8,0,0,0.8,10,0)"
inkscape:connector-curvature="0" />
</marker>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4173"
id="linearGradient4179"
x1="11.697108"
y1="1052.0363"
x2="20.611916"
y2="1020.3048"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6568543"
inkscape:cx="6.0834191"
inkscape:cy="25.653468"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="true"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:window-width="1784"
inkscape:window-height="965"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-global="false"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="false"
inkscape:object-nodes="false"
inkscape:snap-smooth-nodes="false"
inkscape:snap-midpoints="false"
inkscape:snap-nodes="true"
units="px">
<inkscape:grid
type="xygrid"
id="grid6838" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="bg"
inkscape:groupmode="layer"
id="layer1"
style="opacity:0"
sodipodi:insensitive="true"
transform="translate(0,-1020.3622)">
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.48900003;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5d3b0b;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4136"
width="537.14288"
height="537.14288"
x="108.57143"
y="232.3622"
ry="0" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="vg"
transform="translate(0,-1020.3622)">
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4179);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 21.937741,1021.5707 -1.0094,7.9885 -2.0649,7.7057 -2.0646,7.7057 -3.1201,7.4229 -3.7494,-1.0046 1.0095,-7.9885 2.0648,-7.7057 2.0647,-7.7057 3.12,-7.4229 z"
id="rect6929"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccc" />
<g
id="g6920"
transform="matrix(0.96592583,0.25881905,-0.25881905,0.96592583,268.87497,31.190367)">
<rect
ry="1.5392392"
y="1031.1785"
x="4.2458982"
height="11.14116"
width="23.508087"
id="rect4139"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#2d2d2d;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
inkscape:connector-curvature="0"
id="rect4181"
d="m 25.814829,1031.8872 c -6.667001,0.038 -13.336293,-0.046 -20.0018744,0.045 -0.6416148,0.1876 -0.7339823,0.8083 -0.6166024,1.2571 0.059129,2.4318 -0.1547636,4.8799 0.1170802,7.2991 0.37515,0.4502 1.1682938,0.3958 1.7731176,0.3555 6.36877,-0.021 12.74023,0.051 19.107241,-0.039 0.61102,-0.1841 0.735486,-0.7757 0.611786,-1.2113 -0.04476,-2.4297 0.112409,-4.8684 -0.08527,-7.2915 -0.166424,-0.2516 -0.532577,-0.4221 -0.905478,-0.4143 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.9;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#4c4c4c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<g
transform="matrix(0.05906553,0,0,0.04902518,-6.2759034,1010.5886)"
id="g4177">
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#616161;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 293.62058,434.43653 c -16.41699,0.21869 -32.83277,0.54314 -49.24609,0.9982 40.22318,60.65317 80.41322,121.37951 120.66406,181.98201 16.66541,0.0638 33.3307,0.12377 49.99609,0.17961 -40.50006,-61.0078 -80.91528,-122.15931 -121.41406,-183.15982 z"
id="path4159"
inkscape:connector-curvature="0" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5e5e5e;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 368.01511,434.63361 c -9.86715,-0.003 -19.73317,0.02 -29.59961,0.0587 40.58372,60.98623 81.13273,122.04569 121.7461,182.97743 16.59016,-0.003 33.17905,-0.0421 49.76562,-0.16726 -40.56648,-60.89249 -81.04682,-121.93216 -121.60937,-182.82191 -6.76751,-0.0159 -13.53548,-0.0448 -20.30274,-0.0469 z"
id="path4163"
inkscape:connector-curvature="0" />
</g>
</g>
<path
style="fill:none;fill-rule:evenodd;stroke:#b54d4d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 1.917508,1032.5977 28.3336,7.592"
id="path6853"
inkscape:connector-curvature="0" />
<path
style="fill:#617da1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 17.336141,1031.7218 -4.8296,-8.3653 13.195,3.5356 z"
id="path6931"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path6937"
d="m 14.597141,1041.3351 -8.6302,4.9827 13.6128,3.6475 z"
style="fill:#617da1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,257 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 31.999999 32.000001"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="orientation_inactive.svg"
inkscape:export-filename="/home/matthias/Programme/GD_MyFork/orientation_icons/orientation_inactive32.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<inkscape:path-effect
effect="skeletal"
id="path-effect6855"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect6842"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect4583"
is_visible="true"
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4234"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#617da1;fill-opacity:1;fill-rule:evenodd;stroke:#617da1;stroke-width:1pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lstart"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4231"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
transform="matrix(0.8,0,0,0.8,10,0)"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.919596"
inkscape:cx="-3.4987609"
inkscape:cy="15.215408"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="false"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:window-width="1920"
inkscape:window-height="1026"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-global="false"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="false"
inkscape:object-nodes="false"
inkscape:snap-smooth-nodes="false"
inkscape:snap-midpoints="false"
inkscape:snap-nodes="true"
units="px">
<inkscape:grid
type="xygrid"
id="grid6838" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="bg"
inkscape:groupmode="layer"
id="layer1"
style="opacity:0"
sodipodi:insensitive="true"
transform="translate(0,-1020.3622)">
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.48900003;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5d3b0b;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4136"
width="537.14288"
height="537.14288"
x="108.57143"
y="232.3622"
ry="0" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="vg"
transform="translate(0,-1020.3622)">
<g
id="g4182">
<path
style="opacity:1;fill:#617da1;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 17.705339,1047.9202 3.8554509,1034.0703 a 9.8935231,9.8935231 0 0 0 0.865828,12.9857 9.8935231,9.8935231 0 0 0 12.9840601,0.8642 z"
id="path4260"
inkscape:connector-curvature="0" />
<path
style="opacity:1;fill:#55687f;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 15.476114,1045.691 -9.3874081,-9.3874 a 6.7720372,6.7720372 0 0 0 0.839681,8.5453 6.7720372,6.7720372 0 0 0 8.5477271,0.8421 z"
id="path4262"
inkscape:connector-curvature="0" />
<path
style="opacity:1;fill:#45505d;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 13.104478,1043.3194 -4.6473891,-4.6474 a 3.5447378,3.5447378 0 0 0 0.752875,3.8953 3.5447378,3.5447378 0 0 0 3.8945141,0.7521 z"
id="path4264"
inkscape:connector-curvature="0" />
</g>
<g
id="g4271">
<path
inkscape:connector-curvature="0"
id="path4193"
d="m 14.330666,1025.0237 13.849888,13.8499 a 9.8935231,9.8935231 0 0 0 -0.865828,-12.9857 9.8935231,9.8935231 0 0 0 -12.98406,-0.8642 z"
style="opacity:1;fill:#617da1;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="circle4209"
d="m 16.559891,1027.2529 9.387408,9.3874 a 6.7720372,6.7720372 0 0 0 -0.839681,-8.5453 6.7720372,6.7720372 0 0 0 -8.547727,-0.8421 z"
style="opacity:1;fill:#55687f;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="circle4211"
d="m 18.931527,1029.6245 4.647389,4.6474 a 3.5447378,3.5447378 0 0 0 -0.752875,-3.8953 3.5447378,3.5447378 0 0 0 -3.894514,-0.7521 z"
style="opacity:1;fill:#45505d;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g4185"
transform="matrix(0,1,-1,0,1052.3622,1020.3622)">
<g
transform="matrix(-0.70710678,-0.70710678,-0.70710678,0.70710678,761.06108,315.93318)"
id="g4164">
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#2d2d2d;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4139"
width="29.490231"
height="13.97627"
x="1021.5129"
y="-24.405632"
ry="1.9309319"
transform="matrix(0,1,-1,0,0,0)" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.9;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#4c4c4c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 23.516546,1048.5704 c -0.04767,-8.3635 0.05771,-16.73 -0.05645,-25.0917 -0.235339,-0.805 -1.013989,-0.9207 -1.576996,-0.7735 -3.050625,0.074 -6.121697,-0.1942 -9.156515,0.1468 -0.564763,0.4707 -0.49652,1.4656 -0.445964,2.2244 0.02634,7.9894 -0.06398,15.9823 0.04892,23.9695 0.230948,0.7665 0.973094,0.9226 1.519542,0.7675 3.04799,-0.056 6.10727,0.141 9.14698,-0.1067 0.315625,-0.2087 0.529513,-0.6681 0.519728,-1.1359 z"
id="rect4181"
inkscape:connector-curvature="0" />
<g
id="g4177"
transform="matrix(0,0.07409604,-0.0615007,0,50.235037,1008.3136)">
<path
inkscape:connector-curvature="0"
id="path4159"
d="m 293.62058,434.43653 c -16.41699,0.21869 -32.83277,0.54314 -49.24609,0.9982 40.22318,60.65317 80.41322,121.37951 120.66406,181.98201 16.66541,0.0638 33.3307,0.12377 49.99609,0.17961 -40.50006,-61.0078 -80.91528,-122.15931 -121.41406,-183.15982 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#616161;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
inkscape:connector-curvature="0"
id="path4163"
d="m 368.01511,434.63361 c -9.86715,-0.003 -19.73317,0.02 -29.59961,0.0587 40.58372,60.98623 81.13273,122.04569 121.7461,182.97743 16.59016,-0.003 33.17905,-0.0421 49.76562,-0.16726 -40.56648,-60.89249 -81.04682,-121.93216 -121.60937,-182.82191 -6.76751,-0.0159 -13.53548,-0.0448 -20.30274,-0.0469 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5e5e5e;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
</g>
</g>
</g>
<g
id="g4178"
transform="matrix(0.77902994,0,0,0.77902994,51.018309,218.11381)">
<rect
transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)"
ry="0"
y="708.63794"
x="-794.39429"
height="6.3392859"
width="37.767857"
id="rect4176"
style="opacity:1;fill:#aa6056;fill-opacity:1;stroke:none;stroke-width:2.61800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.88922155" />
<path
id="path4170"
transform="translate(-9.5367432e-7,1020.3622)"
d="M -44.951172,9.7773438 A 20.203051,20.203051 0 0 0 -65.154297,29.980469 20.203051,20.203051 0 0 0 -44.951172,50.183594 20.203051,20.203051 0 0 0 -24.748047,29.980469 20.203051,20.203051 0 0 0 -44.951172,9.7773438 Z m 0,4.3750002 a 15.828051,15.828051 0 0 1 15.828125,15.828125 15.828051,15.828051 0 0 1 -15.828125,15.828125 15.828051,15.828051 0 0 1 -15.828125,-15.828125 15.828051,15.828051 0 0 1 15.828125,-15.828125 z"
style="opacity:1;fill:#aa6056;fill-opacity:1;stroke:none;stroke-width:2.61800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.88922155"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -11,12 +11,14 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAdvancedExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"BuiltinAdvanced",
_("Advanced control features"),
_("Built-in extension providing advanced control features."),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"BuiltinAdvanced",
_("Advanced control features"),
_("Built-in extension providing advanced control features."),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("" /*TODO: Add a documentation page for this */);
#if defined(GD_IDE_ONLY)
extension

View File

@@ -11,11 +11,13 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation("BuiltinAudio",
_("Audio"),
_("Builtin audio extension"),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation("BuiltinAudio",
_("Audio"),
_("Builtin audio extension"),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("/all-features/audio");
#if defined(GD_IDE_ONLY)
extension

View File

@@ -12,11 +12,13 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation("BuiltinObject",
_("Base object"),
_("Base object"),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation("BuiltinObject",
_("Base object"),
_("Base object"),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("/objects/base_object");
gd::ObjectMetadata& obj = extension.AddObject<gd::Object>(
"", _("Base object"), _("Base object"), "res/objeticon24.png");
@@ -34,7 +36,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.AddParameter("relationalOperator", _("Sign of the test"))
.AddParameter("expression", _("X position"))
.MarkAsSimple()
.SetHelpPage("gdevelop/documentation/manual/base")
.SetManipulatedType("number");
obj.AddAction("MettreX",
@@ -49,7 +50,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.AddParameter("operator", _("Modification's sign"))
.AddParameter("expression", _("Value"))
.MarkAsSimple()
.SetHelpPage("gdevelop/documentation/manual/base")
.SetManipulatedType("number");
obj.AddCondition("PosY",
@@ -64,7 +64,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.AddParameter("relationalOperator", _("Sign of the test"))
.AddParameter("expression", _("Y position"))
.MarkAsSimple()
.SetHelpPage("gdevelop/documentation/manual/base")
.SetManipulatedType("number");
obj.AddAction("MettreY",
@@ -79,7 +78,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.AddParameter("operator", _("Modification's sign"))
.AddParameter("expression", _("Value"))
.MarkAsSimple()
.SetHelpPage("gdevelop/documentation/manual/base")
.SetManipulatedType("number");
obj.AddAction(
@@ -96,12 +94,12 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.AddParameter("expression", _("X position"))
.AddParameter("operator", _("Modification's sign"))
.AddParameter("expression", _("Y position"))
.SetHelpPage("gdevelop/documentation/manual/base")
.MarkAsSimple();
obj.AddAction("MettreAutourPos",
_("Put an object around a position"),
_("Position an object around a position, with specified angle "
_("Position the center of the given object around a position, "
"using the specified angle "
"and distance."),
_("Put _PARAM0_ around _PARAM1_;_PARAM2_, with an angle of "
"_PARAM4_ degrees and _PARAM3_ pixels distance."),
@@ -114,7 +112,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.AddParameter("expression", _("Y position"))
.AddParameter("expression", _("Distance"))
.AddParameter("expression", _("Angle, in degrees"))
.SetHelpPage("gdevelop/documentation/manual/base")
.MarkAsAdvanced();
obj.AddAction("SetAngle",
@@ -128,7 +125,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.AddParameter("object", _("Object"))
.AddParameter("operator", _("Modification's sign"))
.AddParameter("expression", _("Value"))
.SetHelpPage("gdevelop/documentation/manual/base")
.SetManipulatedType("number");
obj.AddAction("Rotate",
@@ -143,7 +139,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.AddParameter("object", _("Object"))
.AddParameter("expression", _("Angular speed (in degrees per second)"))
.AddCodeOnlyParameter("currentScene", "")
.SetHelpPage("gdevelop/documentation/manual/base")
.MarkAsSimple();
obj.AddAction(
@@ -160,7 +155,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.AddParameter(
"expression",
_("Angular speed (in degrees per second) (0 for immediate rotation)"))
.SetHelpPage("gdevelop/documentation/manual/base")
.AddCodeOnlyParameter("currentScene", "");
obj.AddAction(
@@ -180,7 +174,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
"expression",
_("Angular speed (in degrees per second) (0 for immediate rotation)"))
.AddCodeOnlyParameter("currentScene", "")
.SetHelpPage("gdevelop/documentation/manual/base")
.MarkAsAdvanced();
obj.AddAction("AddForceXY",
@@ -196,8 +189,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.AddParameter("object", _("Object"))
.AddParameter("expression", _("Speed on X axis (in pixels per second)"))
.AddParameter("expression", _("Speed on Y axis (in pixels per second)"))
.AddParameter("expression", _("Damping (Default: 0)"))
.SetHelpPage("gdevelop/documentation/manual/base");
.AddParameter("expression", _("Damping (Default: 0)"));
obj.AddAction("AddForceAL",
_("Add a force (angle)"),
@@ -214,7 +206,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.AddParameter("expression", _("Angle"))
.AddParameter("expression", _("Speed (in pixels per second)"))
.AddParameter("expression", _("Damping (Default: 0)"))
.SetHelpPage("gdevelop/documentation/manual/base")
.MarkAsAdvanced();
obj.AddAction(
@@ -232,7 +223,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.AddParameter("expression", _("Y position"))
.AddParameter("expression", _("Speed (in pixels per second)"))
.AddParameter("expression", _("Damping (Default: 0)"))
.SetHelpPage("gdevelop/documentation/manual/base#displacement")
.MarkAsAdvanced();
obj.AddAction(
@@ -265,7 +255,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
"res/actions/arreter.png")
.AddParameter("object", _("Object"))
.SetHelpPage("gdevelop/documentation/manual/base#displacement")
.MarkAsAdvanced();
obj.AddAction("Delete",
@@ -599,7 +588,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
obj.AddAction("MettreAutour",
_("Put an object around another"),
_("Position an object around another, with the specified angle "
"and distance."),
"and distance. The center of the objects are used for "
"positioning them."),
_("Put _PARAM0_ around _PARAM1_, with an angle of _PARAM3_ "
"degrees and _PARAM2_ pixels distance."),
_("Position"),
@@ -1027,18 +1017,19 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.MarkAsAdvanced();
extension
.AddCondition("RaycastToPosition",
_("Raycast to position"),
_("Sends a ray from the given source position to the final point, "
"intersecting the closest object.\nThe instersected "
"object will become the only one taken into account.\nIf "
"the condition is inverted, the object to be intersected "
"will be the farthest one within the ray radius."),
_("Raycast _PARAM0_ from _PARAM1_;_PARAM2_, and save the "
"result in _PARAM5_, _PARAM6_"),
_("Collision"),
"res/conditions/raycast24.png",
"res/conditions/raycast.png")
.AddCondition(
"RaycastToPosition",
_("Raycast to position"),
_("Sends a ray from the given source position to the final point, "
"intersecting the closest object.\nThe instersected "
"object will become the only one taken into account.\nIf "
"the condition is inverted, the object to be intersected "
"will be the farthest one within the ray radius."),
_("Raycast _PARAM0_ from _PARAM1_;_PARAM2_, and save the "
"result in _PARAM5_, _PARAM6_"),
_("Collision"),
"res/conditions/raycast24.png",
"res/conditions/raycast.png")
.AddParameter("objectList", _("Objects to test against the ray"))
.AddParameter("expression", _("Ray source X position"))
.AddParameter("expression", _("Ray source Y position"))

View File

@@ -11,11 +11,13 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation("BuiltinCamera",
_("Cameras and layers features"),
_("Built-in camera extension"),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation("BuiltinCamera",
_("Cameras and layers features"),
_("Built-in camera extension"),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("" /*TODO: Add a documentation page for this */);
#if defined(GD_IDE_ONLY)
extension

View File

@@ -12,12 +12,14 @@ namespace gd {
void GD_CORE_API
BuiltinExtensionsImplementer::ImplementsCommonConversionsExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"BuiltinCommonConversions",
_("Standard Conversions"),
_("Built-in extension providing standard conversions expressions."),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"BuiltinCommonConversions",
_("Standard Conversions"),
_("Built-in extension providing standard conversions expressions."),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("" /*TODO: Add a documentation page for this */);
#if defined(GD_IDE_ONLY)

View File

@@ -22,12 +22,14 @@ namespace gd {
void GD_CORE_API
BuiltinExtensionsImplementer::ImplementsCommonInstructionsExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"BuiltinCommonInstructions",
_("Standard events"),
_("Built-in extension providing standard events."),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"BuiltinCommonInstructions",
_("Standard events"),
_("Built-in extension providing standard events."),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("" /*TODO: Add a documentation page for this */);
#if defined(GD_IDE_ONLY)
extension

View File

@@ -12,13 +12,15 @@ namespace gd {
void GD_CORE_API
BuiltinExtensionsImplementer::ImplementsExternalLayoutsExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"BuiltinExternalLayouts",
_("External layouts"),
_("Built-in extension providing actions and conditions related to "
"external layouts"),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"BuiltinExternalLayouts",
_("External layouts"),
_("Built-in extension providing actions and conditions related to "
"external layouts"),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("" /*TODO: Add a documentation page for this */);
#if defined(GD_IDE_ONLY)
extension

View File

@@ -11,12 +11,14 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsFileExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation("BuiltinFile",
_("Storage and files"),
_("Built-in extension providing functions "
"to store data and manipulate files."),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation("BuiltinFile",
_("Storage and files"),
_("Built-in extension providing functions "
"to store data and manipulate files."),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("/all-features/storage");
#if defined(GD_IDE_ONLY)
extension

View File

@@ -11,12 +11,14 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsJoystickExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"BuiltinJoystick",
_("Joysticks features"),
_("Built-in extension that enables the use of joysticks"),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"BuiltinJoystick",
_("Joysticks features"),
_("Built-in extension that enables the use of joysticks"),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("" /*TODO: Add a documentation page for this */);
#if defined(GD_IDE_ONLY)
extension

View File

@@ -11,12 +11,14 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsKeyboardExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"BuiltinKeyboard",
_("Keyboard features"),
_("Built-in extension that enables the use of a keyboard"),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"BuiltinKeyboard",
_("Keyboard features"),
_("Built-in extension that enables the use of a keyboard"),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("" /*TODO: Add a documentation page for this */);
#if defined(GD_IDE_ONLY)
extension

View File

@@ -11,12 +11,14 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsMouseExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"BuiltinMouse",
_("Mouse features"),
_("Built-in extension that enables the use of a mouse"),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"BuiltinMouse",
_("Mouse features"),
_("Built-in extension that enables the use of a mouse"),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("/events/mouse-touch");
#if defined(GD_IDE_ONLY)
extension

View File

@@ -11,12 +11,14 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsNetworkExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"BuiltinNetwork",
_("Basic internet features"),
_("Built-in extension providing network features."),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"BuiltinNetwork",
_("Basic internet features"),
_("Built-in extension providing network features."),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("/all-features/network");
#if defined(GD_IDE_ONLY)
extension

View File

@@ -11,23 +11,61 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"BuiltinScene",
_("Scene management features"),
_("This Built-in extension allows you to manipulate scenes"),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"BuiltinScene",
_("Scene management features"),
_("Built-in extension allowing to manipulate scenes and providing common features"),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("" /*TODO: Add a documentation page for this */);
#if defined(GD_IDE_ONLY)
extension
.AddExpression("Random",
_("Random value"),
_("Random value"),
_("Random integer"),
_("Random integer"),
_("Random"),
"res/actions/position.png")
.AddParameter("expression", _("Maximum value"));
extension
.AddExpression("RandomInRange",
_("Random integer in range"),
_("Random integer in range"),
_("Random"),
"res/actions/position.png")
.AddParameter("expression", _("Minimum value"))
.AddParameter("expression", _("Maximum value"));
extension
.AddExpression("RandomFloat",
_("Random float"),
_("Random float"),
_("Random"),
"res/actions/position.png")
.AddParameter("expression", _("Maximum value"));
extension
.AddExpression("RandomFloatInRange",
_("Random float in range"),
_("Random float in range"),
_("Random"),
"res/actions/position.png")
.AddParameter("expression", _("Minimum value"))
.AddParameter("expression", _("Maximum value"));
extension
.AddExpression("RandomWithStep",
_("Random value in steps"),
_("Random value in steps"),
_("Random"),
"res/actions/position.png")
.AddParameter("expression", _("Minimum value"))
.AddParameter("expression", _("Maximum value"))
.AddParameter("expression", _("Step"));
extension
.AddStrExpression("CurrentSceneName",
_("Current scene name"),

View File

@@ -14,13 +14,13 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSpriteExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"Sprite",
_("Sprite"),
_("Extension for adding animated objects in the scene, which can contain "
"animations with directions within each."),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation("Sprite",
_("Sprite"),
_("Sprite are animated object which can be used for most elements of a game."),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("/objects/sprite");
gd::ObjectMetadata& obj = extension.AddObject<SpriteObject>(
"Sprite",

View File

@@ -12,13 +12,15 @@ namespace gd {
void GD_CORE_API
BuiltinExtensionsImplementer::ImplementsStringInstructionsExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"BuiltinStringInstructions",
_("Text manipulation"),
_("Built-in extension providing expressions for manipulating text "
"objects."),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"BuiltinStringInstructions",
_("Text manipulation"),
_("Built-in extension providing expressions for manipulating text "
"objects."),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("" /*TODO: Add a documentation page for this */);
#if defined(GD_IDE_ONLY)
extension.AddStrExpression("NewLine",

View File

@@ -11,12 +11,14 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsTimeExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"BuiltinTime",
_("Time"),
_("Built-in extension providing actions and conditions related to time."),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation("BuiltinTime",
_("Time"),
_("Built-in extension providing actions and "
"conditions related to time."),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("/all-features/timers");
#if defined(GD_IDE_ONLY)

View File

@@ -11,12 +11,14 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsVariablesExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"BuiltinVariables",
_("Variable features"),
_("This Built-in extension allows the manipulation of variables"),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"BuiltinVariables",
_("Variable features"),
_("Built-in extension allowing to manipulate variables"),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("/all-features/variables");
#if defined(GD_IDE_ONLY)
extension

View File

@@ -11,12 +11,14 @@ namespace gd {
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsWindowExtension(
gd::PlatformExtension& extension) {
extension.SetExtensionInformation("BuiltinWindow",
_("Window features"),
_("This Built-in extension enables the "
"manipulation of the game's window"),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation("BuiltinWindow",
_("Window features"),
_("Built-in extension allowing to manipulate "
"the game window and canvas"),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("" /*TODO: Add a documentation page for this */);
#if defined(GD_IDE_ONLY)
extension

View File

@@ -75,7 +75,8 @@ gd::InstructionMetadata& BehaviorMetadata::AddCondition(
sentence,
group,
icon,
smallicon);
smallicon)
.SetHelpPath(GetHelpPath());
return conditionsInfos[nameWithNamespace];
#endif
}
@@ -98,7 +99,8 @@ gd::InstructionMetadata& BehaviorMetadata::AddAction(
sentence,
group,
icon,
smallicon);
smallicon)
.SetHelpPath(GetHelpPath());
return actionsInfos[nameWithNamespace];
#endif
}

View File

@@ -14,16 +14,10 @@
#endif
namespace gd {
class Behavior;
}
namespace gd {
class BehaviorsSharedData;
}
namespace gd {
class InstructionMetadata;
}
namespace gd {
class ExpressionMetadata;
}
} // namespace gd
class wxBitmap;
namespace gd {
@@ -110,6 +104,22 @@ class GD_CORE_API BehaviorMetadata {
*/
BehaviorMetadata& AddIncludeFile(const gd::String& includeFile);
/**
* Get the help path of the behavior, relative to the documentation root.
*/
const gd::String &GetHelpPath() const { return helpPath; }
/**
* Set the help path of the behavior, relative to the documentation root.
*
* The behavior instructions will have this help path set by
* default, unless you call SetHelpPath on them.
*/
BehaviorMetadata &SetHelpPath(const gd::String &path) {
helpPath = path;
return *this;
}
#if defined(GD_IDE_ONLY)
const gd::String& GetFullName() const { return fullname; }
const gd::String& GetDefaultName() const { return defaultName; }
@@ -136,6 +146,7 @@ class GD_CORE_API BehaviorMetadata {
#endif
private:
gd::String extensionNamespace;
gd::String helpPath;
#if defined(GD_IDE_ONLY)
gd::String fullname;
gd::String defaultName;

View File

@@ -28,7 +28,7 @@ InstructionMetadata::InstructionMetadata(const gd::String& extensionNamespace_,
const gd::String& smallIcon_)
: fullname(fullname_),
description(description_),
helpPage(),
helpPath(""),
sentence(sentence_),
group(group_),
iconFilename(icon_),

View File

@@ -22,7 +22,7 @@ class Project;
class Layout;
class EventsCodeGenerator;
class EventsCodeGenerationContext;
}
} // namespace gd
namespace gd {
@@ -86,7 +86,8 @@ class GD_CORE_API ParameterMetadata {
* "objectList". \see gd::ParameterMetadata::GetType
*/
static bool IsObject(const gd::String &parameterType) {
return parameterType == "object" || parameterType == "objectPtr" || parameterType == "objectList" ||
return parameterType == "object" || parameterType == "objectPtr" ||
parameterType == "objectList" ||
parameterType == "objectListWithoutPicking";
}
@@ -94,7 +95,8 @@ class GD_CORE_API ParameterMetadata {
* \brief Return true if the type of the parameter is "object", "objectPtr" or
* "objectList". \see gd::ParameterMetadata::GetType
*/
static bool IsExpression(const gd::String &type, const gd::String &parameterType) {
static bool IsExpression(const gd::String &type,
const gd::String &parameterType) {
if (type == "number") {
return parameterType == "expression" || parameterType == "camera";
} else if (type == "string") {
@@ -141,15 +143,15 @@ class GD_CORE_API InstructionMetadata {
bool CanHaveSubInstructions() const { return canHaveSubInstructions; }
/**
* Get the help page of the instruction.
* Get the help path of the instruction, relative to the documentation root.
*/
const gd::String &GetHelpPage() const { return helpPage; }
const gd::String &GetHelpPath() const { return helpPath; }
/**
* Set the help page of the instruction.
* Set the help path of the instruction, relative to the documentation root.
*/
InstructionMetadata &SetHelpPage(const gd::String &page) {
helpPage = page;
InstructionMetadata &SetHelpPath(const gd::String &path) {
helpPath = path;
return *this;
}
@@ -387,9 +389,7 @@ class GD_CORE_API InstructionMetadata {
* \brief Return the structure containing the information about code
* generation for the instruction.
*/
ExtraInformation &GetCodeExtraInformation() {
return codeExtraInformation;
}
ExtraInformation &GetCodeExtraInformation() { return codeExtraInformation; }
/**
* \brief Declare if the instruction being declared is somewhat manipulating
@@ -421,7 +421,7 @@ class GD_CORE_API InstructionMetadata {
private:
gd::String fullname;
gd::String description;
gd::String helpPage;
gd::String helpPath;
gd::String sentence;
gd::String group;
#if !defined(GD_NO_WX_GUI)

View File

@@ -21,252 +21,314 @@ gd::ObjectMetadata MetadataProvider::badObjectInfo;
gd::InstructionMetadata MetadataProvider::badInstructionMetadata;
gd::ExpressionMetadata MetadataProvider::badExpressionMetadata;
gd::ExpressionMetadata MetadataProvider::badStrExpressionMetadata;
gd::PlatformExtension MetadataProvider::badExtension;
/**
* Get the metadata about a behavior in a platform
*/
const BehaviorMetadata& MetadataProvider::GetBehaviorMetadata(
const gd::Platform& platform, gd::String behaviorType) {
for (std::size_t i = 0; i < platform.GetAllPlatformExtensions().size(); ++i) {
std::vector<gd::String> autosTypes =
platform.GetAllPlatformExtensions()[i]->GetBehaviorsTypes();
for (std::size_t j = 0; j < autosTypes.size(); ++j) {
if (autosTypes[j] == behaviorType)
return platform.GetAllPlatformExtensions()[i]->GetBehaviorMetadata(
behaviorType);
ExtensionAndMetadata<BehaviorMetadata>
MetadataProvider::GetExtensionAndBehaviorMetadata(const gd::Platform& platform,
gd::String behaviorType) {
for (auto& extension : platform.GetAllPlatformExtensions()) {
auto behaviorTypes = extension->GetBehaviorsTypes();
for (std::size_t j = 0; j < behaviorTypes.size(); ++j) {
if (behaviorTypes[j] == behaviorType)
return ExtensionAndMetadata<BehaviorMetadata>(
*extension, extension->GetBehaviorMetadata(behaviorType));
}
}
return badBehaviorInfo;
return ExtensionAndMetadata<BehaviorMetadata>(badExtension, badBehaviorInfo);
}
/**
* Get the metadata about an object in a platform
*/
const ObjectMetadata& MetadataProvider::GetObjectMetadata(
const gd::Platform& platform, gd::String objectType) {
for (std::size_t i = 0; i < platform.GetAllPlatformExtensions().size(); ++i) {
std::vector<gd::String> objectsTypes =
platform.GetAllPlatformExtensions()[i]->GetExtensionObjectsTypes();
const BehaviorMetadata& MetadataProvider::GetBehaviorMetadata(
const gd::Platform& platform, gd::String behaviorType) {
return GetExtensionAndBehaviorMetadata(platform, behaviorType).GetMetadata();
}
ExtensionAndMetadata<ObjectMetadata>
MetadataProvider::GetExtensionAndObjectMetadata(const gd::Platform& platform,
gd::String objectType) {
for (auto& extension : platform.GetAllPlatformExtensions()) {
auto objectsTypes = extension->GetExtensionObjectsTypes();
for (std::size_t j = 0; j < objectsTypes.size(); ++j) {
if (objectsTypes[j] == objectType)
return platform.GetAllPlatformExtensions()[i]->GetObjectMetadata(
objectType);
return ExtensionAndMetadata<ObjectMetadata>(
*extension, extension->GetObjectMetadata(objectType));
}
}
return badObjectInfo;
return ExtensionAndMetadata<ObjectMetadata>(badExtension, badObjectInfo);
}
const ObjectMetadata& MetadataProvider::GetObjectMetadata(
const gd::Platform& platform, gd::String objectType) {
return GetExtensionAndObjectMetadata(platform, objectType).GetMetadata();
}
ExtensionAndMetadata<InstructionMetadata>
MetadataProvider::GetExtensionAndActionMetadata(const gd::Platform& platform,
gd::String actionType) {
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& allActions = extension->GetAllActions();
if (allActions.find(actionType) != allActions.end())
return ExtensionAndMetadata<InstructionMetadata>(
*extension, allActions.find(actionType)->second);
const auto& objects = extension->GetExtensionObjectsTypes();
for (const gd::String& extObjectType : objects) {
const auto& allObjectsActions =
extension->GetAllActionsForObject(extObjectType);
if (allObjectsActions.find(actionType) != allObjectsActions.end())
return ExtensionAndMetadata<InstructionMetadata>(
*extension, allObjectsActions.find(actionType)->second);
}
const auto& autos = extension->GetBehaviorsTypes();
for (std::size_t j = 0; j < autos.size(); ++j) {
const auto& allAutosActions =
extension->GetAllActionsForBehavior(autos[j]);
if (allAutosActions.find(actionType) != allAutosActions.end())
return ExtensionAndMetadata<InstructionMetadata>(
*extension, allAutosActions.find(actionType)->second);
}
}
return ExtensionAndMetadata<InstructionMetadata>(badExtension,
badInstructionMetadata);
}
const gd::InstructionMetadata& MetadataProvider::GetActionMetadata(
const gd::Platform& platform, gd::String actionType) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::InstructionMetadata>& allActions =
extensions[i]->GetAllActions();
if (allActions.find(actionType) != allActions.end())
return allActions.find(actionType)->second;
return GetExtensionAndActionMetadata(platform, actionType).GetMetadata();
}
const vector<gd::String>& objects =
extensions[i]->GetExtensionObjectsTypes();
for (std::size_t j = 0; j < objects.size(); ++j) {
const std::map<gd::String, gd::InstructionMetadata>& allObjectsActions =
extensions[i]->GetAllActionsForObject(objects[j]);
if (allObjectsActions.find(actionType) != allObjectsActions.end())
return allObjectsActions.find(actionType)->second;
ExtensionAndMetadata<InstructionMetadata>
MetadataProvider::GetExtensionAndConditionMetadata(const gd::Platform& platform,
gd::String conditionType) {
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& allConditions = extension->GetAllConditions();
if (allConditions.find(conditionType) != allConditions.end())
return ExtensionAndMetadata<InstructionMetadata>(
*extension, allConditions.find(conditionType)->second);
const auto& objects = extension->GetExtensionObjectsTypes();
for (const gd::String& extObjectType : objects) {
const auto& allObjetsConditions =
extension->GetAllConditionsForObject(extObjectType);
if (allObjetsConditions.find(conditionType) != allObjetsConditions.end())
return ExtensionAndMetadata<InstructionMetadata>(
*extension, allObjetsConditions.find(conditionType)->second);
}
const vector<gd::String>& autos = extensions[i]->GetBehaviorsTypes();
const auto& autos = extension->GetBehaviorsTypes();
for (std::size_t j = 0; j < autos.size(); ++j) {
const std::map<gd::String, gd::InstructionMetadata>& allAutosActions =
extensions[i]->GetAllActionsForBehavior(autos[j]);
if (allAutosActions.find(actionType) != allAutosActions.end())
return allAutosActions.find(actionType)->second;
const auto& allAutosConditions =
extension->GetAllConditionsForBehavior(autos[j]);
if (allAutosConditions.find(conditionType) != allAutosConditions.end())
return ExtensionAndMetadata<InstructionMetadata>(
*extension, allAutosConditions.find(conditionType)->second);
}
}
return badInstructionMetadata;
return ExtensionAndMetadata<InstructionMetadata>(badExtension,
badInstructionMetadata);
}
const gd::InstructionMetadata& MetadataProvider::GetConditionMetadata(
const gd::Platform& platform, gd::String conditionType) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::InstructionMetadata>& allConditions =
extensions[i]->GetAllConditions();
if (allConditions.find(conditionType) != allConditions.end())
return allConditions.find(conditionType)->second;
return GetExtensionAndConditionMetadata(platform, conditionType)
.GetMetadata();
}
const vector<gd::String>& objects =
extensions[i]->GetExtensionObjectsTypes();
for (std::size_t j = 0; j < objects.size(); ++j) {
const std::map<gd::String, gd::InstructionMetadata>& allObjetsConditions =
extensions[i]->GetAllConditionsForObject(objects[j]);
if (allObjetsConditions.find(conditionType) != allObjetsConditions.end())
return allObjetsConditions.find(conditionType)->second;
}
const vector<gd::String>& autos = extensions[i]->GetBehaviorsTypes();
for (std::size_t j = 0; j < autos.size(); ++j) {
const std::map<gd::String, gd::InstructionMetadata>& allAutosConditions =
extensions[i]->GetAllConditionsForBehavior(autos[j]);
if (allAutosConditions.find(conditionType) != allAutosConditions.end())
return allAutosConditions.find(conditionType)->second;
ExtensionAndMetadata<ExpressionMetadata>
MetadataProvider::GetExtensionAndObjectExpressionMetadata(
const gd::Platform& platform, gd::String objectType, gd::String exprType) {
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& objects = extension->GetExtensionObjectsTypes();
if (find(objects.begin(), objects.end(), objectType) != objects.end()) {
const auto& allObjectExpressions =
extension->GetAllExpressionsForObject(objectType);
if (allObjectExpressions.find(exprType) != allObjectExpressions.end())
return ExtensionAndMetadata<ExpressionMetadata>(
*extension, allObjectExpressions.find(exprType)->second);
}
}
return badInstructionMetadata;
// Then check base
for (auto& extension : extensions) {
const auto& allObjectExpressions =
extension->GetAllExpressionsForObject("");
if (allObjectExpressions.find(exprType) != allObjectExpressions.end())
return ExtensionAndMetadata<ExpressionMetadata>(
*extension, allObjectExpressions.find(exprType)->second);
}
return ExtensionAndMetadata<ExpressionMetadata>(badExtension,
badExpressionMetadata);
}
const gd::ExpressionMetadata& MetadataProvider::GetObjectExpressionMetadata(
const gd::Platform& platform, gd::String objectType, gd::String exprType) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const vector<gd::String>& objects =
extensions[i]->GetExtensionObjectsTypes();
if (find(objects.begin(), objects.end(), objectType) != objects.end()) {
const std::map<gd::String, gd::ExpressionMetadata>& allObjectExpressions =
extensions[i]->GetAllExpressionsForObject(objectType);
if (allObjectExpressions.find(exprType) != allObjectExpressions.end())
return allObjectExpressions.find(exprType)->second;
return GetExtensionAndObjectExpressionMetadata(platform, objectType, exprType)
.GetMetadata();
}
ExtensionAndMetadata<ExpressionMetadata>
MetadataProvider::GetExtensionAndBehaviorExpressionMetadata(
const gd::Platform& platform, gd::String autoType, gd::String exprType) {
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& autos = extension->GetBehaviorsTypes();
if (find(autos.begin(), autos.end(), autoType) != autos.end()) {
const auto& allAutoExpressions =
extension->GetAllExpressionsForBehavior(autoType);
if (allAutoExpressions.find(exprType) != allAutoExpressions.end())
return ExtensionAndMetadata<ExpressionMetadata>(
*extension, allAutoExpressions.find(exprType)->second);
}
}
// Then check base
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& allObjectExpressions =
extensions[i]->GetAllExpressionsForObject("");
if (allObjectExpressions.find(exprType) != allObjectExpressions.end())
return allObjectExpressions.find(exprType)->second;
for (auto& extension : extensions) {
const auto& allAutoExpressions =
extension->GetAllExpressionsForBehavior("");
if (allAutoExpressions.find(exprType) != allAutoExpressions.end())
return ExtensionAndMetadata<ExpressionMetadata>(
*extension, allAutoExpressions.find(exprType)->second);
}
return badExpressionMetadata;
return ExtensionAndMetadata<ExpressionMetadata>(badExtension,
badExpressionMetadata);
}
const gd::ExpressionMetadata& MetadataProvider::GetBehaviorExpressionMetadata(
const gd::Platform& platform, gd::String autoType, gd::String exprType) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const vector<gd::String>& autos = extensions[i]->GetBehaviorsTypes();
if (find(autos.begin(), autos.end(), autoType) != autos.end()) {
const std::map<gd::String, gd::ExpressionMetadata>& allAutoExpressions =
extensions[i]->GetAllExpressionsForBehavior(autoType);
if (allAutoExpressions.find(exprType) != allAutoExpressions.end())
return allAutoExpressions.find(exprType)->second;
}
return GetExtensionAndBehaviorExpressionMetadata(platform, autoType, exprType)
.GetMetadata();
}
ExtensionAndMetadata<ExpressionMetadata>
MetadataProvider::GetExtensionAndExpressionMetadata(
const gd::Platform& platform, gd::String exprType) {
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& allExpr = extension->GetAllExpressions();
if (allExpr.find(exprType) != allExpr.end())
return ExtensionAndMetadata<ExpressionMetadata>(
*extension, allExpr.find(exprType)->second);
}
// Then check base
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& allAutoExpressions =
extensions[i]->GetAllExpressionsForBehavior("");
if (allAutoExpressions.find(exprType) != allAutoExpressions.end())
return allAutoExpressions.find(exprType)->second;
}
return badExpressionMetadata;
return ExtensionAndMetadata<ExpressionMetadata>(badExtension,
badExpressionMetadata);
}
const gd::ExpressionMetadata& MetadataProvider::GetExpressionMetadata(
const gd::Platform& platform, gd::String exprType) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& allExpr =
extensions[i]->GetAllExpressions();
if (allExpr.find(exprType) != allExpr.end())
return allExpr.find(exprType)->second;
}
return badExpressionMetadata;
return GetExtensionAndExpressionMetadata(platform, exprType).GetMetadata();
}
const gd::ExpressionMetadata& MetadataProvider::GetObjectStrExpressionMetadata(
ExtensionAndMetadata<ExpressionMetadata>
MetadataProvider::GetExtensionAndObjectStrExpressionMetadata(
const gd::Platform& platform, gd::String objectType, gd::String exprType) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const vector<gd::String>& objects =
extensions[i]->GetExtensionObjectsTypes();
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& objects = extension->GetExtensionObjectsTypes();
if (find(objects.begin(), objects.end(), objectType) != objects.end()) {
const std::map<gd::String, gd::ExpressionMetadata>&
allObjectStrExpressions =
extensions[i]->GetAllStrExpressionsForObject(objectType);
const auto& allObjectStrExpressions =
extension->GetAllStrExpressionsForObject(objectType);
if (allObjectStrExpressions.find(exprType) !=
allObjectStrExpressions.end())
return allObjectStrExpressions.find(exprType)->second;
return ExtensionAndMetadata<ExpressionMetadata>(
*extension, allObjectStrExpressions.find(exprType)->second);
}
}
// Then check in functions of "Base object".
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>&
allObjectStrExpressions =
extensions[i]->GetAllStrExpressionsForObject("");
for (auto& extension : extensions) {
const auto& allObjectStrExpressions =
extension->GetAllStrExpressionsForObject("");
if (allObjectStrExpressions.find(exprType) != allObjectStrExpressions.end())
return allObjectStrExpressions.find(exprType)->second;
return ExtensionAndMetadata<ExpressionMetadata>(
*extension, allObjectStrExpressions.find(exprType)->second);
}
return badStrExpressionMetadata;
return ExtensionAndMetadata<ExpressionMetadata>(badExtension,
badStrExpressionMetadata);
}
const gd::ExpressionMetadata& MetadataProvider::GetObjectStrExpressionMetadata(
const gd::Platform& platform, gd::String objectType, gd::String exprType) {
return GetExtensionAndObjectStrExpressionMetadata(
platform, objectType, exprType)
.GetMetadata();
}
ExtensionAndMetadata<ExpressionMetadata>
MetadataProvider::GetExtensionAndBehaviorStrExpressionMetadata(
const gd::Platform& platform, gd::String autoType, gd::String exprType) {
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& autos = extension->GetBehaviorsTypes();
if (find(autos.begin(), autos.end(), autoType) != autos.end()) {
const auto& allBehaviorStrExpressions =
extension->GetAllStrExpressionsForBehavior(autoType);
if (allBehaviorStrExpressions.find(exprType) !=
allBehaviorStrExpressions.end())
return ExtensionAndMetadata<ExpressionMetadata>(
*extension, allBehaviorStrExpressions.find(exprType)->second);
}
}
// Then check in functions of "Base object".
for (auto& extension : extensions) {
const auto& allBehaviorStrExpressions =
extension->GetAllStrExpressionsForBehavior("");
if (allBehaviorStrExpressions.find(exprType) !=
allBehaviorStrExpressions.end())
return ExtensionAndMetadata<ExpressionMetadata>(
*extension, allBehaviorStrExpressions.find(exprType)->second);
}
return ExtensionAndMetadata<ExpressionMetadata>(badExtension,
badStrExpressionMetadata);
}
const gd::ExpressionMetadata&
MetadataProvider::GetBehaviorStrExpressionMetadata(const gd::Platform& platform,
gd::String autoType,
gd::String exprType) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const vector<gd::String>& autos = extensions[i]->GetBehaviorsTypes();
if (find(autos.begin(), autos.end(), autoType) != autos.end()) {
const std::map<gd::String, gd::ExpressionMetadata>&
allBehaviorStrExpressions =
extensions[i]->GetAllStrExpressionsForBehavior(autoType);
if (allBehaviorStrExpressions.find(exprType) !=
allBehaviorStrExpressions.end())
return allBehaviorStrExpressions.find(exprType)->second;
}
return GetExtensionAndBehaviorStrExpressionMetadata(
platform, autoType, exprType)
.GetMetadata();
}
ExtensionAndMetadata<ExpressionMetadata>
MetadataProvider::GetExtensionAndStrExpressionMetadata(
const gd::Platform& platform, gd::String exprType) {
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& allExpr = extension->GetAllStrExpressions();
if (allExpr.find(exprType) != allExpr.end())
return ExtensionAndMetadata<ExpressionMetadata>(
*extension, allExpr.find(exprType)->second);
}
// Then check in functions of "Base object".
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>&
allBehaviorStrExpressions =
extensions[i]->GetAllStrExpressionsForBehavior("");
if (allBehaviorStrExpressions.find(exprType) !=
allBehaviorStrExpressions.end())
return allBehaviorStrExpressions.find(exprType)->second;
}
return badStrExpressionMetadata;
return ExtensionAndMetadata<ExpressionMetadata>(badExtension,
badStrExpressionMetadata);
}
const gd::ExpressionMetadata& MetadataProvider::GetStrExpressionMetadata(
const gd::Platform& platform, gd::String exprType) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& allExpr =
extensions[i]->GetAllStrExpressions();
if (allExpr.find(exprType) != allExpr.end())
return allExpr.find(exprType)->second;
}
return badStrExpressionMetadata;
return GetExtensionAndStrExpressionMetadata(platform, exprType).GetMetadata();
}
bool MetadataProvider::HasAction(const gd::Platform& platform,
gd::String name) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
auto& extensions = platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::InstructionMetadata>& actions =
extensions[i]->GetAllActions();
for (auto& extension : extensions) {
const auto& actions = extension->GetAllActions();
if (actions.find(name) != actions.end()) return true;
}
@@ -276,18 +338,15 @@ bool MetadataProvider::HasAction(const gd::Platform& platform,
bool MetadataProvider::HasObjectAction(const gd::Platform& platform,
gd::String objectType,
gd::String name) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::InstructionMetadata>& actions =
extensions[i]->GetAllActionsForObject(objectType);
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& actions = extension->GetAllActionsForObject(objectType);
if (actions.find(name) != actions.end()) return true;
}
// Then check in functions of "Base object".
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::InstructionMetadata>& actions =
extensions[i]->GetAllActionsForObject("");
for (auto& extension : extensions) {
const auto& actions = extension->GetAllActionsForObject("");
if (actions.find(name) != actions.end()) return true;
}
@@ -297,18 +356,15 @@ bool MetadataProvider::HasObjectAction(const gd::Platform& platform,
bool MetadataProvider::HasBehaviorAction(const gd::Platform& platform,
gd::String behaviorType,
gd::String name) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::InstructionMetadata>& actions =
extensions[i]->GetAllActionsForBehavior(behaviorType);
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& actions = extension->GetAllActionsForBehavior(behaviorType);
if (actions.find(name) != actions.end()) return true;
}
// Then check in functions of "Base object".
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::InstructionMetadata>& actions =
extensions[i]->GetAllActionsForBehavior("");
for (auto& extension : extensions) {
const auto& actions = extension->GetAllActionsForBehavior("");
if (actions.find(name) != actions.end()) return true;
}
@@ -317,11 +373,9 @@ bool MetadataProvider::HasBehaviorAction(const gd::Platform& platform,
bool MetadataProvider::HasCondition(const gd::Platform& platform,
gd::String name) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::InstructionMetadata>& conditions =
extensions[i]->GetAllConditions();
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& conditions = extension->GetAllConditions();
if (conditions.find(name) != conditions.end()) return true;
}
@@ -331,18 +385,15 @@ bool MetadataProvider::HasCondition(const gd::Platform& platform,
bool MetadataProvider::HasObjectCondition(const gd::Platform& platform,
gd::String objectType,
gd::String name) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::InstructionMetadata>& conditions =
extensions[i]->GetAllConditionsForObject(objectType);
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& conditions = extension->GetAllConditionsForObject(objectType);
if (conditions.find(name) != conditions.end()) return true;
}
// Then check in functions of "Base object".
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::InstructionMetadata>& conditions =
extensions[i]->GetAllConditionsForObject("");
for (auto& extension : extensions) {
const auto& conditions = extension->GetAllConditionsForObject("");
if (conditions.find(name) != conditions.end()) return true;
}
@@ -352,18 +403,16 @@ bool MetadataProvider::HasObjectCondition(const gd::Platform& platform,
bool MetadataProvider::HasBehaviorCondition(const gd::Platform& platform,
gd::String behaviorType,
gd::String name) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::InstructionMetadata>& conditions =
extensions[i]->GetAllConditionsForBehavior(behaviorType);
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& conditions =
extension->GetAllConditionsForBehavior(behaviorType);
if (conditions.find(name) != conditions.end()) return true;
}
// Then check in functions of "Base object".
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::InstructionMetadata>& conditions =
extensions[i]->GetAllConditionsForBehavior("");
for (auto& extension : extensions) {
const auto& conditions = extension->GetAllConditionsForBehavior("");
if (conditions.find(name) != conditions.end()) return true;
}
@@ -372,11 +421,9 @@ bool MetadataProvider::HasBehaviorCondition(const gd::Platform& platform,
bool MetadataProvider::HasExpression(const gd::Platform& platform,
gd::String name) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& expressions =
extensions[i]->GetAllExpressions();
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& expressions = extension->GetAllExpressions();
if (expressions.find(name) != expressions.end()) return true;
}
@@ -386,18 +433,15 @@ bool MetadataProvider::HasExpression(const gd::Platform& platform,
bool MetadataProvider::HasObjectExpression(const gd::Platform& platform,
gd::String objectType,
gd::String name) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& expressions =
extensions[i]->GetAllExpressionsForObject(objectType);
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& expressions = extension->GetAllExpressionsForObject(objectType);
if (expressions.find(name) != expressions.end()) return true;
}
// Then check in functions of "Base object".
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& expressions =
extensions[i]->GetAllExpressionsForObject("");
for (auto& extension : extensions) {
const auto& expressions = extension->GetAllExpressionsForObject("");
if (expressions.find(name) != expressions.end()) return true;
}
@@ -407,18 +451,16 @@ bool MetadataProvider::HasObjectExpression(const gd::Platform& platform,
bool MetadataProvider::HasBehaviorExpression(const gd::Platform& platform,
gd::String behaviorType,
gd::String name) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& expressions =
extensions[i]->GetAllExpressionsForBehavior(behaviorType);
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& expressions =
extension->GetAllExpressionsForBehavior(behaviorType);
if (expressions.find(name) != expressions.end()) return true;
}
// Then check in functions of "Base object".
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& expressions =
extensions[i]->GetAllExpressionsForBehavior("");
for (auto& extension : extensions) {
const auto& expressions = extension->GetAllExpressionsForBehavior("");
if (expressions.find(name) != expressions.end()) return true;
}
@@ -427,11 +469,9 @@ bool MetadataProvider::HasBehaviorExpression(const gd::Platform& platform,
bool MetadataProvider::HasStrExpression(const gd::Platform& platform,
gd::String name) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& expressions =
extensions[i]->GetAllStrExpressions();
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& expressions = extension->GetAllStrExpressions();
if (expressions.find(name) != expressions.end()) return true;
}
@@ -441,18 +481,16 @@ bool MetadataProvider::HasStrExpression(const gd::Platform& platform,
bool MetadataProvider::HasObjectStrExpression(const gd::Platform& platform,
gd::String objectType,
gd::String name) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& expressions =
extensions[i]->GetAllStrExpressionsForObject(objectType);
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& expressions =
extension->GetAllStrExpressionsForObject(objectType);
if (expressions.find(name) != expressions.end()) return true;
}
// Then check in functions of "Base object".
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& expressions =
extensions[i]->GetAllStrExpressionsForObject("");
for (auto& extension : extensions) {
const auto& expressions = extension->GetAllStrExpressionsForObject("");
if (expressions.find(name) != expressions.end()) return true;
}
@@ -462,18 +500,16 @@ bool MetadataProvider::HasObjectStrExpression(const gd::Platform& platform,
bool MetadataProvider::HasBehaviorStrExpression(const gd::Platform& platform,
gd::String behaviorType,
gd::String name) {
std::vector<std::shared_ptr<PlatformExtension> > extensions =
platform.GetAllPlatformExtensions();
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& expressions =
extensions[i]->GetAllStrExpressionsForBehavior(behaviorType);
auto& extensions = platform.GetAllPlatformExtensions();
for (auto& extension : extensions) {
const auto& expressions =
extension->GetAllStrExpressionsForBehavior(behaviorType);
if (expressions.find(name) != expressions.end()) return true;
}
// Then check in functions of "Base object".
for (std::size_t i = 0; i < extensions.size(); ++i) {
const std::map<gd::String, gd::ExpressionMetadata>& expressions =
extensions[i]->GetAllStrExpressionsForBehavior("");
for (auto& extension : extensions) {
const auto& expressions = extension->GetAllStrExpressionsForBehavior("");
if (expressions.find(name) != expressions.end()) return true;
}

View File

@@ -9,52 +9,159 @@
#include "GDCore/String.h"
namespace gd {
class BehaviorMetadata;
}
namespace gd {
class ObjectMetadata;
}
namespace gd {
class ExpressionMetadata;
}
namespace gd {
class ExpressionMetadata;
}
namespace gd {
class Platform;
}
class PlatformExtension;
} // namespace gd
namespace gd {
/**
* \brief A container for metadata about an object/behavior/instruction/expression
* and its associated extension.
*/
template <class T>
class ExtensionAndMetadata {
public:
ExtensionAndMetadata(const gd::PlatformExtension& extension_,
const T& metadata_)
: extension(&extension_), metadata(&metadata_){};
/**
* \brief Default constructor, only here to satisfy Emscripten bindings.
* \warning Please do not use.
* \private
*/
ExtensionAndMetadata()
: extension(nullptr), metadata(nullptr){};
/**
* \brief Get the associated extension.
*/
const gd::PlatformExtension& GetExtension() { return *extension; };
/**
* \brief Get the metadata.
*/
const T& GetMetadata() { return *metadata; };
private:
const gd::PlatformExtension* extension;
const T* metadata;
};
/**
* \brief Allow to easily get metadata for instructions (i.e actions and
* conditions), objects and behaviors.
* conditions), expressions, objects and behaviors.
*
* \ingroup PlatformDefinition
*/
class GD_CORE_API MetadataProvider {
public:
/**
* Get the metadata about a behavior in a project using a platform
* Get the metadata about a behavior, and its associated extension.
*/
static ExtensionAndMetadata<BehaviorMetadata> GetExtensionAndBehaviorMetadata(
const gd::Platform& platform, gd::String behaviorType);
/**
* Get the metadata about an object, and its associated extension.
*/
static ExtensionAndMetadata<ObjectMetadata> GetExtensionAndObjectMetadata(
const gd::Platform& platform, gd::String type);
/**
* Get the metadata of an action, and its associated extension.
* Works for object, behaviors and static actions.
*/
static ExtensionAndMetadata<InstructionMetadata>
GetExtensionAndActionMetadata(const gd::Platform& platform,
gd::String actionType);
/**
* Get the metadata of a condition, and its associated extension.
* Works for object, behaviors and static conditions.
*/
static ExtensionAndMetadata<InstructionMetadata>
GetExtensionAndConditionMetadata(const gd::Platform& platform,
gd::String conditionType);
/**
* Get information about an expression, and its associated extension.
* Works for static expressions.
*/
static ExtensionAndMetadata<ExpressionMetadata>
GetExtensionAndExpressionMetadata(const gd::Platform& platform,
gd::String exprType);
/**
* Get information about an expression, and its associated extension.
* Works for object expressions.
*/
static ExtensionAndMetadata<ExpressionMetadata>
GetExtensionAndObjectExpressionMetadata(const gd::Platform& platform,
gd::String objectType,
gd::String exprType);
/**
* Get information about an expression, and its associated extension.
* Works for behavior expressions.
*/
static ExtensionAndMetadata<ExpressionMetadata>
GetExtensionAndBehaviorExpressionMetadata(const gd::Platform& platform,
gd::String autoType,
gd::String exprType);
/**
* Get information about a string expression, and its associated extension.
* Works for static expressions.
*/
static ExtensionAndMetadata<ExpressionMetadata>
GetExtensionAndStrExpressionMetadata(const gd::Platform& platform,
gd::String exprType);
/**
* Get information about a string expression, and its associated extension.
* Works for object expressions.
*/
static ExtensionAndMetadata<ExpressionMetadata>
GetExtensionAndObjectStrExpressionMetadata(const gd::Platform& platform,
gd::String objectType,
gd::String exprType);
/**
* Get information about a string expression, and its associated extension.
* Works for behavior expressions.
*/
static ExtensionAndMetadata<ExpressionMetadata>
GetExtensionAndBehaviorStrExpressionMetadata(const gd::Platform& platform,
gd::String autoType,
gd::String exprType);
/**
* Get the metadata about a behavior.
*/
static const BehaviorMetadata& GetBehaviorMetadata(
const gd::Platform& platform, gd::String behaviorType);
/**
* Get the metadata about an object in a project using a platform
* Get the metadata about an object.
*/
static const ObjectMetadata& GetObjectMetadata(const gd::Platform& platform,
gd::String type);
/**
* Get the metadata of an action.
* Must work for object, behaviors and static actions.
* Works for object, behaviors and static actions.
*/
static const gd::InstructionMetadata& GetActionMetadata(
const gd::Platform& platform, gd::String actionType);
/**
* Get the metadata of a condition.
* Must Work for object, behaviors and static conditions.
* Works for object, behaviors and static conditions.
*/
static const gd::InstructionMetadata& GetConditionMetadata(
const gd::Platform& platform, gd::String conditionType);
@@ -81,109 +188,109 @@ class GD_CORE_API MetadataProvider {
const gd::Platform& platform, gd::String autoType, gd::String exprType);
/**
* Get information about a gd::String expression from its type
* Get information about a string expression from its type
* Works for static expressions.
*/
static const gd::ExpressionMetadata& GetStrExpressionMetadata(
const gd::Platform& platform, gd::String exprType);
/**
* Get information about a gd::String expression from its type
* Get information about a string expression from its type
* Works for object expressions.
*/
static const gd::ExpressionMetadata& GetObjectStrExpressionMetadata(
const gd::Platform& platform, gd::String objectType, gd::String exprType);
/**
* Get information about a gd::String expression from its type
* Get information about a string expression from its type
* Works for behavior expressions.
*/
static const gd::ExpressionMetadata& GetBehaviorStrExpressionMetadata(
const gd::Platform& platform, gd::String autoType, gd::String exprType);
/**
* Verifying if a ( static ) condition exists
* @return true if the ( static ) condition exists
* \brief Check if a (static) condition exists
* @return true if the (static) condition exists
*/
static bool HasCondition(const gd::Platform& platform, gd::String name);
/**
* Verifying if a ( static ) action exists
* @return true if the ( static ) action exists
* \brief Check if a (static) action exists
* @return true if the (static) action exists
*/
static bool HasAction(const gd::Platform& platform, gd::String name);
/**
* Verifying if a ( object ) action exists
* @return true if the ( object ) action exists
* \brief Check if a (object) action exists
* @return true if the (object) action exists
*/
static bool HasObjectAction(const gd::Platform& platform,
gd::String objectType,
gd::String name);
/**
* Verifying if a ( object ) condition exists
* @return true if the ( object ) condition exists
* \brief Check if a (object) condition exists
* @return true if the (object) condition exists
*/
static bool HasObjectCondition(const gd::Platform& platform,
gd::String objectType,
gd::String name);
/**
* Verifying if a ( Behavior ) action exists
* @return true if the ( Behavior ) action exists
* \brief Check if a (behavior) action exists
* @return true if the (behavior) action exists
*/
static bool HasBehaviorAction(const gd::Platform& platform,
gd::String behaviorType,
gd::String name);
/**
* Verifying if a ( Behavior ) condition exists
* @return true if the ( Behavior ) condition exists
* \brief Check if a (behavior) condition exists
* @return true if the (behavior) condition exists
*/
static bool HasBehaviorCondition(const gd::Platform& platform,
gd::String behaviorType,
gd::String name);
/**
* Verifying if a ( static ) expression exists
* @return true if the ( static ) expression exists
* \brief Check if a (static) expression exists
* @return true if the (static) expression exists
*/
static bool HasExpression(const gd::Platform& platform, gd::String name);
/**
* Verifying if a ( object ) expression exists
* @return true if the ( object ) expression exists
* \brief Check if a (object) expression exists
* @return true if the (object) expression exists
*/
static bool HasObjectExpression(const gd::Platform& platform,
gd::String objectType,
gd::String name);
/**
* Verifying if a ( behavior ) expression exists
* @return true if the ( behavior ) expression exists
* \brief Check if a (behavior) expression exists
* @return true if the (behavior) expression exists
*/
static bool HasBehaviorExpression(const gd::Platform& platform,
gd::String behaviorType,
gd::String name);
/**
* Verifying if a ( static ) gd::String expression exists
* @return true if the ( static ) gd::String expression exists
* \brief Check if a (static) string expression exists
* @return true if the (static) string expression exists
*/
static bool HasStrExpression(const gd::Platform& platform, gd::String name);
/**
* Verifying if a ( object ) gd::String expression exists
* @return true if the ( object ) gd::String expression exists
* \brief Check if a (object) string expression exists
* @return true if the (object) string expression exists
*/
static bool HasObjectStrExpression(const gd::Platform& platform,
gd::String objectType,
gd::String name);
/**
* Verifying if a ( object ) gd::String expression exists
* @return true if the ( object ) gd::String expression exists
* \brief Check if a (behavior) string expression exists
* @return true if the (behavior) string expression exists
*/
static bool HasBehaviorStrExpression(const gd::Platform& platform,
gd::String behaviorType,
@@ -194,6 +301,7 @@ class GD_CORE_API MetadataProvider {
private:
MetadataProvider();
static PlatformExtension badExtension;
static BehaviorMetadata badBehaviorInfo;
static ObjectMetadata badObjectInfo;
static gd::InstructionMetadata badInstructionMetadata;

View File

@@ -109,7 +109,8 @@ gd::InstructionMetadata& ObjectMetadata::AddCondition(
sentence,
group,
icon,
smallicon);
smallicon)
.SetHelpPath(GetHelpPath());
return conditionsInfos[nameWithNamespace];
#endif
}
@@ -132,7 +133,8 @@ gd::InstructionMetadata& ObjectMetadata::AddAction(
sentence,
group,
icon,
smallicon);
smallicon)
.SetHelpPath(GetHelpPath());
return actionsInfos[nameWithNamespace];
#endif
}

View File

@@ -117,6 +117,22 @@ class GD_CORE_API ObjectMetadata {
*/
ObjectMetadata& SetBitmapIcon(const wxBitmap& bitmap_);
/**
* Get the help path of the object, relative to the documentation root.
*/
const gd::String &GetHelpPath() const { return helpPath; }
/**
* Set the help path of the object, relative to the documentation root.
*
* The object instructions will have this help path set by
* default, unless you call SetHelpPath on them.
*/
ObjectMetadata &SetHelpPath(const gd::String &path) {
helpPath = path;
return *this;
}
const gd::String& GetName() const { return name; }
#if defined(GD_IDE_ONLY)
const gd::String& GetFullName() const { return fullname; }
@@ -131,6 +147,7 @@ class GD_CORE_API ObjectMetadata {
/**
* \brief Set the URL pointing to the help page about this object
* \note The path to the page must be relative to the wiki url.
* \deprecated Use SetHelpPath instead
*/
ObjectMetadata& SetHelpUrl(const gd::String& url);
@@ -160,8 +177,9 @@ class GD_CORE_API ObjectMetadata {
private:
gd::String extensionNamespace;
gd::String name;
gd::String helpPath;
#if defined(GD_IDE_ONLY)
gd::String helpUrl;
gd::String helpUrl; ///< Deprecated. Use helpPath instead.
gd::String fullname;
gd::String description;
gd::String iconFilename;

View File

@@ -50,7 +50,8 @@ gd::InstructionMetadata& PlatformExtension::AddCondition(
sentence,
group,
icon,
smallicon);
smallicon)
.SetHelpPath(GetHelpPath());
return conditionsInfos[nameWithNamespace];
#endif
}
@@ -73,7 +74,8 @@ gd::InstructionMetadata& PlatformExtension::AddAction(
sentence,
group,
icon,
smallicon);
smallicon)
.SetHelpPath(GetHelpPath());
return actionsInfos[nameWithNamespace];
#endif
}
@@ -124,13 +126,13 @@ gd::ObjectMetadata& PlatformExtension::AddObject(
std::shared_ptr<gd::Object> instance) {
gd::String nameWithNamespace =
GetNameSpace().empty() ? name : GetNameSpace() + name;
objectsInfos[nameWithNamespace] =
ObjectMetadata(GetNameSpace(),
nameWithNamespace,
fullname,
description,
icon24x24,
instance);
objectsInfos[nameWithNamespace] = ObjectMetadata(GetNameSpace(),
nameWithNamespace,
fullname,
description,
icon24x24,
instance)
.SetHelpPath(GetHelpPath());
return objectsInfos[nameWithNamespace];
}
@@ -156,7 +158,8 @@ gd::BehaviorMetadata& PlatformExtension::AddBehavior(
icon24x24,
className,
instance,
sharedDatasInstance);
sharedDatasInstance)
.SetHelpPath(GetHelpPath());
return behaviorsInfo[nameWithNamespace];
}
@@ -180,17 +183,19 @@ gd::EventMetadata& PlatformExtension::AddEvent(
#endif
}
void PlatformExtension::SetExtensionInformation(const gd::String& name_,
const gd::String& fullname_,
const gd::String& description_,
const gd::String& author_,
const gd::String& license_) {
PlatformExtension& PlatformExtension::SetExtensionInformation(
const gd::String& name_,
const gd::String& fullname_,
const gd::String& description_,
const gd::String& author_,
const gd::String& license_) {
name = name_;
fullname = fullname_;
informations = description_;
author = author_;
license = license_;
SetNameSpace(name_);
return *this;
}
std::vector<gd::String> PlatformExtension::GetExtensionObjectsTypes() const {

View File

@@ -30,9 +30,10 @@ class ArbitraryResourceWorker;
class BehaviorsSharedData;
class Behavior;
class Object;
}
} // namespace gd
typedef std::function<std::unique_ptr<gd::Object>(gd::String name)> CreateFunPtr;
typedef std::function<std::unique_ptr<gd::Object>(gd::String name)>
CreateFunPtr;
namespace gd {
@@ -85,11 +86,24 @@ class GD_CORE_API PlatformExtension {
/**
* \brief Must be called to declare the main information about the extension.
*/
void SetExtensionInformation(const gd::String& name_,
const gd::String& fullname_,
const gd::String& description_,
const gd::String& author_,
const gd::String& license_);
PlatformExtension& SetExtensionInformation(const gd::String& name_,
const gd::String& fullname_,
const gd::String& description_,
const gd::String& author_,
const gd::String& license_);
/**
* \brief Set the path to the help, relative to the wiki/documentation root.
* For example, "/all-features/collisions" for
* "http://wiki.compilgames.net/doku.php/gdevelop5/all-features/collisions".
*
* The instructions, objects and behaviors will have this help path set by
* default, unless you call SetHelpPath on them.
*/
PlatformExtension& SetExtensionHelpPath(const gd::String& helpPath_) {
helpPath = helpPath_;
return *this;
}
/**
* \brief Mark this extension as deprecated: the IDE will hide it from the
@@ -165,7 +179,8 @@ class GD_CORE_API PlatformExtension {
* \param icon The 24x24 icon of the object:
res/icons_[SkinName]/[iconName]24.png will be first tried,
* and then if it does not exists, the full entered name will be tried.
* \param instance The "blueprint" object to be copied when a new object is asked for.
* \param instance The "blueprint" object to be copied when a new object is
asked for.
*/
gd::ObjectMetadata& AddObject(const gd::String& name_,
const gd::String& fullname_,
@@ -234,6 +249,12 @@ class GD_CORE_API PlatformExtension {
*/
const gd::String& GetLicense() const { return license; }
/**
* \brief Return the help path of extension, relative to the
* wiki/documentation root.
*/
const gd::String& GetHelpPath() const { return helpPath; }
/**
* \brief Check if the extension is flagged as being deprecated.
*/
@@ -427,7 +448,10 @@ class GD_CORE_API PlatformExtension {
gd::String informations; ///< Description displayed to users at edittime
gd::String author; ///< Author displayed to users at edittime
gd::String license; ///< License name displayed to users at edittime
bool deprecated;
bool deprecated; ///< true if the extension is deprecated and shouldn't be
///< shown in IDE.
gd::String helpPath; ///< The relative path to the help for this extension in
///< the documentation.
std::map<gd::String, gd::ObjectMetadata> objectsInfos;
std::map<gd::String, gd::BehaviorMetadata> behaviorsInfo;

View File

@@ -27,7 +27,8 @@ gd::ObjectMetadata& PlatformExtension::AddObject(const gd::String& name,
icon24x24,
[](gd::String name) -> std::unique_ptr<gd::Object> {
return gd::make_unique<T>(name);
});
})
.SetHelpPath(GetHelpPath());
return objectsInfos[nameWithNamespace];
}

View File

@@ -6,6 +6,7 @@
#include "GDCore/IDE/Events/ArbitraryEventsWorker.h"
#include <map>
#include <memory>
#include <iostream>
#include <vector>
#include "GDCore/Events/Event.h"
#include "GDCore/Events/EventsList.h"

View File

@@ -12,11 +12,7 @@
#include "GDCore/String.h"
namespace gd {
class Instruction;
}
namespace gd {
class BaseEvent;
}
namespace gd {
class EventsList;
}

View File

@@ -11,26 +11,12 @@
#include "GDCore/String.h"
namespace gd {
class EventsList;
}
namespace gd {
class Layout;
}
namespace gd {
class Platform;
}
namespace gd {
class Project;
}
namespace gd {
class ExternalEvents;
}
namespace gd {
class BaseEvent;
}
namespace gd {
class Instruction;
}
namespace gd {
typedef std::shared_ptr<gd::BaseEvent> BaseEventSPtr;
}
@@ -53,6 +39,24 @@ class GD_CORE_API EventsSearchResult {
std::weak_ptr<gd::BaseEvent> event;
gd::EventsList* eventsList;
std::size_t positionInList;
bool IsEventsListValid() const { return eventsList != nullptr; }
/**
* \brief Get the events list containing the event pointed by the EventsSearchResult.
* \warning Only call this when IsEventsListValid returns true.
*/
const gd::EventsList & GetEventsList() const { return *eventsList; }
std::size_t GetPositionInList() const { return positionInList; }
bool IsEventValid() const { return !event.expired(); }
/**
* \brief Get the event pointed by the EventsSearchResult.
* \warning Only call this when IsEventValid returns true.
*/
const gd::BaseEvent & GetEvent() const { return *event.lock(); }
};
/**

View File

@@ -0,0 +1,37 @@
/*
* GDevelop Core
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights
* reserved. This project is released under the MIT License.
*/
#include "GDCore/IDE/Events/EventsTypesLister.h"
#include <iostream>
#include <map>
#include <memory>
#include <vector>
#include "GDCore/Events/Event.h"
#include "GDCore/Events/EventsList.h"
#include "GDCore/Project/Layout.h"
#include "GDCore/Project/Project.h"
#include "GDCore/String.h"
namespace gd {
bool EventsTypesLister::DoVisitEvent(gd::BaseEvent& event) {
allEventsTypes.push_back(event.GetType());
return false;
}
bool EventsTypesLister::DoVisitInstruction(gd::Instruction& instruction,
bool isCondition) {
if (isCondition)
allConditionsTypes.push_back(instruction.GetType());
else
allActionsTypes.push_back(instruction.GetType());
return false;
}
EventsTypesLister::~EventsTypesLister() {}
} // namespace gd

View File

@@ -0,0 +1,64 @@
/*
* GDevelop Core
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights
* reserved. This project is released under the MIT License.
*/
#ifndef EventsTypesLister_H
#define EventsTypesLister_H
#include <iostream>
#include <map>
#include <memory>
#include <vector>
#include "GDCore/IDE/Events/ArbitraryEventsWorker.h"
#include "GDCore/String.h"
namespace gd {
class BaseEvent;
class Project;
class EventsList;
} // namespace gd
namespace gd {
/**
* \brief List the values of the parameters of events and their type.
*
* \ingroup IDE
*/
class GD_CORE_API EventsTypesLister : public ArbitraryEventsWorker {
public:
EventsTypesLister(const gd::Project& project_) : project(project_){};
virtual ~EventsTypesLister();
/**
* Return the types of all events
*/
const std::vector<gd::String>& GetAllEventsTypes() { return allEventsTypes; }
/**
* Return the types of all conditions
*/
const std::vector<gd::String>& GetAllConditionsTypes() {
return allConditionsTypes;
}
/**
* Return the types of all actions
*/
const std::vector<gd::String>& GetAllActionsTypes() {
return allActionsTypes;
}
private:
bool DoVisitEvent(gd::BaseEvent& event) override;
bool DoVisitInstruction(gd::Instruction& instruction,
bool isCondition) override;
std::vector<gd::String> allEventsTypes;
std::vector<gd::String> allConditionsTypes;
std::vector<gd::String> allActionsTypes;
const gd::Project& project;
};
} // namespace gd
#endif // EventsTypesLister_H

View File

@@ -11,12 +11,14 @@ This project is released under the MIT License.
#include "AdMobObject.h"
void DeclareAdMobObjectExtension(gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"AdMobObject",
_("AdMob banners and interstitial screens"),
_("Display an ads banner and interstitial screens powered by AdMob."),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"AdMobObject",
_("AdMob banners and interstitial screens"),
_("Display an ads banner and interstitial screens powered by AdMob."),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("/objects/admob");
gd::ObjectMetadata& obj = extension.AddObject<AdMobObject>(
"AdMob",

View File

@@ -10,11 +10,13 @@ This project is released under the MIT License.
#include "GDCpp/Runtime/Project/BehaviorsSharedData.h"
void DeclareAnchorBehaviorExtension(gd::PlatformExtension& extension) {
extension.SetExtensionInformation("AnchorBehavior",
_("Anchor"),
_("Anchor objects to the window's bounds."),
"Victor Levasseur",
"Open source (MIT License)");
extension
.SetExtensionInformation("AnchorBehavior",
_("Anchor"),
_("Anchor objects to the window's bounds."),
"Victor Levasseur",
"Open source (MIT License)")
.SetExtensionHelpPath("/behaviors/anchor");
gd::BehaviorMetadata& aut = extension.AddBehavior(
"AnchorBehavior",

View File

@@ -26,7 +26,8 @@ class Extension : public ExtensionBase {
_("3D Box Object"),
_("This Extension enables the use of 3D Box objects."),
"Florian Rival",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("" /*TODO: Add a documentation page for this */);
{
gd::ObjectMetadata& obj =

View File

@@ -7,96 +7,108 @@ This project is released under the MIT License.
#include "GDCpp/Extensions/ExtensionBase.h"
/**
* \brief This class declares information about the extension.
*/
class Extension : public ExtensionBase
{
public:
class Extension : public ExtensionBase {
public:
/**
* Constructor of an extension declares everything the extension contains:
* objects, actions, conditions and expressions.
*/
Extension() {
SetExtensionInformation("CommonDialogs",
_("Common dialogs"),
_("This Extension can display common dialogs ( "
"Message box, open file dialog... )"),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("" /*TODO: Add a documentation page for this */);
#if defined(GD_IDE_ONLY)
/**
* Constructor of an extension declares everything the extension contains: objects, actions, conditions and expressions.
*/
Extension()
{
SetExtensionInformation("CommonDialogs",
_("Common dialogs"),
_("This Extension can display common dialogs ( Message box, open file dialog... )"),
"Florian Rival",
"Open source (MIT License)");
#if defined(GD_IDE_ONLY)
AddAction(
"ShowMsgBox",
_("Show a message box"),
_("Display a message box with the specified text and an Ok button."),
_("Display message \"_PARAM1_\" with title \"_PARAM2_\""),
_("Interfaces"),
"res/actions/msgbox24.png",
"res/actions/msgbox.png")
AddAction("ShowMsgBox",
_("Show a message box"),
_("Display a message box with the specified text and an Ok button."),
_("Display message \"_PARAM1_\" with title \"_PARAM2_\""),
_("Interfaces"),
"res/actions/msgbox24.png",
"res/actions/msgbox.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("string", _("Message"))
.AddParameter("string", _("Title"))
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("string", _("Message"))
.AddParameter("string", _("Title"))
.SetFunctionName("GDpriv::CommonDialogs::ShowMessageBox")
.SetIncludeFile("CommonDialogs/CommonDialogs.h");
.SetFunctionName("GDpriv::CommonDialogs::ShowMessageBox").SetIncludeFile("CommonDialogs/CommonDialogs.h");
AddAction(
"ShowOpenFile",
_("Show a window to choose a file"),
_("Display a window that allows a player to choose a file.\nThe name "
"and the directory of the file will be saved in the specified "
"variable."),
_("Open a window for choosing a file, and save the result in _PARAM1_"),
_("Interfaces"),
"res/actions/openfile24.png",
"res/actions/openfile.png")
AddAction("ShowOpenFile",
_("Show a window to choose a file"),
_("Display a window that allows a player to choose a file.\nThe name and the directory of the file will be saved in the specified variable."),
_("Open a window for choosing a file, and save the result in _PARAM1_"),
_("Interfaces"),
"res/actions/openfile24.png",
"res/actions/openfile.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("scenevar", _("Save result to scene variable"))
.AddParameter("string", _("Title"))
.AddParameter(
"string",
_("Wildcard filter ( \"FileType|*.ext;*.ext2|2ndFileType|*.ext3\" "
") ( Windows only ) "))
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("scenevar", _("Save result to scene variable"))
.AddParameter("string", _("Title"))
.AddParameter("string", _("Wildcard filter ( \"FileType|*.ext;*.ext2|2ndFileType|*.ext3\" ) ( Windows only ) "))
.SetFunctionName("GDpriv::CommonDialogs::ShowOpenFile")
.SetIncludeFile("CommonDialogs/CommonDialogs.h");
.SetFunctionName("GDpriv::CommonDialogs::ShowOpenFile").SetIncludeFile("CommonDialogs/CommonDialogs.h");
AddAction("ShowTextInput",
_("Show a window to enter a text"),
_("Show a window that allows a player to enter text.\nThe text "
"will be saved in the specified scene variable."),
_("Open a text input dialog, and save the result in _PARAM1_"),
_("Interfaces"),
"res/actions/textenter24.png",
"res/actions/textenter.png")
AddAction("ShowTextInput",
_("Show a window to enter a text"),
_("Show a window that allows a player to enter text.\nThe text will be saved in the specified scene variable."),
_("Open a text input dialog, and save the result in _PARAM1_"),
_("Interfaces"),
"res/actions/textenter24.png",
"res/actions/textenter.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("scenevar", _("Save result to scene variable"))
.AddParameter("string", _("Message"))
.AddParameter("string", _("Title"))
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("scenevar", _("Save result to scene variable"))
.AddParameter("string", _("Message"))
.AddParameter("string", _("Title"))
.SetFunctionName("GDpriv::CommonDialogs::ShowTextInput")
.SetIncludeFile("CommonDialogs/CommonDialogs.h");
.SetFunctionName("GDpriv::CommonDialogs::ShowTextInput").SetIncludeFile("CommonDialogs/CommonDialogs.h");
AddAction(
"ShowYesNoMsgBox",
_("Display a Yes/No message box"),
_("Open a message box that allows a player to choose Yes or No.\nThe "
"answer ( \"yes\"/\"no\" ) will be saved in the specified variable."),
_("Open a Yes/No message box, and save the result in _PARAM1_"),
_("Interfaces"),
"res/actions/msgbox24.png",
"res/actions/msgbox.png")
AddAction("ShowYesNoMsgBox",
_("Display a Yes/No message box"),
_("Open a message box that allows a player to choose Yes or No.\nThe answer ( \"yes\"/\"no\" ) will be saved in the specified variable."),
_("Open a Yes/No message box, and save the result in _PARAM1_"),
_("Interfaces"),
"res/actions/msgbox24.png",
"res/actions/msgbox.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("scenevar", _("Save result to scene variable"))
.AddParameter("string", _("Message"))
.AddParameter("string", _("Title"))
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("scenevar", _("Save result to scene variable"))
.AddParameter("string", _("Message"))
.AddParameter("string", _("Title"))
.SetFunctionName("GDpriv::CommonDialogs::ShowYesNoMsgBox")
.SetIncludeFile("CommonDialogs/CommonDialogs.h");
.SetFunctionName("GDpriv::CommonDialogs::ShowYesNoMsgBox").SetIncludeFile("CommonDialogs/CommonDialogs.h");
#endif
#endif
GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION();
};
GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION();
};
};
/**
* Used by GDevelop to create the extension class
* -- Do not need to be modified. --
*/
extern "C" ExtensionBase * GD_EXTENSION_API CreateGDExtension() {
return new Extension;
extern "C" ExtensionBase* GD_EXTENSION_API CreateGDExtension() {
return new Extension;
}

View File

@@ -16,7 +16,8 @@ void DeclareDestroyOutsideBehaviorExtension(gd::PlatformExtension& extension) {
_("This Extension can be used to destroy objects when they go outside of "
"the borders of the game's window."),
"Florian Rival",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("/behaviors/destroyoutside");
gd::BehaviorMetadata& aut =
extension.AddBehavior("DestroyOutside",

View File

@@ -22,12 +22,6 @@ class DestroyOutsideBehaviorJsExtension : public gd::PlatformExtension {
* contains: objects, actions, conditions and expressions.
*/
DestroyOutsideBehaviorJsExtension() {
SetExtensionInformation(
"DestroyOutsideBehavior",
_("Destroy Outside Screen Behavior"),
_("Behavior destroying object when they go outside the screen"),
"Florian Rival",
"Open source (MIT License)");
DeclareDestroyOutsideBehaviorExtension(*this);
GetBehaviorMetadata("DestroyOutsideBehavior::DestroyOutside")

View File

@@ -0,0 +1,204 @@
/**
* This is a declaration of an extension for GDevelop 5.
*
* Run `node import-GDJS-Runtime.js` (in newIDE/app/scripts) if you make any change
* to this extension file or to any other *.js file that you reference inside.
*
* The file must be named "JsExtension.js", otherwise GDevelop won't load it.
* ⚠️ If you make a change and the extension is not loaded, open the developer console
* and search for any errors.
*
* More information on https://github.com/4ian/GD/blob/master/newIDE/README-extensions.md
*/
module.exports = {
createExtension: function(t, gd) {
const extension = new gd.PlatformExtension();
extension.setExtensionInformation(
"DeviceSensors",
t("Device sensors"),
t(
"Allow the game to access the sensors of a mobile device."
),
"Matthias Meike",
"Open source (MIT License)"
).setExtensionHelpPath("/all-features/device-sensors");
extension
.addCondition(
"OrientationSensorActive",
t("Sensor active"),
t(
"The condition is true if the device orientation sensor is currently active"
),
t("Orientation sensor is active"),
t("Sensors/Orientation"),
"JsPlatform/Extensions/orientation_active24.png",
"JsPlatform/Extensions/orientation_active32.png"
)
.getCodeExtraInformation()
.setIncludeFile(
"Extensions/DeviceSensors/devicesensortools.js"
)
.setFunctionName("gdjs.evtTools.devicesensors.orientation.isActive");
extension
.addCondition(
"OrientationAlpha",
t("Compare the value of orientation alpha"),
t(
"Compare the value of orientation alpha. (Range: 0 to 360°)"
),
t("Orientation alpha is _PARAM0__PARAM1_"),
t("Sensors/Orientation"),
"JsPlatform/Extensions/orientation_alpha24.png",
"JsPlatform/Extensions/orientation_alpha32.png"
)
.addParameter("relationalOperator", t("Sign of the test"))
.addParameter("expression", t("Value"))
.getCodeExtraInformation()
.setIncludeFile(
"Extensions/DeviceSensors/devicesensortools.js"
)
.setFunctionName("gdjs.evtTools.devicesensors.orientation.getOrientationAlpha");
extension
.addCondition(
"OrientationBeta",
t("Compare the value of orientation beta"),
t(
"Compare the value of orientation beta. (Range: -180 to 180°)"
),
t("Orientation beta is _PARAM0__PARAM1_"),
t("Sensors/Orientation"),
"JsPlatform/Extensions/orientation_beta24.png",
"JsPlatform/Extensions/orientation_beta32.png"
)
.addParameter("relationalOperator", t("Sign of the test"))
.addParameter("expression", t("Value"))
.getCodeExtraInformation()
.setIncludeFile(
"Extensions/DeviceSensors/devicesensortools.js"
)
.setFunctionName("gdjs.evtTools.devicesensors.orientation.getOrientationBeta");
extension
.addCondition(
"OrientationGamma",
t("Compare the value of orientation gamma"),
t(
"Compare the value of orientation gamma. (Range: -90 to 90°)"
),
t("Orientation gamma is _PARAM0__PARAM1_"),
t("Sensors/Orientation"),
"JsPlatform/Extensions/orientation_gamma24.png",
"JsPlatform/Extensions/orientation_gamma32.png"
)
.addParameter("relationalOperator", t("Sign of the test"))
.addParameter("expression", t("Value"))
.getCodeExtraInformation()
.setIncludeFile(
"Extensions/DeviceSensors/devicesensortools.js"
)
.setFunctionName("gdjs.evtTools.devicesensors.orientation.getOrientationGamma");
extension
.addAction(
"ActivateOrientationListener",
t("Activate orientation sensor"),
t("Activate the orientation sensor. (remember to turn it off again)"),
t("Activate the orientation sensor."),
t("Sensors/Orientation"),
"JsPlatform/Extensions/orientation_active24.png",
"JsPlatform/Extensions/orientation_active32.png"
)
.getCodeExtraInformation()
.setIncludeFile(
"Extensions/DeviceSensors/devicesensortools.js"
)
.setFunctionName("gdjs.evtTools.devicesensors.orientation.activateOrientationSensor");
extension
.addAction(
"DeactivateOrientationListener",
t("Deactivate orientation sensor"),
t("Deactivate the orientation sensor."),
t("Deactivate the orientation sensor."),
t("Sensors/Orientation"),
"JsPlatform/Extensions/orientation_inactive24.png",
"JsPlatform/Extensions/orientation_inactive32.png"
)
.getCodeExtraInformation()
.setIncludeFile(
"Extensions/DeviceSensors/devicesensortools.js"
)
.setFunctionName("gdjs.evtTools.devicesensors.orientation.deactivateOrientationSensor");
extension
.addExpression(
"OrientationActive",
t("Sensor Active"),
t("The expression is true if the device orientation sensor is currently active"),
t("Sensors/Orientation")
)
.getCodeExtraInformation()
.setIncludeFile(
"Extensions/DeviceSensors/devicesensortools.js"
)
.setFunctionName("gdjs.evtTools.devicesensors.orientation.isActive");
extension
.addExpression(
"OrientationAbsolute",
t("Is Absolute"),
t("Get if the devices orientation is absolute and not relative"),
t("Sensors/Orientation")
)
.getCodeExtraInformation()
.setIncludeFile(
"Extensions/DeviceSensors/devicesensortools.js"
)
.setFunctionName("gdjs.evtTools.devicesensors.orientation.getOrientationAbsolute");
extension
.addExpression(
"OrientationAlpha",
t("Alpha value"),
t("Get the devices orientation Alpha (compass)"),
t("Sensors/Orientation")
)
.getCodeExtraInformation()
.setIncludeFile(
"Extensions/DeviceSensors/devicesensortools.js"
)
.setFunctionName("gdjs.evtTools.devicesensors.orientation.getOrientationAlpha");
extension
.addExpression(
"OrientationBeta",
t("Beta value"),
t("Get the devices orientation Beta"),
t("Sensors/Orientation")
)
.getCodeExtraInformation()
.setIncludeFile(
"Extensions/DeviceSensors/devicesensortools.js"
)
.setFunctionName("gdjs.evtTools.devicesensors.orientation.getOrientationBeta");
extension
.addExpression(
"OrientationGamma",
t("Gamma value"),
t("Get the devices orientation Gamma value"),
t("Sensors/Orientation")
)
.getCodeExtraInformation()
.setIncludeFile(
"Extensions/DeviceSensors/devicesensortools.js"
)
.setFunctionName("gdjs.evtTools.devicesensors.orientation.getOrientationGamma");
return extension;
},
runExtensionSanityTests: function(gd, extension) { return []; },
};

View File

@@ -0,0 +1,87 @@
/**
* @memberof gdjs.evtTools
* @class devicesensors
* @static
* @private
*/
gdjs.evtTools.devicesensors = {
orientation: {
_isActive: 0,
_absolute: 0,
_alpha: 0,
_beta: 0,
_gamma: 0
}
};
gdjs.evtTools.devicesensors.orientation._activateOrientationListener = function() {
window.addEventListener("deviceorientation", gdjs.evtTools.devicesensors.orientation._handleOrientation, true);
gdjs.evtTools.devicesensors.orientation._isActive = 1;
}
gdjs.evtTools.devicesensors.orientation._deactivateOrientationListener = function() {
window.removeEventListener('deviceorientation', gdjs.evtTools.devicesensors.orientation._handleOrientation, true);
gdjs.evtTools.devicesensors.orientation._isActive = 0;
}
gdjs.evtTools.devicesensors.orientation._handleOrientation = function(event) {
gdjs.evtTools.devicesensors.orientation._absolute = event.absolute ? Math.round(event.absolute) : 0;
gdjs.evtTools.devicesensors.orientation._alpha = event.alpha ? Math.round(event.alpha) : 0;
gdjs.evtTools.devicesensors.orientation._beta = event.beta ? Math.round(event.beta) : 0;
gdjs.evtTools.devicesensors.orientation._gamma = event.gamma ? Math.round(event.gamma) : 0;
}
/**
* Activate the orientation sensor
*/
gdjs.evtTools.devicesensors.orientation.activateOrientationSensor = function() {
gdjs.evtTools.devicesensors.orientation._activateOrientationListener();
}
/**
* Deactivate the orientation sensor
*/
gdjs.evtTools.devicesensors.orientation.deactivateOrientationSensor = function() {
gdjs.evtTools.devicesensors.orientation._deactivateOrientationListener();
}
/**
* Check if the orientation sensor is currently active
* @return {number} The activation state of the orientation sensor (0=false/1=true)
*/
gdjs.evtTools.devicesensors.orientation.isActive = function() {
return gdjs.evtTools.devicesensors.orientation._isActive;
}
/**
* Get the value of the device orientations absolute as a number
* @return {number} The device orientation's absolute value
*/
gdjs.evtTools.devicesensors.orientation.getOrientationAbsolute = function() {
return gdjs.evtTools.devicesensors.orientation._absolute;
};
/**
* Get the value of the device orientations alpha as a number
* @return {number} The device orientation's alpha value
*/
gdjs.evtTools.devicesensors.orientation.getOrientationAlpha = function() {
return gdjs.evtTools.devicesensors.orientation._alpha;
};
/**
* Get the value of the device orientations beta as a number
* @return {number} The device orientation's beta value
*/
gdjs.evtTools.devicesensors.orientation.getOrientationBeta = function() {
return gdjs.evtTools.devicesensors.orientation._beta;
};
/**
* Get the value of the device orientations gamma as a number
* @return {number} The device orientation's gamma value
*/
gdjs.evtTools.devicesensors.orientation.getOrientationGamma = function() {
return gdjs.evtTools.devicesensors.orientation._gamma;
};

View File

@@ -15,7 +15,8 @@ void DeclareDraggableBehaviorExtension(gd::PlatformExtension& extension) {
_("Draggable Behavior"),
_("This Extension enables the movement of objects with a mouse."),
"Florian Rival",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("behaviors/draggable");
gd::BehaviorMetadata& aut =
extension.AddBehavior("Draggable",

View File

@@ -327,12 +327,12 @@ module.exports = {
* and setting the property to a given value.
*
* If you don't have any tests, you can simply return an empty array like this:
* `runExtensionSanityTests: function(extension) { return []; }`
* `runExtensionSanityTests: function(gd, extension) { return []; }`
*
* But it is recommended to create tests for the behaviors/objects properties you created
* to avoid mistakes.
*/
runExtensionSanityTests: function(extension) {
runExtensionSanityTests: function(gd, extension) {
const dummyBehavior = extension
.getBehaviorMetadata("MyDummyExtension::DummyBehavior")
.get();

View File

@@ -13,42 +13,43 @@
module.exports = {
createExtension: function(t, gd) {
const extension = new gd.PlatformExtension();
extension.setExtensionInformation(
"FacebookInstantGames",
t("Facebook Instant Games"),
t(
"Allow your game to send scores and interact with Facebook Instant Games"
),
"Florian Rival",
"Open source (MIT License)"
);
extension
.setExtensionInformation(
"FacebookInstantGames",
t("Facebook Instant Games"),
t(
"Allow your game to send scores and interact with Facebook Instant Games"
),
"Florian Rival",
"Open source (MIT License)"
)
.setExtensionHelpPath("/publishing/publishing-to-facebook-instant-games");
extension
.addAction(
"SavePlayerData",
t("Save player data"),
t("Save the content of the given variable in the player data, stored on Facebook Instant Games servers"),
t("Save the content of _PARAM1_ in key _PARAM1_ of player data (store success message in _PARAM2_ or error in _PARAM3_)"),
t(
"Save the content of the given variable in the player data, stored on Facebook Instant Games servers"
),
t(
"Save the content of _PARAM1_ in key _PARAM1_ of player data (store success message in _PARAM2_ or error in _PARAM3_)"
),
t("Facebook Instant Games/Player data"),
"JsPlatform/Extensions/facebookicon24.png",
"JsPlatform/Extensions/facebookicon16.png"
)
.addParameter("string", 'Data key name (e.g: "Lives")', "", false)
.addParameter("scenevar", "Variable with the content to save", "", false)
.addParameter(
"scenevar",
"Variable with the content to save",
"",
false
)
.addParameter(
"scenevar",
"Variable where to store the success message (optional)",
t("Variable where to store the success message (optional)"),
"",
true
)
.addParameter(
"scenevar",
"Variable where to error message (optional, if an error occurs)",
t("Variable where to error message (optional, if an error occurs)"),
"",
true
)
@@ -63,7 +64,9 @@ module.exports = {
"LoadPlayerData",
t("Load player data"),
t("Load the player data with the given key in a variable"),
t("Load player data with key _PARAM0_ in _PARAM1_ (or error in _PARAM2_)"),
t(
"Load player data with key _PARAM0_ in _PARAM1_ (or error in _PARAM2_)"
),
t("Facebook Instant Games/Player data"),
"JsPlatform/Extensions/facebookicon24.png",
"JsPlatform/Extensions/facebookicon16.png"
@@ -91,29 +94,38 @@ module.exports = {
.addAction(
"SavePlayerScore",
t("Save player score"),
t("Save the score, and optionally the content of the given variable in the player score, for the given metadata."),
t("In leaderboard _PARAM0_, save score _PARAM1_ for the player and extra data from _PARAM2_ (store success message in _PARAM3_ or error in _PARAM4_)"),
t(
"Save the score, and optionally the content of the given variable in the player score, for the given metadata."
),
t(
"In leaderboard _PARAM0_, save score _PARAM1_ for the player and extra data from _PARAM2_ (store success message in _PARAM3_ or error in _PARAM4_)"
),
t("Facebook Instant Games/Leaderboards"),
"JsPlatform/Extensions/facebookicon24.png",
"JsPlatform/Extensions/facebookicon16.png"
)
.addParameter("string", 'Leaderboard name (e.g: "PlayersBestTimes")', "", false)
.addParameter("expression", 'Score to register for the player', "", false)
.addParameter(
"string",
'Leaderboard name (e.g: "PlayersBestTimes")',
"",
false
)
.addParameter("expression", "Score to register for the player", "", false)
.addParameter(
"scenevar",
"Optional variable with metadata to save",
t("Optional variable with metadata to save"),
"",
true
)
.addParameter(
"scenevar",
"Variable where to store the success message (optional)",
t("Variable where to store the success message (optional)"),
"",
true
)
.addParameter(
"scenevar",
"Variable where to error message (optional, if an error occurs)",
t("Variable where to error message (optional, if an error occurs)"),
"",
true
)
@@ -128,12 +140,19 @@ module.exports = {
"LoadPlayerEntry",
t("Load player entry"),
t("Load the player entry in the given leaderboard"),
t("Load player entry from leaderboard _PARAM0_. Set rank in _PARAM1_, score in _PARAM2_ (extra data if any in _PARAM3_ and error in _PARAM4_)"),
t(
"Load player entry from leaderboard _PARAM0_. Set rank in _PARAM1_, score in _PARAM2_ (extra data if any in _PARAM3_ and error in _PARAM4_)"
),
t("Facebook Instant Games/Leaderboards"),
"JsPlatform/Extensions/facebookicon24.png",
"JsPlatform/Extensions/facebookicon16.png"
)
.addParameter("string", 'Leaderboard name (e.g: "PlayersBestTimes")', "", false)
.addParameter(
"string",
t('Leaderboard name (e.g: "PlayersBestTimes")'),
"",
false
)
.addParameter(
"scenevar",
t("Variable where to store the player rank (of -1 if not ranked)"),
@@ -194,5 +213,7 @@ module.exports = {
return extension;
},
runExtensionSanityTests: function(extension) { return []; },
runExtensionSanityTests: function(gd, extension) {
return [];
}
};

View File

@@ -17,7 +17,8 @@ void DeclareInventoryExtension(gd::PlatformExtension& extension) {
_("Provides actions and conditions to add an inventory to your game, "
"with items in memory."),
"Florian Rival",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("all-features/inventory");
#if defined(GD_IDE_ONLY)
extension

View File

@@ -11,12 +11,14 @@ This project is released under the MIT License.
#include <iostream>
void DeclareLinkedObjectsExtension(gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"LinkedObjects",
_("Linked objects"),
_("This Extension can virtually link two objects."),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"LinkedObjects",
_("Linked objects"),
_("This Extension can virtually link two objects."),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("/all-features/linked-objects");
#if defined(GD_IDE_ONLY)

View File

@@ -14,12 +14,14 @@ This project is released under the MIT License.
#include "PanelSpriteObject.h"
void DeclarePanelSpriteObjectExtension(gd::PlatformExtension& extension) {
extension.SetExtensionInformation("PanelSpriteObject",
_("Panel Sprite (9-patch) Object"),
_("This Extension enables the use of Panel "
"Sprite (\"9-patch\") Objects."),
"Victor Levasseur and Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation("PanelSpriteObject",
_("Panel Sprite (9-patch) Object"),
_("This Extension enables the use of Panel "
"Sprite (\"9-patch\") Objects."),
"Victor Levasseur and Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("/objects/panel_sprite");
gd::ObjectMetadata& obj = extension.AddObject<PanelSpriteObject>(
"PanelSprite",

View File

@@ -20,7 +20,8 @@ void DeclareParticleSystemExtension(gd::PlatformExtension& extension) {
_("Particle system"),
_("This Extension can display a large number of small particles."),
"Florian Rival",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("/objects/particles_emitter");
// Declaration of all objects available
{

View File

@@ -199,6 +199,10 @@ gdjs.ParticleEmitterObjectPixiRenderer.prototype.setColor = function(r1, g1, b1,
this.emitter.startColor.value.r = r1;
this.emitter.startColor.value.g = g1;
this.emitter.startColor.value.b = b1;
this.emitter.startColor.next = this.emitter.startColor.next || {
time : 1,
value : {}
};
this.emitter.startColor.next.value.r = r2;
this.emitter.startColor.next.value.g = g2;
this.emitter.startColor.next.value.b = b2;

View File

@@ -381,6 +381,24 @@ gdjs.ParticleEmitterObject.prototype.setParticleBlue2 = function(blue){
}
};
gdjs.ParticleEmitterObject.prototype.setParticleColor1 = function(rgbColor){
var colors = rgbColor.split(";");
if ( colors.length < 3 ) return;
this.setParticleRed1(parseInt(colors[0], 10));
this.setParticleGreen1(parseInt(colors[1], 10));
this.setParticleBlue1(parseInt(colors[2], 10));
};
gdjs.ParticleEmitterObject.prototype.setParticleColor2 = function(rgbColor){
var colors = rgbColor.split(";");
if ( colors.length < 3 ) return;
this.setParticleRed2(parseInt(colors[0], 10));
this.setParticleGreen2(parseInt(colors[1], 10));
this.setParticleBlue2(parseInt(colors[2], 10));
};
gdjs.ParticleEmitterObject.prototype.getParticleSize1 = function(){
return this.size1;
};

View File

@@ -16,7 +16,8 @@ void DeclarePathfindingBehaviorExtension(gd::PlatformExtension& extension) {
_("Pathfinding behavior"),
_("Compute paths for objects avoiding obstacles."),
"Florian Rival",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("/behaviors/pathfinding");
{
gd::BehaviorMetadata& aut = extension.AddBehavior(

View File

@@ -20,7 +20,8 @@ void DeclarePhysicsBehaviorExtension(gd::PlatformExtension& extension) {
_("This extension enables the movement of objects as if they are subject "
"to the laws of physics."),
"Florian Rival",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("/behaviors/physics");
{
gd::BehaviorMetadata& aut = extension.AddBehavior(

View File

@@ -18,7 +18,8 @@ void DeclarePlatformBehaviorExtension(gd::PlatformExtension& extension) {
_("This Extension enables the use of controllable objects that can run "
"and jump on platforms."),
"Florian Rival",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("/behaviors/platformer");
{
gd::BehaviorMetadata& aut = extension.AddBehavior(

View File

@@ -23,12 +23,6 @@ class PlatformBehaviorJsExtension : public gd::PlatformExtension {
* contains: objects, actions, conditions and expressions.
*/
PlatformBehaviorJsExtension() {
SetExtensionInformation("PlatformBehavior",
_("Platform Behavior"),
_("Allows to use controllable objects which can "
"run and jump on platforms."),
"Florian Rival",
"Open source (MIT License)");
DeclarePlatformBehaviorExtension(*this);
GetBehaviorMetadata("PlatformBehavior::PlatformBehavior")

View File

@@ -88,6 +88,20 @@ gdjs.PlatformerObjectRuntimeBehavior.prototype.doStepPreEvents = function(runtim
if (this._currentSpeed < -this._maxSpeed) this._currentSpeed = -this._maxSpeed;
requestedDeltaX += this._currentSpeed*timeDelta;
//0.2) Track changes in object size
//Stick the object to the floor if its height has changed.
if ( this._isOnFloor && this._oldHeight !== object.getHeight() ) {
object.setY(this._floorLastY
- object.getHeight()
+ (object.getY() - object.getDrawableY())
- 1
);
}
this._oldHeight = object.getHeight();
//0.3) Update list of platforms around/related to the object
//Compute the list of the objects that will be used
this._updatePotentialCollidingObjects(Math.max(requestedDeltaX, this._maxFallingSpeed*timeDelta) );
this._updateOverlappedJumpThru();
@@ -103,19 +117,6 @@ gdjs.PlatformerObjectRuntimeBehavior.prototype.doStepPreEvents = function(runtim
this._releaseGrabbedPlatform();
}
//0.2) Track changes in object size
//Stick the object to the floor if its height has changed.
if ( this._isOnFloor && this._oldHeight !== object.getHeight() ) {
object.setY(this._floorLastY
- object.getHeight()
+ (object.getY() - object.getDrawableY())
- 1
);
}
this._oldHeight = object.getHeight();
//1) X axis:
//Shift the object according to the floor movement.

View File

@@ -10,12 +10,14 @@ This project is released under the MIT License.
#include "ShapePainterObject.h"
void DeclarePrimitiveDrawingExtension(gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"PrimitiveDrawing",
_("Primitive drawing"),
_("This Extension allows you to draw shapes and manipulate images."),
"Florian Rival",
"Open source (MIT License)");
extension
.SetExtensionInformation(
"PrimitiveDrawing",
_("Primitive drawing"),
_("This Extension allows you to draw shapes and manipulate images."),
"Florian Rival",
"Open source (MIT License)")
.SetExtensionHelpPath("/objects/shape_painter");
gd::ObjectMetadata& obj = extension.AddObject<ShapePainterObject>(
"Drawer", //"Drawer" is kept for compatibility with GD<=3.6.76

View File

@@ -15,7 +15,8 @@ void DeclareShopifyExtension(gd::PlatformExtension& extension) {
_("Interact with products and generate URLs for checkouts with your "
"Shopify shop."),
"Florian Rival",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("/all-features/shopify");
#if defined(GD_IDE_ONLY)
extension

View File

@@ -183,7 +183,7 @@ gdjs.sk.Armature.prototype.setRenderers = function(){
}
}
if(this.isRoot){
if(this.isRoot && this.debugRenderer){
this.renderer.addDebugRenderer(this.debugRenderer);
}
};

View File

@@ -155,7 +155,7 @@ gdjs.sk.Animation.prototype.update = function(delta){
this.finished = true;
}
var frame = this.getFrameAtTime(this.time);
var frame = this.finished ? this.shared.duration : this.getFrameAtTime(this.time);
for(var i=0; i<this.boneAnimators.length; i++){
this.boneAnimators[i].setFrame(frame);
@@ -937,6 +937,8 @@ gdjs.sk.BlendBoneAnimator.prototype.blend = function(first, second, duration){
var x1 = second ? second.shared.channelX.getKey(0) : 0.0;
var y1 = second ? second.shared.channelY.getKey(0) : 0.0;
var rot1 = second ? second.shared.channelRot.getKey(0) : 0.0;
if(rot1 <= 0 && Math.abs(rot1 - rot0) > Math.abs(rot1 + 360 - rot0)) rot1 += 360;
if(rot1 >= 0 && Math.abs(rot1 - rot0) > Math.abs(rot1 - 360 - rot0)) rot1 -= 360;
var sx1 = second ? second.shared.channelSclX.getKey(0) : 1.0;
var sy1 = second ? second.shared.channelSclY.getKey(0) : 1.0;
this.channelX.blend(x0, x1, duration);

View File

@@ -16,7 +16,8 @@ void DeclareTextEntryObjectExtension(gd::PlatformExtension& extension) {
_("This Extension enables the use of an object that captures text "
"entered with a keyboard by a player."),
"Florian Rival",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("/objects/text_entry");
gd::ObjectMetadata& obj = extension.AddObject<TextEntryObject>(
"TextEntry",

View File

@@ -20,7 +20,8 @@ void DeclareTextObjectExtension(gd::PlatformExtension& extension) {
_("Text object"),
_("This Extension enables the use of an object that displays text."),
"Florian Rival and Victor Levasseur",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("/objects/text");
gd::ObjectMetadata& obj =
extension.AddObject<TextObject>("Text",

View File

@@ -27,10 +27,15 @@ gdjs.TextRuntimeObjectCocosRenderer.prototype.updateStyle = function() {
this._text.setFontSize(this._object._characterSize);
this._text.setFontFillColor(cc.color(this._object._color[0],
this._object._color[1], this._object._color[2]));
this._text.setFontName(gdjs.CocosTools.isHTML5() ?
'gdjs_font_' + this._object._fontName :
'res/' + this._object._fontName
);
var fontName = !this._object._fontName ?
'Arial' :
(
gdjs.CocosTools.isHTML5() ?
'gdjs_font_' + this._object._fontName :
'res/' + this._object._fontName
);
this._text.setFontName(fontName);
};
gdjs.TextRuntimeObjectCocosRenderer.prototype.updatePosition = function() {

View File

@@ -28,7 +28,7 @@ gdjs.TextRuntimeObjectPixiRenderer.prototype.ensureUpToDate = function() {
};
gdjs.TextRuntimeObjectPixiRenderer.prototype.updateStyle = function() {
var fontName = "\"gdjs_font_" + this._object._fontName + "\"";
var fontName = this._object._fontName ? "\"gdjs_font_" + this._object._fontName + "\"" : 'Arial';
var style = this._text.style;
style.fontStyle = this._object._italic ? 'italic' : 'normal';

View File

@@ -15,7 +15,7 @@ gdjs.TextRuntimeObject = function(runtimeScene, objectData)
gdjs.RuntimeObject.call(this, runtimeScene, objectData);
this._characterSize = objectData.characterSize;
this._fontName = objectData.font || 'Arial';
this._fontName = objectData.font;
this._bold = objectData.bold;
this._italic = objectData.italic;
this._underlined = objectData.underlined;
@@ -67,7 +67,7 @@ gdjs.TextRuntimeObject.prototype.setY = function(y) {
/**
* Set the angle of the object.
* @param angle {Number} The new angle of the object
* @param {number} angle The new angle of the object
*/
gdjs.TextRuntimeObject.prototype.setAngle = function(angle) {
gdjs.RuntimeObject.prototype.setAngle.call(this, angle);
@@ -120,7 +120,7 @@ gdjs.TextRuntimeObject.prototype.getCharacterSize = function() {
/**
* Set size of characters of the object.
* @param newSize {Number} The new size for text.
* @param {number} newSize The new size for text.
*/
gdjs.TextRuntimeObject.prototype.setCharacterSize = function(newSize) {
if (newSize <= 1) newSize = 1;

View File

@@ -17,7 +17,8 @@ void DeclareTiledSpriteObjectExtension(gd::PlatformExtension& extension) {
_("Tiled Sprite Object"),
_("This Extension enables the use of Tiled Sprite Objects."),
"Victor Levasseur and Florian Rival",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("/objects/tiled_sprite");
gd::ObjectMetadata& obj = extension.AddObject<TiledSpriteObject>(
"TiledSprite",

View File

@@ -14,9 +14,10 @@ void DeclareTopDownMovementBehaviorExtension(gd::PlatformExtension& extension) {
extension.SetExtensionInformation(
"TopDownMovementBehavior",
_("Top-down movement"),
_("Move objects with either 4 or 8 directions"),
_("Move objects in either 4 or 8 directions"),
"Florian Rival",
"Open source (MIT License)");
"Open source (MIT License)")
.SetExtensionHelpPath("/behaviors/topdown");
gd::BehaviorMetadata& aut =
extension.AddBehavior("TopDownMovementBehavior",

View File

@@ -7,6 +7,7 @@
#include <SFML/Graphics.hpp>
#include <chrono>
#include <random>
#include <cmath>
#include <sstream>
#include "GDCpp/Runtime/profile.h"
@@ -41,6 +42,26 @@ double GD_API Random(int end) {
return randomDist(randomEngine);
}
double GD_API RandomInRange(int min, int max) {
return min + Random(max - min); // return min if min >= max
}
double GD_API RandomFloat(float end) {
if (end <= 0) return 0;
std::uniform_real_distribution<double> randomDist(0, end);
return randomDist(randomEngine);
}
double GD_API RandomFloatInRange(float min, float max) {
return min + RandomFloat(max - min); // return min if min >= max
}
double GD_API RandomWithStep(float min, float max, float step) {
if (step <= 0) return min + Random(max - min);
return min + Random(std::floor((max - min) / step)) * step; // return min if min >= max
}
bool GD_API LogicalNegation(bool param) { return !param; }
double GD_API ToDouble(const gd::String& str) { return str.To<double>(); }

View File

@@ -14,10 +14,30 @@ namespace GDpriv {
namespace CommonInstructions {
/**
* Generate a random number between 0 and max
* Generate a random integer between 0 and max
*/
double GD_API Random(int max);
/**
* Generate a random integer between min and max
*/
double GD_API RandomInRange(int min, int max);
/**
* Generate a random float between 0 and max
*/
double GD_API RandomFloat(float max);
/**
* Generate a random float between min and max
*/
double GD_API RandomFloatInRange(float min, float max);
/**
* Generate a random number between min and max in steps
*/
double GD_API RandomWithStep(float min, float max, float step);
/**
* Logical negation
* \return !param

View File

@@ -24,6 +24,18 @@ SceneExtension::SceneExtension() {
GetAllExpressions()["Random"]
.SetFunctionName("GDpriv::CommonInstructions::Random")
.SetIncludeFile("GDCpp/Extensions/Builtin/CommonInstructionsTools.h");
GetAllExpressions()["RandomInRange"]
.SetFunctionName("GDpriv::CommonInstructions::RandomInRange")
.SetIncludeFile("GDCpp/Extensions/Builtin/CommonInstructionsTools.h");
GetAllExpressions()["RandomFloat"]
.SetFunctionName("GDpriv::CommonInstructions::RandomFloat")
.SetIncludeFile("GDCpp/Extensions/Builtin/CommonInstructionsTools.h");
GetAllExpressions()["RandomFloatInRange"]
.SetFunctionName("GDpriv::CommonInstructions::RandomFloatInRange")
.SetIncludeFile("GDCpp/Extensions/Builtin/CommonInstructionsTools.h");
GetAllExpressions()["RandomWithStep"]
.SetFunctionName("GDpriv::CommonInstructions::RandomWithStep")
.SetIncludeFile("GDCpp/Extensions/Builtin/CommonInstructionsTools.h");
GetAllStrExpressions()["CurrentSceneName"]
.SetFunctionName("GetSceneName")
.SetIncludeFile("GDCpp/Extensions/Builtin/RuntimeSceneTools.h");

View File

@@ -163,8 +163,13 @@ void RuntimeObject::PutAroundAPosition(float positionX,
float angleInDegrees) {
double angle = angleInDegrees / 180.0f * 3.14159;
SetX(positionX + cos(angle) * distance - GetCenterX());
SetY(positionY + sin(angle) * distance - GetCenterY());
// Offset the position by the center, as PutAround* methods should position
// the center of the object (just like GetSqDistanceTo, RaycastTest uses
// center too).
SetX(positionX + cos(angle) * distance + GetX() -
(GetDrawableX() + GetCenterX()));
SetY(positionY + sin(angle) * distance + GetY() -
(GetDrawableY() + GetCenterY()));
}
void RuntimeObject::AddForce(float x, float y, float clearing) {
@@ -409,18 +414,20 @@ bool RuntimeObject::IsCollidingWithPoint(float pointX, float pointY) {
return false;
}
RaycastResult RuntimeObject::RaycastTest(float x, float y, float endX, float endY, bool closest) {
RaycastResult RuntimeObject::RaycastTest(
float x, float y, float endX, float endY, bool closest) {
float objW = GetWidth();
float objH = GetHeight();
float diffX = GetDrawableX() + GetCenterX() - x;
float diffY = GetDrawableY() + GetCenterY() - y;
float sqBoundingR = (objW * objW + objH * objH) / 4.0;
float sqDist = (endX - x)*(endX - x) + (endY - y)*(endY - y);
float sqDist = (endX - x) * (endX - x) + (endY - y) * (endY - y);
RaycastResult result;
result.collision = false;
if ( diffX*diffX + diffY*diffY > sqBoundingR + sqDist + 2*sqrt(sqDist*sqBoundingR) )
if (diffX * diffX + diffY * diffY >
sqBoundingR + sqDist + 2 * sqrt(sqDist * sqBoundingR))
return result;
float testSqDist = closest ? sqDist : 0.0f;
@@ -433,7 +440,8 @@ RaycastResult RuntimeObject::RaycastTest(float x, float y, float endX, float end
if (closest && (res.closeSqDist < testSqDist)) {
testSqDist = res.closeSqDist;
result = res;
} else if ( !closest && (res.farSqDist > testSqDist) && (res.farSqDist <= sqDist) ) {
} else if (!closest && (res.farSqDist > testSqDist) &&
(res.farSqDist <= sqDist)) {
testSqDist = res.farSqDist;
result = res;
}
@@ -548,12 +556,10 @@ void RuntimeObject::PutAroundObject(RuntimeObject *object,
float angleInDegrees) {
if (object == NULL) return;
double angle = angleInDegrees / 180 * 3.14159;
SetX(object->GetDrawableX() + object->GetCenterX() + cos(angle) * length -
GetCenterX());
SetY(object->GetDrawableY() + object->GetCenterY() + sin(angle) * length -
GetCenterY());
PutAroundAPosition(object->GetDrawableX() + object->GetCenterX(),
object->GetDrawableY() + object->GetCenterY(),
length,
angleInDegrees);
}
void RuntimeObject::SetXY(const char *xOperator,

View File

@@ -14,13 +14,6 @@ namespace gdjs {
AdvancedExtension::AdvancedExtension() {
gd::BuiltinExtensionsImplementer::ImplementsAdvancedExtension(*this);
SetExtensionInformation(
"BuiltinAdvanced",
_("Advanced control features"),
_("Built-in extension providing advanced control features."),
"Florian Rival",
"Open source (MIT License)");
GetAllConditions()["Toujours"].SetFunctionName(
"gdjs.evtTools.common.logicalNegation");
}

View File

@@ -15,12 +15,6 @@ namespace gdjs {
AudioExtension::AudioExtension() {
gd::BuiltinExtensionsImplementer::ImplementsAudioExtension(*this);
SetExtensionInformation("BuiltinAudio",
_("Audio"),
_("Builtin audio extension"),
"Florian Rival",
"Open source (MIT License)");
GetAllActions()["PlaySound"].SetFunctionName("gdjs.evtTools.sound.playSound");
GetAllActions()["PlaySoundCanal"].SetFunctionName(
"gdjs.evtTools.sound.playSoundOnChannel");

View File

@@ -17,12 +17,6 @@ namespace gdjs {
BaseObjectExtension::BaseObjectExtension() {
gd::BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(*this);
SetExtensionInformation("BuiltinObject",
_("Base object"),
_("Base object"),
"Florian Rival",
"Open source (MIT License)");
std::map<gd::String, gd::InstructionMetadata> &objectActions =
GetAllActionsForObject("");
std::map<gd::String, gd::InstructionMetadata> &objectConditions =

View File

@@ -13,12 +13,6 @@ namespace gdjs {
CameraExtension::CameraExtension() {
gd::BuiltinExtensionsImplementer::ImplementsCameraExtension(*this);
SetExtensionInformation("BuiltinCamera",
_("Cameras and layers features"),
_("Builtin camera extension"),
"Florian Rival",
"Open source (MIT License)");
GetAllActions()["CameraX"]
.SetFunctionName("gdjs.evtTools.camera.setCameraX")
.SetGetter("gdjs.evtTools.camera.getCameraX");

View File

@@ -15,13 +15,6 @@ namespace gdjs {
CommonConversionsExtension::CommonConversionsExtension() {
gd::BuiltinExtensionsImplementer::ImplementsCommonConversionsExtension(*this);
SetExtensionInformation(
"BuiltinCommonConversions",
_("Standard Conversions"),
_("Built-in extension providing standard conversions expressions."),
"Florian Rival",
"Open source (MIT License)");
GetAllExpressions()["ToNumber"].SetFunctionName(
"gdjs.evtTools.common.toNumber");
GetAllStrExpressions()["ToString"].SetFunctionName(

View File

@@ -37,12 +37,6 @@ CommonInstructionsExtension::CommonInstructionsExtension() {
gd::BuiltinExtensionsImplementer::ImplementsCommonInstructionsExtension(
*this);
SetExtensionInformation("BuiltinCommonInstructions",
_("Standard events"),
_("Built-in extension providing standard events."),
"Florian Rival",
"Open source (MIT License)");
GetAllEvents()["BuiltinCommonInstructions::Link"].SetPreprocessing(
[](gd::BaseEvent& event_,
gd::EventsCodeGenerator& codeGenerator,
@@ -680,7 +674,7 @@ CommonInstructionsExtension::CommonInstructionsExtension() {
});
AddEvent("JsCode",
_("Javascript code (Web platform only)"),
_("Javascript code"),
_("Insert some Javascript code into events"),
"",
"res/source_cpp16.png",

View File

@@ -15,13 +15,6 @@ namespace gdjs {
ExternalLayoutsExtension::ExternalLayoutsExtension() {
gd::BuiltinExtensionsImplementer::ImplementsExternalLayoutsExtension(*this);
SetExtensionInformation("BuiltinExternalLayouts",
_("External layouts"),
_("Built-in extension providing actions and "
"conditions related to external layouts"),
"Florian Rival",
"Open source (MIT License)");
GetAllActions()["BuiltinExternalLayouts::CreateObjectsFromExternalLayout"]
.SetFunctionName(
"gdjs.evtTools.runtimeScene.createObjectsFromExternalLayout");

View File

@@ -15,13 +15,6 @@ namespace gdjs {
FileExtension::FileExtension() {
gd::BuiltinExtensionsImplementer::ImplementsFileExtension(*this);
SetExtensionInformation(
"BuiltinFile",
_("Files"),
_("Built-in extension providing functions for storing data."),
"Florian Rival",
"Open source (MIT License)");
GetAllActions()["LoadFile"].SetFunctionName(
"gdjs.evtTools.storage.loadJSONFileFromStorage");
GetAllConditions()["GroupExists"].SetFunctionName(

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