Change follow request to "F" button, use nes-css buttons
This commit is contained in:
parent
5c385c520a
commit
2cd088c049
3 changed files with 15 additions and 20 deletions
|
@ -95,16 +95,19 @@ vim: ft=typescript
|
||||||
<p>Do you want to follow {name(followUsers[0])}?</p>
|
<p>Do you want to follow {name(followUsers[0])}?</p>
|
||||||
</section>
|
</section>
|
||||||
<section class="interact-menu-action">
|
<section class="interact-menu-action">
|
||||||
<button type="button" class="accept" on:click|preventDefault={acceptFollowRequest}>Yes</button>
|
<button type="button" class="nes-btn is-success" on:click|preventDefault={acceptFollowRequest}
|
||||||
<button type="button" class="deny" on:click|preventDefault={reset}>No</button>
|
>Yes</button
|
||||||
|
>
|
||||||
|
<button type="button" class="nes-btn is-error" on:click|preventDefault={reset}>No</button>
|
||||||
</section>
|
</section>
|
||||||
{:else if followRole === followRoles.leader}
|
{:else if followRole === followRoles.leader}
|
||||||
<section class="interact-menu-question">
|
<section class="interact-menu-question">
|
||||||
<p>Ask others to follow you?</p>
|
<p>Ask others to follow you?</p>
|
||||||
</section>
|
</section>
|
||||||
<section class="interact-menu-action">
|
<section class="interact-menu-action">
|
||||||
<button type="button" class="accept" on:click|preventDefault={sendFollowRequest}>Yes</button>
|
<button type="button" class="nes-btn is-success" on:click|preventDefault={sendFollowRequest}>Yes</button
|
||||||
<button type="button" class="deny" on:click|preventDefault={reset}>No</button>
|
>
|
||||||
|
<button type="button" class="nes-btn is-error" on:click|preventDefault={reset}>No</button>
|
||||||
</section>
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,8 +128,8 @@ vim: ft=typescript
|
||||||
</section>
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
<section class="interact-menu-action">
|
<section class="interact-menu-action">
|
||||||
<button type="button" class="accept" on:click|preventDefault={reset}>Yes</button>
|
<button type="button" class="nes-btn is-success" on:click|preventDefault={reset}>Yes</button>
|
||||||
<button type="button" class="deny" on:click|preventDefault={abortEnding}>No</button>
|
<button type="button" class="nes-btn is-error" on:click|preventDefault={abortEnding}>No</button>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -206,19 +209,6 @@ vim: ft=typescript
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
height: 2.5em;
|
height: 2.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.accept {
|
|
||||||
background-color: #00ff0088;
|
|
||||||
}
|
|
||||||
.accept:hover {
|
|
||||||
background-color: #00ff00cc;
|
|
||||||
}
|
|
||||||
.deny {
|
|
||||||
background-color: #ff000088;
|
|
||||||
}
|
|
||||||
.deny:hover {
|
|
||||||
background-color: #ff0000cc;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ export class Player extends Character {
|
||||||
const state = get(followStateStore);
|
const state = get(followStateStore);
|
||||||
const role = get(followRoleStore);
|
const role = get(followRoleStore);
|
||||||
|
|
||||||
if (activeEvents.get(UserInputEvent.Interact)) {
|
if (activeEvents.get(UserInputEvent.Follow)) {
|
||||||
if (state === followStates.off && this.scene.groups.size > 0) {
|
if (state === followStates.off && this.scene.groups.size > 0) {
|
||||||
followStateStore.set(followStates.requesting);
|
followStateStore.set(followStates.requesting);
|
||||||
followRoleStore.set(followRoles.leader);
|
followRoleStore.set(followRoles.leader);
|
||||||
|
|
|
@ -16,6 +16,7 @@ export enum UserInputEvent {
|
||||||
MoveDown,
|
MoveDown,
|
||||||
SpeedUp,
|
SpeedUp,
|
||||||
Interact,
|
Interact,
|
||||||
|
Follow,
|
||||||
Shout,
|
Shout,
|
||||||
JoystickMove,
|
JoystickMove,
|
||||||
}
|
}
|
||||||
|
@ -147,6 +148,10 @@ export class UserInputManager {
|
||||||
event: UserInputEvent.Interact,
|
event: UserInputEvent.Interact,
|
||||||
keyInstance: this.Scene.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE, false),
|
keyInstance: this.Scene.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE, false),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
event: UserInputEvent.Follow,
|
||||||
|
keyInstance: this.Scene.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.F, false),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
event: UserInputEvent.Shout,
|
event: UserInputEvent.Shout,
|
||||||
keyInstance: this.Scene.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.F, false),
|
keyInstance: this.Scene.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.F, false),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue