Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation2/data/gui/scripts/GraphicsMenu.lua @ 6206

Last change on this file since 6206 was 6206, checked in by cmueri, 14 years ago

The new menus (but not all functions of the menu) are now available.

File size: 1.8 KB
Line 
1-- GraphicsMenu.lua
2
3BasicGUI = require("BasicGUI")
4local P = BasicGUI:new() --inherit everything from the gui package
5if _REQUIREDNAME == nil then
6    GraphicsMenu = P
7else
8    _G[_REQUIREDNAME] = P
9end
10
11P.filename = "GraphicsMenu"
12P.layoutString = "GraphicsMenu.layout"
13
14function P:init()
15    dropdown = winMgr:getWindow("orxonox/ResolutionCombobox")
16    local resolutionList = {}
17    table.insert(resolutionList, "800 x 600  (4:3)")
18    table.insert(resolutionList, "1024 x 640  (16:10)")
19    table.insert(resolutionList, "1024 x 768  (4:3)")
20    table.insert(resolutionList, "1280 x 800  (16:10)")
21    table.insert(resolutionList, "1280 x 960  (4:3)")
22    table.insert(resolutionList, "1440 x 900  (16:10)")
23    table.insert(resolutionList, "1600 x 1200  (4:3)")
24    table.insert(resolutionList, "1680 x 1050  (16:10)")
25    for k,v in pairs(resolutionList) do
26        item = CEGUI.createListboxTextItem(v)       
27        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
28        CEGUI.toCombobox(dropdown):addItem(item)
29    end
30    local scrollbar_active = false
31end
32
33function P.GraphicsResolutionCombobox_changed(e)
34    -- resolution
35    debug("event: resolution")
36end
37
38function P.GraphicsBrightnessScrollbar_changed(e)
39    if scrollbar_active == false then
40        -- brightness
41        debug("event: brightness")
42    end
43end
44
45function P.GraphicsBrightnessScrollbar_started(e)
46    scrollbar_active = true
47end
48
49function P.GraphicsBrightnessScrollbar_ended(e)
50    -- brightness
51    debug("event: brightness")
52    scrollbar_active = false
53end
54
55function P.GraphicsFullscreenCheckbox_clicked(e)
56    -- fullscreen
57    debug("event: fullscreen")
58end
59
60function P.GraphicsBackButton_clicked(e)
61    hideGUI(P.filename)
62end
63
64return P
65
Note: See TracBrowser for help on using the repository browser.