Demo – Menu Buttons

This topic contains 5 replies, has 3 voices, and was last updated by  Keith Davis 1 year, 3 months ago.

  • November 24, 2017 at 6:31 pm #176506

    Menu buttons sometimes need to be pressed more than once to activate e.g. Reset Game, Start, etc.

  • November 25, 2017 at 7:40 pm #176555

    If SpriteKit is still transitioning the outgoing scene the buttons aren’t active. Shouldn’t be very noticeable on a device. The Simulator is always slow though (I wouldn’t test any of this on the Simulator).

  • November 25, 2017 at 7:43 pm #176557

    Thanks, This happens when I navigate the menus from start and level transistions. It is noticeable on a live device.

  • November 26, 2017 at 6:58 pm #176610

    In Home.swift I added transitionInProgress = false (around line 800) to fix intermittent multiple taps to get menu items to function. The first If statement in the function would randomly fall through on button presses; Fixed without any side effects so far (Please confirm if you know this change could mess things up somewhere else):

    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {

    for t in touches {

    let pos:CGPoint = t.location(in: self)

    for node in self.children {

    if let someButton:Button = node as? Button {

    if (someButton.contains(pos)) {

    // Added this line to fix menu presses – KRD 11/26/17
    transitionInProgress = false


  • June 20, 2018 at 7:55 am #185109

    Hi Keith – did you happen to apply this also to MainMenu buttons? Somehow selected button images do not appear on MainMenu. Thanks!

  • June 20, 2018 at 8:00 am #185110

    It has been a while since I worked on this, but I believe I did.

You must be logged in to reply to this topic.

Become part of the CartoonSmart Team with our Affiliate Program

Make recurring money when you refer a subscriber. 30 day tracking. Commissions 33%-50%!

Uh oh, missing your affiliate ID. Create one real quick