Update trigger script tabs for pointnclick scenes
Point & Click scenes don't support on enter or on leave scripts. Instead the trigger script is activated when the interact button is pressed. The IDE now reflects that by changing the default script tab name to `On Interact` and not displaying `On Leave`
@@ -49,6 +49,10 @@ const scriptTabs = {
leave: l10n("SIDEBAR_ON_LEAVE"),
} as const;
+const pointNClickScriptTabs = {
+ trigger: l10n("SIDEBAR_ON_INTERACT"),
+} as const;
+
const getScriptKey = (tab: keyof typeof scriptTabs): TriggerScriptKey => {
if (tab === "trigger") {
return "script";
@@ -285,6 +289,17 @@ export const TriggerEditor = ({
)}
<SidebarColumn>
<StickyTabs>
+ {scene.type === "POINTNCLICK" ? (
+ <TabBar
+ values={pointNClickScriptTabs}
+ buttons={
+ <>
+ {lockButton}
+ {scriptButton}
+ </>
+ }
+ />
+ ) : (
<TabBar
value={scriptMode}
values={scriptTabs}
@@ -296,6 +311,7 @@ export const TriggerEditor = ({
</>
}
/>
+ )}
</StickyTabs>
<ScriptEditor
value={trigger[scriptKey]}
