| Last change
                  on this file since 12049 was
                  11800,
                  checked in by landauf, 8 years ago | 
        
          | 
updated Settings.lua and all sub-menus to cegui 0.8
 | 
        
          | 
              
                  Property svn:eol-style set to
                  native | 
        | File size:
            1019 bytes | 
      
      
        
  | Rev | Line |  | 
|---|
| [6363] | 1 | -- ControlsMenu.lua | 
|---|
|  | 2 |  | 
|---|
| [6746] | 3 | local P = createMenuSheet("ControlsMenu") | 
|---|
| [6748] | 4 | P.loadAlong = { "MouseControlsMenu", "KeyBindMenu" } | 
|---|
| [6363] | 5 |  | 
|---|
| [7689] | 6 | function P.onLoad() | 
|---|
| [8079] | 7 | P.multiplayerMode = "startClient" | 
|---|
| [7689] | 8 |  | 
|---|
|  | 9 | --buttons are arranged in a 3x1 matrix: | 
|---|
| [8079] | 10 | P:setButton(1, 1, { | 
|---|
| [11800] | 11 | ["button"] = P.window:getChild("ControlsWindow/MouseControlsButton"), | 
|---|
| [8079] | 12 | ["callback"]  = P.ControlsMouseControlsButton_clicked | 
|---|
|  | 13 | }) | 
|---|
| [7689] | 14 |  | 
|---|
| [8079] | 15 | P:setButton(2, 1, { | 
|---|
| [11800] | 16 | ["button"] = P.window:getChild("ControlsWindow/KeybindingsButton"), | 
|---|
| [8079] | 17 | ["callback"]  = P.ControlsKeyboardControlsButton_clicked | 
|---|
|  | 18 | }) | 
|---|
| [7689] | 19 |  | 
|---|
| [8079] | 20 | P:setButton(3, 1, { | 
|---|
| [11800] | 21 | ["button"] = P.window:getChild("ControlsBackButton"), | 
|---|
| [8079] | 22 | ["callback"]  = P.ControlsBackButton_clicked | 
|---|
|  | 23 | }) | 
|---|
| [7689] | 24 | end | 
|---|
|  | 25 |  | 
|---|
| [6363] | 26 | function P.ControlsMouseControlsButton_clicked(e) | 
|---|
| [6746] | 27 | showMenuSheet("MouseControlsMenu", true) | 
|---|
| [6363] | 28 | end | 
|---|
|  | 29 |  | 
|---|
|  | 30 | function P.ControlsKeyboardControlsButton_clicked(e) | 
|---|
| [6746] | 31 | showMenuSheet("KeyBindMenu", true) | 
|---|
| [6363] | 32 | end | 
|---|
|  | 33 |  | 
|---|
|  | 34 | function P.ControlsBackButton_clicked(e) | 
|---|
| [6746] | 35 | hideMenuSheet(P.name) | 
|---|
| [6363] | 36 | end | 
|---|
|  | 37 |  | 
|---|
|  | 38 | return P | 
|---|
|  | 39 |  | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.