Skip to content

Commit

Permalink
Implement changed button logic
Browse files Browse the repository at this point in the history
  • Loading branch information
NouCake committed Apr 25, 2024
1 parent f491dcb commit 7314852
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/phaser/components/ui/range-slider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {COLOR_CONTRAST, COLOR_PRIMARY} from "@/style.ts";
import {FONT_STYLE_BUTTON} from "@/phaser/components/ui/button.ts";
import {COLOR_CONTRAST, COLOR_PRIMARY, FONT_STYLE_BUTTON} from "@/style.ts";

export class AzNopolySlider extends Phaser.GameObjects.Container {

Expand Down
6 changes: 3 additions & 3 deletions src/phaser/scenes/minigame/clicker-race-scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ export default class ClickerRaceScene extends MinigameScene<ClickerRaceSceneCont
const actionPanel = new AzNopolyPanel(this, gamePanel.width / 2 - (ACTION_BOUNDS.width / 2), (gameBounds.y / 2) + gameBounds.height - ACTION_BOUNDS.height, ACTION_BOUNDS.width, ACTION_BOUNDS.height)
this.add.existing(actionPanel)

this.button = new AzNopolyButton(this, "Race", actionPanel.x + (FRAME_PADDING * 3), actionPanel.y + FRAME_PADDING, actionPanel.width - (FRAME_PADDING * 6), 50, false, () => {
this.button = new AzNopolyButton(this, "Race", actionPanel.x + (FRAME_PADDING * 3), actionPanel.y + FRAME_PADDING, actionPanel.width - (FRAME_PADDING * 6));
this.slider = new AzNopolySlider(this, actionPanel.x + (FRAME_PADDING * 3), actionPanel.y + FRAME_PADDING, actionPanel.width - (FRAME_PADDING * 6), 50, 100, this.onSlider.bind(this))
this.button.setOnClick(() => {
this.controller.onPlayerClick(this.aznopoly.uuid);
});

this.slider = new AzNopolySlider(this, actionPanel.x + (FRAME_PADDING * 3), actionPanel.y + FRAME_PADDING, actionPanel.width - (FRAME_PADDING * 6), 50, 100, this.onSlider.bind(this))

this.add.existing(this.slider);
this.add.existing(this.button);

Expand Down

0 comments on commit 7314852

Please sign in to comment.