not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
5.2 KiB

  1. // Copyright (c) 2016 Walter Bender
  2. // Copyright (c) 2016 Tymon Radzik
  3. //
  4. // This program is free software; you can redistribute it and/or
  5. // modify it under the terms of the The GNU Affero General Public
  6. // License as published by the Free Software Foundation; either
  7. // version 3 of the License, or (at your option) any later version.
  8. //
  9. // You should have received a copy of the GNU Affero General Public
  10. // License along with this library; if not, write to the Free Software
  11. // Foundation, 51 Franklin Street, Suite 500 Boston, MA 02110-1335 USA
  12. //
  13. const NUMBERBLOCKDEFAULT = 100;
  14. const DEFAULTPALETTE = 'turtle';
  15. // We don't include 'extras' since we want to be able to delete
  16. // plugins from the extras palette.
  17. BUILTINPALETTES = ['turtle', 'pen', 'number', 'boolean', 'flow', 'boxes', 'action', 'media', 'sensors', 'heap', 'extras'];
  18. const BUILTINPALETTESL23N = [_('turtle'), _('pen'), _('number'), _('boolean'), _('flow'), _('boxes'), _('actions'), _('media'), _('sensors'), _('heap'), _('extras')];
  19. function getMainToolbarButtonNames(name) {
  20. return (['popdown-palette', 'run', 'step', 'stop-turtle', 'clear', 'palette', 'hide-blocks', 'collapse-blocks', 'go-home', 'help', 'sugarizer-stop'].indexOf(name) > -1);
  21. };
  22. function getAuxToolbarButtonNames(name) {
  23. return (['planet', 'open', 'save', 'paste-disabled', 'Cartesian', 'polar', 'utility', 'empty-trash', 'restore-trash'].indexOf(name) > -1);
  24. }
  25. function createDefaultStack() {
  26. DATAOBJS = [[0, 'start', 250, 150, [null, null, null]]];
  27. };
  28. function createHelpContent() {
  29. HELPCONTENT = [
  30. [_('Welcome to Turtle Blocks'), _('Turtle Blocks is a Logo-inspired turtle that draws colorful pictures with snap-together visual-programming blocks.'), 'activity/activity-icon-color.svg'],
  31. [_('Palette buttons'), _('This toolbar contains the palette buttons, click to show the palettes of blocks and drag blocks from the palettes onto the canvas to use them.'), 'images/icons.svg'],
  32. [_('Run'), _('Click to run the project in fast mode.') + ' / ' + _('Long press to run the project in slow mode.'), 'header-icons/run-button.svg'],
  33. [_('Run step by step'), _('Click to run the project step by step.'), 'header-icons/step-button.svg'],
  34. [_('Stop'), _('Stop the current project.'), 'header-icons/stop-turtle-button.svg'],
  35. [_('Clean'), _('Clear the screen and return the turtles to their initial positions.'), 'header-icons/clear-button.svg'],
  36. [_('Show/hide palettes'), _('Hide or show the block palettes.'), 'header-icons/palette-button.svg'],
  37. [_('Show/hide blocks'), _('Hide or show the blocks and the palettes.'), 'header-icons/hide-blocks-button.svg'],
  38. [_('Expand/collapse collapsable blocks'), _('Expand or collapse start and action stacks.'), 'header-icons/collapse-blocks-button.svg'],
  39. [_('Home'), _('Return all blocks to the center of the screen.'), 'header-icons/go-home-button.svg'],
  40. [_('Help'), _('Show these messages.'), 'header-icons/help-button.svg'],
  41. [_('Expand/collapse option toolbar'), _('Click this button to expand or collapse the auxillary toolbar.'), 'header-icons/menu-button.svg'],
  42. [_('Load samples from server'), _('This button opens a viewer for loading example projects.'), 'header-icons/planet-button.svg'],
  43. [_('Load project from files'), _('You can also load projects from the file system.'), 'header-icons/open-button.svg'],
  44. [_('Save project'), _('Save your project to a file.'), 'header-icons/save-button.svg'],
  45. [_('Copy'), _('The copy button copies a stack to the clipboard. It appears after a "long press" on a stack.'), 'header-icons/copy-button.svg'],
  46. [_('Paste'), _('The paste button is enabled when there are blocks copied onto the clipboard.'), 'header-icons/paste-disabled-button.svg'],
  47. [_('Save stack'), _('The save-stack button saves a stack onto a custom palette. It appears after a "long press" on a stack.'), 'header-icons/save-blocks-button.svg'],
  48. [_('Cartesian'), _('Show or hide a Cartesian-coordinate grid.'), 'header-icons/Cartesian-button.svg'],
  49. [_('Polar'), _('Show or hide a polar-coordinate grid.'), 'header-icons/polar-button.svg'],
  50. [_('Settings'), _('Open a panel for configuring Turtle Blocks.'), 'header-icons/utility-button.svg'],
  51. [_('Decrease block size'), _('Decrease the size of the blocks.'), 'header-icons/smaller-button.svg'],
  52. [_('Increase block size'), _('Increase the size of the blocks.'), 'header-icons/bigger-button.svg'],
  53. [_('Display statistics'), _('Display statistics about your Turtle project.'), 'header-icons/stats-button.svg'],
  54. [_('Load plugin from file'), _('You can load new blocks from the file system.'), 'header-icons/plugin-button.svg'],
  55. [_('Enable scrolling'), _('You can scroll the blocks on the canvas.'), 'header-icons/scroll-unlock-button.svg'],
  56. [_('Delete all'), _('Remove all content on the canvas, including the blocks.'), 'header-icons/empty-trash-button.svg'],
  57. [_('Undo'), _('Restore blocks from the trash.'), 'header-icons/restore-trash-button.svg'],
  58. [_('Congratulations.'), _('You have finished the tour. Please enjoy Turtle Blocks!'), 'activity/activity-icon-color.svg']
  59. ];
  60. };