Ignore:
Timestamp:
2013-07-02 15:32:09 (9 years ago)
Author:
janiemit
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2013/27/TeemuM/Game/Game/Game/UI.cs

    r4358 r4377  
    1010using Jypeli.Widgets; 
    1111 
    12 class UI 
     12public class UI 
    1313{ 
    14     public static int Menu() 
     14    public static int Menu(String title, String[] options, Action selectionHandler) 
    1515    { 
    1616        int selectedItem = -1; 
    17         MultiSelectWindow Menu = new MultiSelectWindow("Welcome to Game", "Start Game", "Scoreboard", "Exit"); 
    18         Menu.ItemSelected += delegate(int selected) { selectedItem = selected; }; 
    19         G.game.Add(Menu); 
     17        MultiSelectWindow Menu = new MultiSelectWindow("Welcome to Game", options); 
     18        Menu.ItemSelected += delegate(int selected) { selectionHandler(selected); }; 
     19        Add(Menu); 
    2020        return selectedItem; 
    2121    } 
Note: See TracChangeset for help on using the changeset viewer.