@rpg-engine/long-bow 0.3.55 → 0.3.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.3.55",
3
+ "version": "0.3.58",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -5,7 +5,7 @@ import { uiColors } from '../../constants/uiColors';
5
5
  import { SpellShortcut } from '../Spellbook/QuickSpells';
6
6
 
7
7
  export type CircularControllerProps = {
8
- onActionPointerDown: () => void;
8
+ onActionClick: () => void;
9
9
  onCancelClick: () => void;
10
10
  onSpellClick: (spellKey: string) => void;
11
11
  mana: number;
@@ -13,7 +13,7 @@ export type CircularControllerProps = {
13
13
  };
14
14
 
15
15
  export const CircularController: React.FC<CircularControllerProps> = ({
16
- onActionPointerDown,
16
+ onActionClick,
17
17
  onCancelClick,
18
18
  onSpellClick,
19
19
  mana,
@@ -64,7 +64,7 @@ export const CircularController: React.FC<CircularControllerProps> = ({
64
64
  </SpellsContainer>
65
65
  <Button
66
66
  onTouchStart={onTouchStart}
67
- onTouchEnd={onTouchEnd.bind(null, onActionPointerDown)}
67
+ onTouchEnd={onTouchEnd.bind(null, onActionClick)}
68
68
  >
69
69
  <div className="rpgui-icon sword" />
70
70
  </Button>
@@ -14,7 +14,7 @@ import thumbnailDefault from './img/default.png';
14
14
  export interface IQuestsButtonProps {
15
15
  disabled: boolean;
16
16
  title: string;
17
- onPointerDown: (questId: string, npcId: string) => void;
17
+ onClick: (questId: string, npcId: string) => void;
18
18
  }
19
19
 
20
20
  export interface IQuestInfoProps {
@@ -93,7 +93,7 @@ export const QuestInfo: React.FC<IQuestInfoProps> = ({
93
93
  <Button
94
94
  key={index}
95
95
  onPointerDown={() =>
96
- button.onPointerDown(
96
+ button.onClick(
97
97
  quests[currentIndex]._id,
98
98
  quests[currentIndex].npcId
99
99
  )
@@ -129,7 +129,7 @@ export const QuestInfo: React.FC<IQuestInfoProps> = ({
129
129
  <Button
130
130
  key={index}
131
131
  onPointerDown={() =>
132
- button.onPointerDown(quests[0]._id, quests[0].npcId)
132
+ button.onClick(quests[0]._id, quests[0].npcId)
133
133
  }
134
134
  disabled={button.disabled}
135
135
  buttonType={ButtonTypes.RPGUIButton}
@@ -27,7 +27,7 @@ Default.args = {
27
27
  localStorage.getItem(SPELL_SHORTCUTS_STORAGE_KEY) as string
28
28
  ),
29
29
  onSpellClick: key => console.log(key),
30
- onActionPointerDown: () => console.log('action'),
30
+ onActionClick: () => console.log('action'),
31
31
  onCancelClick: () => console.log('cancel attack'),
32
32
  mana: 100,
33
33
  };
@@ -25,20 +25,17 @@ const buttonMock = [
25
25
  {
26
26
  disabled: false,
27
27
  title: 'Accept',
28
- onPointerDown: (QuestId: string, NPCId: String) =>
29
- console.log(QuestId, NPCId),
28
+ onClick: (QuestId: string, NPCId: String) => console.log(QuestId, NPCId),
30
29
  },
31
30
  {
32
31
  disabled: true,
33
32
  title: 'Share',
34
- onPointerDown: (QuestId: string, NPCId: String) =>
35
- console.log(QuestId, NPCId),
33
+ onClick: (QuestId: string, NPCId: String) => console.log(QuestId, NPCId),
36
34
  },
37
35
  {
38
36
  disabled: false,
39
37
  title: 'Reject',
40
- onPointerDown: (QuestId: string, NPCId: String) =>
41
- console.log(QuestId, NPCId),
38
+ onClick: (QuestId: string, NPCId: String) => console.log(QuestId, NPCId),
42
39
  },
43
40
  ];
44
41