Menu Item Key Press

Discussion in 'Mac Programming' started by cOOldOOd, Nov 28, 2013.

  1. cOOldOOd, Nov 28, 2013
    Last edited: Nov 28, 2013

    cOOldOOd macrumors newbie

    Joined:
    Jul 23, 2010
    #1
    I have built a game outside of Xcode, Im able to open the menu bar .nib with Xcode and add more menu items and such. But I'm wondering if it is possible to send a key press at the app after pressing a menu item?
     
  2. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #2
    It sounds to me like you haven't divided responsibilities in your app properly. One UI interaction shouldn't be simulating another UI interaction - both UI interactions should trigger the same controller code.
     
  3. cOOldOOd thread starter macrumors newbie

    Joined:
    Jul 23, 2010
    #3
    Thanks for the help, it leads me to believe that I could only have the menu bar interact with the game if I built it all in xcode. The chess app has game - new game, i'd like to do that with my unity game.
     
  4. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #4
    Ah - most games don't use the menubar so Unity's APIs don't seem to allow for using it.

    I would look into either making a menubar in your game using the GUI library, or I would see if Unity games allow external triggers or scripting hooks or something like that.
     

Share This Page