Skip to content

Commit 1ced1aa

Browse files
committed
Merge branch 'master' into electron-32
2 parents a81a697 + 7145e6d commit 1ced1aa

File tree

97 files changed

+270
-186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+270
-186
lines changed

Extensions/Spine/CMakeLists.txt

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
cmake_minimum_required(VERSION 2.6)
2-
cmake_policy(SET CMP0015 NEW)
1+
cmake_minimum_required(VERSION 3.5)
32

43
project(SpineObject)
54
gd_add_extension_includes()
65

7-
#Defines
8-
###
6+
# Defines
7+
#
98
gd_add_extension_definitions(SpineObject)
109

11-
#The targets
12-
###
10+
# The targets
11+
#
1312
include_directories(.)
14-
file(GLOB source_files *.cpp *.h)
13+
file(
14+
GLOB
15+
source_files
16+
*.cpp
17+
*.h)
1518
gd_add_clang_utils(SpineObject "${source_files}")
1619
gd_add_extension_target(SpineObject "${source_files}")
1720

18-
#Linker files for the IDE extension
19-
###
21+
# Linker files for the IDE extension
22+
#
2023
gd_extension_link_libraries(SpineObject)

GDevelop.js/scripts/generate-dts.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ for (const [
262262
attributes.push(
263263
`${attributeName}${optionalReturn ? '?' : ''}: ${returnType};`
264264
);
265+
Parser.skipWhitespaces();
265266
continue;
266267
}
267268

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
![GDevelop logo](https://raw.githubusercontent.com/4ian/GDevelop/master/newIDE/GDevelop%20banner.png 'GDevelop logo')
1+
![GDevelop logo](https://raw.githubusercontent.com/4ian/GDevelop/master/newIDE/GDevelop%20banner.png "GDevelop logo")
22

33
GDevelop is a **full-featured, no-code, open-source** game development software. You can build **2D, 3D and multiplayer games** for mobile (iOS, Android), desktop and the web. GDevelop is fast and easy to use: the game logic is built up using an intuitive and powerful event-based system and reusable behaviors.
44

5-
![The GDevelop editor when editing a game level](https://raw.githubusercontent.com/4ian/GDevelop/master/newIDE/GDevelop%20screenshot.png 'The GDevelop editor when editing a game level')
5+
![The GDevelop editor when editing a game level](https://raw.githubusercontent.com/4ian/GDevelop/master/newIDE/GDevelop%20screenshot.png "The GDevelop editor when editing a game level")
66

77
## Getting started
88

@@ -13,7 +13,7 @@ GDevelop is a **full-featured, no-code, open-source** game development software.
1313
| 🧑‍💻 Contribute to the editor or game engine | Follow this [README](newIDE/README.md). |
1414
| 👾 Create or sell a game template | Submit a [free example or a paid template on the Asset Store](https://wiki.gdevelop.io/gdevelop5/community/guide-for-submitting-an-example/). |
1515
| 🎨 Share or sell an asset pack | Submit a [free or paid asset pack on the Asset Store](https://wiki.gdevelop.io/gdevelop5/community/sell-asset-pack-store). |
16-
| 🌐 Help to translate GDevelop | Go on the [GDevelop project on Crowdin](https://crowdin.com/project/gdevelop) or translate [in-app tutorials](https://github.com/GDevelopApp/GDevelop-tutorials). |
16+
| 🌐 Help translate GDevelop | Go on the [GDevelop project on Crowdin](https://crowdin.com/project/gdevelop) or translate [in-app tutorials](https://github.com/GDevelopApp/GDevelop-tutorials). |
1717
| 👥 Get online game services or commercial support | See offers for [professionals, teams or individual creators](https://gdevelop.io/pricing). |
1818

1919
> Are you interested in contributing to GDevelop for the first time? Take a look at the list of **[good first issues](https://github.com/4ian/GDevelop/issues?q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%91%8Cgood+first+issue%22)**, **[good first contributions](https://github.com/4ian/GDevelop/discussions/categories/good-first-contribution)** or the **["🏐 not too hard" cards](https://trello.com/b/qf0lM7k8/gdevelop-roadmap?menu=filter&filter=label:Not%20too%20hard%20%E2%9A%BD%EF%B8%8F)** on the Roadmap.
@@ -24,7 +24,7 @@ GDevelop is a **full-featured, no-code, open-source** game development software.
2424
- See the [showcase of games](https://gdevelop.io/games) created with GDevelop and published on Steam, iOS (App Store), Android (Google Play), Itch.io, Newgrounds, CrazyGames, Poki...
2525
- Suggest your game to be [added to the showcase here](https://docs.google.com/forms/d/e/1FAIpQLSfjiOnkbODuPifSGuzxYY61vB5kyMWdTZSSqkJsv3H6ePRTQA/viewform).
2626

27-
[![Some games made with GDevelop](https://raw.githubusercontent.com/4ian/GDevelop/master/newIDE/GDevelop%20games.png 'Some games made with GDevelop')](https://gdevelop.io/games)
27+
[![Some games made with GDevelop](https://raw.githubusercontent.com/4ian/GDevelop/master/newIDE/GDevelop%20games.png "Some games made with GDevelop")](https://gdevelop.io/games)
2828

2929
## Technical architecture
3030

newIDE/app/scripts/import-zipped-editor.js

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* The zip should be uploaded with one of the git releases (use gitRelease variable for version where you released it)
55
*/
66
var shell = require('shelljs');
7-
var fs = require('fs');
87
var AdmZip = require('adm-zip');
98
var process = require('process');
109
var path = require('path');

newIDE/app/src/Credits/CreditsPackagesDialog.js

+4
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ const CreditsPackagesDialog = ({
289289
this guide
290290
</Link>{' '}
291291
to help you decide.
292+
</Trans>{' '}
293+
<Trans>
294+
Follow GDevelop on socials and check your profile to get some
295+
free credits!
292296
</Trans>
293297
</BackgroundText>
294298
</ColumnStackLayout>

newIDE/app/src/MainFrame/EditorContainers/AskAi/AiRequestChat.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,14 @@ export const AiRequestChat = React.forwardRef<Props, AiRequestChatInterface>(
148148
const { isMobile } = useResponsiveWindowSize();
149149

150150
const quotaOrCreditsExplanation = !quota ? null /* User is probably not even logged in. */ : !quota.limitReached ? (
151-
quota.current < 1 || increaseQuotaOffering === 'subscribe' ? null : (
151+
increaseQuotaOffering === 'subscribe' ? (
152152
<Trans>
153-
You still have {quota.max - quota.current} free questions thanks to
154-
your membership.
153+
You still have {quota.max - quota.current} free answers from the AI.
154+
</Trans>
155+
) : (
156+
<Trans>
157+
You still have {quota.max - quota.current} free answers with your
158+
membership (refreshed every month).
155159
</Trans>
156160
)
157161
) : aiRequestPriceInCredits ? (

newIDE/app/src/MainFrame/EditorContainers/AskAi/DislikeFeedbackDialog.js

+10
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ export const DislikeFeedbackDialog = ({
8888
control={<Radio color="secondary" />}
8989
label={<Trans>The answer is out of scope for GDevelop</Trans>}
9090
/>
91+
<FormControlLabel
92+
value="too-short"
93+
control={<Radio color="secondary" />}
94+
label={<Trans>The answer is too short</Trans>}
95+
/>
96+
<FormControlLabel
97+
value="too-long"
98+
control={<Radio color="secondary" />}
99+
label={<Trans>The answer is too long</Trans>}
100+
/>
91101
<FormControlLabel
92102
value="other"
93103
control={<Radio color="secondary" />}

newIDE/app/src/MainFrame/EditorContainers/HomePage/SectionContainer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const SectionContainer = React.forwardRef<Props, HTMLDivElement>(
124124
const shouldHideAnnouncements =
125125
!!authenticatedUser.limits &&
126126
!!authenticatedUser.limits.capabilities.classrooms &&
127-
!!authenticatedUser.limits.capabilities.classrooms.hidePlayTab;
127+
authenticatedUser.limits.capabilities.classrooms.hideAnnouncements;
128128

129129
return (
130130
<Column expand useFullHeight noMargin>

newIDE/app/src/MainFrame/ElectronMainMenu.js

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
type MainMenuEvent,
1111
} from './MainMenu';
1212
import PreferencesContext from './Preferences/PreferencesContext';
13+
import AuthenticatedUserContext from '../Profile/AuthenticatedUserContext';
1314
const electron = optionalRequire('electron');
1415
const remote = optionalRequire('@electron/remote');
1516
const app = remote ? remote.app : null;
@@ -102,6 +103,12 @@ const ElectronMainMenu = ({
102103
const {
103104
values: { useShortcutToClosePreviewWindow },
104105
} = React.useContext(PreferencesContext);
106+
const { limits } = React.useContext(AuthenticatedUserContext);
107+
108+
const hideAskAi =
109+
!!limits &&
110+
!!limits.capabilities.classrooms &&
111+
limits.capabilities.classrooms.hideAskAi;
105112

106113
useAppEventListener({
107114
event: 'browser-window-focus',
@@ -233,6 +240,7 @@ const ElectronMainMenu = ({
233240
recentProjectFiles,
234241
shortcutMap,
235242
isApplicationTopLevelMenu,
243+
hideAskAi,
236244
})
237245
);
238246
}
@@ -245,6 +253,7 @@ const ElectronMainMenu = ({
245253
recentProjectFiles,
246254
shortcutMap,
247255
isApplicationTopLevelMenu,
256+
hideAskAi,
248257
]
249258
);
250259

newIDE/app/src/MainFrame/MainMenu.js

+11-5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export type BuildMainMenuProps = {|
2323
recentProjectFiles: Array<FileMetadataAndStorageProviderName>,
2424
shortcutMap: ShortcutMap,
2525
isApplicationTopLevelMenu: boolean,
26+
hideAskAi: boolean,
2627
|};
2728

2829
export type MainMenuCallbacks = {|
@@ -111,6 +112,7 @@ export const buildMainMenuDeclarativeTemplate = ({
111112
project,
112113
canSaveProjectAs,
113114
isApplicationTopLevelMenu,
115+
hideAskAi,
114116
}: BuildMainMenuProps): Array<MenuDeclarativeItemTemplate> => {
115117
const fileTemplate: MenuDeclarativeItemTemplate = {
116118
label: i18n._(t`File`),
@@ -257,10 +259,14 @@ export const buildMainMenuDeclarativeTemplate = ({
257259
label: i18n._(t`Help`),
258260
role: 'help',
259261
submenu: [
260-
{
261-
label: i18n._(t`Ask AI (GDevelop chatbot)`),
262-
onClickSendEvent: 'main-menu-open-ask-ai',
263-
},
262+
...(hideAskAi
263+
? []
264+
: [
265+
{
266+
label: i18n._(t`Ask AI (GDevelop chatbot)`),
267+
onClickSendEvent: 'main-menu-open-ask-ai',
268+
},
269+
]),
264270
{
265271
label: i18n._(t`GDevelop website`),
266272
onClickOpenLink: 'http://gdevelop.io',
@@ -323,7 +329,7 @@ export const buildMainMenuDeclarativeTemplate = ({
323329
},
324330
{ type: 'separator' },
325331
{
326-
label: i18n._(t`Help to Translate GDevelop`),
332+
label: i18n._(t`Help translate GDevelop`),
327333
onClickOpenLink: 'https://crowdin.com/project/gdevelop',
328334
},
329335
{

newIDE/app/src/MainFrame/Preferences/LanguageSelector.js

+13-8
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,28 @@ const localesToDisplay = LocalesMetadata.filter(displayLocaleMetadata).map(
4646
}
4747
);
4848
const goodProgressLocales = localesToDisplay.filter(
49-
localeMetadata => localeMetadata.translationRatio > 0.5
49+
localeMetadata => localeMetadata.translationRatio > 0.3
5050
);
51-
const startedLocales = localesToDisplay.filter(
52-
localeMetadata => localeMetadata.translationRatio < 0.5
51+
const incompleteLocales = localesToDisplay.filter(
52+
localeMetadata => localeMetadata.translationRatio < 0.3
5353
);
5454

5555
const renderLanguageSelectOption = localeMetadata => {
5656
const translationRatio = localeMetadata.translationRatio || 0;
5757
const percent = (100 * localeMetadata.translationRatio).toFixed(0);
58+
const isIncomplete = translationRatio < 0.3;
5859
const isStarted = translationRatio > 0;
5960

61+
const label = !isIncomplete
62+
? `${localeMetadata.languageNativeName} (${localeMetadata.languageName})`
63+
: `${localeMetadata.languageNativeName} (${
64+
localeMetadata.languageName
65+
} - ${percent}% translated)`;
66+
6067
return (
6168
<SelectOption
6269
value={localeMetadata.languageCode}
63-
label={`${localeMetadata.languageNativeName} (${
64-
localeMetadata.languageName
65-
})${isStarted ? ` - ~${percent}%` : ''}`}
70+
label={label}
6671
disabled={!isStarted}
6772
key={localeMetadata.languageCode}
6873
/>
@@ -92,7 +97,7 @@ const LanguageSelector = ({ onLanguageChanged }: Props) => {
9297
{goodProgressLocales.map(localeMetadata =>
9398
renderLanguageSelectOption(localeMetadata)
9499
)}
95-
{startedLocales.map(localeMetadata =>
100+
{incompleteLocales.map(localeMetadata =>
96101
renderLanguageSelectOption(localeMetadata)
97102
)}
98103
</CompactSelectField>
@@ -107,7 +112,7 @@ const LanguageSelector = ({ onLanguageChanged }: Props) => {
107112
Window.openExternalURL('https://crowdin.com/project/gdevelop')
108113
}
109114
>
110-
help to translate GDevelop in your language
115+
help translate GDevelop into your language
111116
</Link>
112117
.
113118
</Trans>

newIDE/app/src/MainFrame/TabsTitlebar.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import PreferencesContext from './Preferences/PreferencesContext';
1818
import TextButton from '../UI/TextButton';
1919
import { useInterval } from '../Utils/UseInterval';
2020
import { useIsMounted } from '../Utils/UseIsMounted';
21+
import AuthenticatedUserContext from '../Profile/AuthenticatedUserContext';
2122

2223
const WINDOW_DRAGGABLE_PART_CLASS_NAME = 'title-bar-draggable-part';
2324
const WINDOW_NON_DRAGGABLE_PART_CLASS_NAME = 'title-bar-non-draggable-part';
@@ -109,6 +110,7 @@ export default function TabsTitlebar({
109110
const gdevelopTheme = React.useContext(GDevelopThemeContext);
110111
const backgroundColor = gdevelopTheme.titlebar.backgroundColor;
111112
const preferences = React.useContext(PreferencesContext);
113+
const { limits } = React.useContext(AuthenticatedUserContext);
112114
const [tooltipData, setTooltipData] = React.useState<?{|
113115
element: HTMLElement,
114116
editorTab: EditorTab,
@@ -181,8 +183,15 @@ export default function TabsTitlebar({
181183
[]
182184
);
183185

186+
const hideAskAi =
187+
!!limits &&
188+
!!limits.capabilities.classrooms &&
189+
limits.capabilities.classrooms.hideAskAi;
190+
184191
const shouldDisplayAskAi =
185-
preferences.values.showAiAskButtonInTitleBar && !hasAskAiOpened;
192+
preferences.values.showAiAskButtonInTitleBar &&
193+
!hasAskAiOpened &&
194+
!hideAskAi;
186195
const isAskAiIconAnimated = useIsAskAiIconAnimated(shouldDisplayAskAi);
187196

188197
return (

newIDE/app/src/MainFrame/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -3616,6 +3616,10 @@ const MainFrame = (props: Props) => {
36163616
]
36173617
);
36183618

3619+
const hideAskAi =
3620+
!!authenticatedUser.limits &&
3621+
!!authenticatedUser.limits.capabilities.classrooms &&
3622+
authenticatedUser.limits.capabilities.classrooms.hideAskAi;
36193623
const showLoader = isProjectOpening || isLoadingProject || previewLoading;
36203624
const shortcutMap = useShortcutMap();
36213625
const buildMainMenuProps = {
@@ -3625,6 +3629,7 @@ const MainFrame = (props: Props) => {
36253629
recentProjectFiles: preferences.getRecentProjectFiles({ limit: 20 }),
36263630
shortcutMap,
36273631
isApplicationTopLevelMenu: false,
3632+
hideAskAi,
36283633
};
36293634
const mainMenuCallbacks = {
36303635
onChooseProject: () => openOpenFromStorageProviderDialog(),

newIDE/app/src/ObjectGroupsList/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,9 @@ const ObjectGroupsList = React.forwardRef<Props, ObjectGroupsListInterface>(
326326

327327
const answer = await showConfirmation({
328328
title: t`Set as global group`,
329-
message: t`Global elements help to manage objects across multiple scenes and it is recommended for the most used objects.
330-
This action cannot be undone.
331-
Do you want to set as global group?`,
329+
message: t`Global elements help manage objects across multiple scenes and are recommended for frequently used objects. This action cannot be undone.
330+
331+
Do you want to set this as global group?`,
332332
confirmButtonLabel: t`Set as global`,
333333
});
334334
if (!answer) return;

newIDE/app/src/ObjectsList/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -819,9 +819,9 @@ const ObjectsList = React.forwardRef<Props, ObjectsListInterface>(
819819

820820
const answer = Window.showConfirmDialog(
821821
i18n._(
822-
t`Global elements help to manage objects across multiple scenes and it is recommended for the most used objects. This action cannot be undone.
822+
t`Global elements help manage objects across multiple scenes and are recommended for frequently used objects. This action cannot be undone.
823823
824-
Do you want to set as global object?`
824+
Do you want to set this as global object?`
825825
)
826826
);
827827
if (!answer) return;

newIDE/app/src/UI/Text.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const getTextColorFromColor = (color: ?TextColor) => {
109109
};
110110

111111
// A Text to be displayed in the app. Prefer using this
112-
// than a `<p>`/`<span>` or `<div>` as this will help to maintain
112+
// than a `<p>`/`<span>` or `<div>` as this will help maintain
113113
// consistency of text in the whole app.
114114
const Text = React.forwardRef<Props, Interface>(
115115
(

newIDE/app/src/Utils/GDevelopServices/Usage.js

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ export type Capabilities = {|
8181
allowedIdPrefixes: Array<string>,
8282
},
8383
classrooms?: {
84+
hideAskAi: boolean,
85+
hideAnnouncements: boolean,
8486
hidePlayTab: boolean,
8587
hideSocials: boolean,
8688
hidePremiumProducts: boolean,

newIDE/app/src/fixtures/GDevelopServicesTestData/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,8 @@ export const limitsForTeacherUser: Limits = {
534534
hideUpgradeNotice: false,
535535
hideSocials: false,
536536
showClassroomTab: true,
537+
hideAskAi: false,
538+
hideAnnouncements: false,
537539
},
538540
multiplayer: {
539541
lobbiesCount: -1,
@@ -596,6 +598,8 @@ export const limitsForStudentUser: Limits = {
596598
hideSocials: true,
597599
hideUpgradeNotice: true,
598600
showClassroomTab: false,
601+
hideAskAi: true,
602+
hideAnnouncements: true,
599603
},
600604
multiplayer: {
601605
lobbiesCount: -1,

0 commit comments

Comments
 (0)