Last change
on this file since 6505 was
6417,
checked in by rgrieder, 15 years ago
|
Merged presentation2 branch back to trunk.
Major new features:
- Actual GUI with settings, etc.
- Improved space ship steering (human interaction)
- Rocket fire and more particle effects
- Advanced sound framework
|
-
Property svn:eol-style set to
native
|
File size:
1.3 KB
|
Rev | Line | |
---|
[6145] | 1 | function openDecisionPopup( text, callbackPtr ) |
---|
[6266] | 2 | showGUI("DecisionPopup", false, true) |
---|
| 3 | DecisionPopup.setCallback(callbackPtr) |
---|
[6145] | 4 | DecisionPopup.setText(text) |
---|
[6266] | 5 | end |
---|
| 6 | |
---|
[6311] | 7 | function openInfoPopup(text, functionPtr, closeButton, arguments) |
---|
[6266] | 8 | showGUI("InfoPopup", false, true) |
---|
[6311] | 9 | InfoPopup.execute(functionPtr, arguments) |
---|
[6266] | 10 | InfoPopup.setText(text) |
---|
[6283] | 11 | InfoPopup.setCloseButton(closeButton) |
---|
[6266] | 12 | end |
---|
[6355] | 13 | |
---|
| 14 | function getMinTextSize(window) |
---|
| 15 | local size = {} |
---|
[6387] | 16 | |
---|
[6355] | 17 | local lookAndFeel = CEGUI.WidgetLookManager:getSingleton():getWidgetLook(window:getLookNFeel()) |
---|
| 18 | local height = window:getFont():getLineSpacing() + window:getUnclippedPixelRect():getHeight() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getHeight() |
---|
| 19 | local width = window:getFont():getTextExtent(window:getText()) + window:getUnclippedPixelRect():getWidth() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getWidth() |
---|
[6387] | 20 | |
---|
[6355] | 21 | table.insert(size, height) |
---|
| 22 | table.insert(size, width) |
---|
| 23 | return size |
---|
| 24 | end |
---|
| 25 | |
---|
| 26 | function getScrollingStepSize(window) |
---|
| 27 | local height = window:getUnclippedPixelRect():getHeight() |
---|
| 28 | local maxHeight = CEGUI.System:getSingleton():getGUISheet():getUnclippedPixelRect():getHeight() |
---|
| 29 | local ratio = height/maxHeight |
---|
| 30 | return 0.008*ratio/0.3204 |
---|
| 31 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.