Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
727 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** @file togglewidget.h Toggle widget. | ||
* | ||
* @authors Copyright (c) 2013 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
* | ||
* @par License | ||
* GPL: http://www.gnu.org/licenses/gpl.html | ||
* | ||
* <small>This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. This program is distributed in the hope that it | ||
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
* Public License for more details. You should have received a copy of the GNU | ||
* General Public License along with this program; if not, see: | ||
* http://www.gnu.org/licenses</small> | ||
*/ | ||
|
||
#ifndef DENG_CLIENT_TOGGLEWIDGET_H | ||
#define DENG_CLIENT_TOGGLEWIDGET_H | ||
|
||
#include "buttonwidget.h" | ||
|
||
/** | ||
* Toggle is a specialized button that maintains an on/off state in addition to | ||
* the state of a ButtonWidget. | ||
*/ | ||
class ToggleWidget : public ButtonWidget | ||
{ | ||
public: | ||
enum ToggleState { | ||
Active, | ||
Inactive | ||
}; | ||
|
||
/** | ||
* Audience to be notified whenever the toggle is toggled. | ||
*/ | ||
DENG2_DEFINE_AUDIENCE(Toggle, void toggleStateChanged(ToggleWidget &toggle)) | ||
|
||
public: | ||
ToggleWidget(de::String const &name = ""); | ||
|
||
/** | ||
* Sets the toggle state of the widget. | ||
*/ | ||
void setToggleState(ToggleState state, bool notify = true); | ||
|
||
void setActive(bool activate) { setToggleState(activate? Active : Inactive); } | ||
void setInactive(bool deactivate) { setToggleState(deactivate? Inactive : Active ); } | ||
|
||
ToggleState toggleState() const; | ||
|
||
bool isActive() const { return toggleState() == Active; } | ||
bool isInactive() const { return toggleState() == Inactive; } | ||
|
||
private: | ||
DENG2_PRIVATE(d) | ||
}; | ||
|
||
#endif // DENG_CLIENT_TOGGLEWIDGET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** @file variabletogglewidget.h Toggles the value of a variable. | ||
* | ||
* @authors Copyright (c) 2013 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
* | ||
* @par License | ||
* GPL: http://www.gnu.org/licenses/gpl.html | ||
* | ||
* <small>This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. This program is distributed in the hope that it | ||
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
* Public License for more details. You should have received a copy of the GNU | ||
* General Public License along with this program; if not, see: | ||
* http://www.gnu.org/licenses</small> | ||
*/ | ||
|
||
#ifndef DENG_CLIENT_VARIABLETOGGLEWIDGET_H | ||
#define DENG_CLIENT_VARIABLETOGGLEWIDGET_H | ||
|
||
#include "togglewidget.h" | ||
|
||
#include <de/Variable> | ||
|
||
/** | ||
* Widget for toggling the value of a variable. | ||
*/ | ||
class VariableToggleWidget : public ToggleWidget | ||
{ | ||
public: | ||
/// Thrown when the variable is gone and someone tries to access it. @ingroup errors | ||
DENG2_ERROR(VariableMissingError); | ||
|
||
public: | ||
VariableToggleWidget(de::Variable &variable, de::String const &name = ""); | ||
VariableToggleWidget(de::String const &styledText, de::Variable &variable, de::String const &name = ""); | ||
|
||
de::Variable &variable() const; | ||
|
||
private: | ||
DENG2_PRIVATE(d) | ||
}; | ||
|
||
#endif // DENG_CLIENT_VARIABLETOGGLEWIDGET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# The Doomsday Engine Project -- libdeng2 | ||
# | ||
# Copyright (c) 2013 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
|
||
#---------------------------------------------------------------------------- | ||
# CONFIGURATION FOR THE DOOMSDAY CLIENT | ||
# | ||
# This module contains configuration related scripts for the client | ||
# application. It is automatically imported by Config and used as needed. | ||
# | ||
# TODO: make sure the server doesn't run this | ||
|
||
import Version | ||
|
||
def setDefaults(d) | ||
# Applies the client's defaults. | ||
# - d: Record where to set the values. | ||
|
||
try | ||
import DisplayMode | ||
|
||
# The default audio and video subsystems. | ||
d.video = 'opengl' | ||
d.audio = 'fmod' | ||
|
||
# Window manager defaults. | ||
record d.window | ||
d.window.fsaa = True # Remove this (should be window-specific). | ||
|
||
# Configure the main window. | ||
record d.window.main | ||
d.window.main.showFps = False | ||
d.window.main.center = True | ||
d.window.main.fsaa = True | ||
d.window.main.vsync = True | ||
|
||
# The default window parameters depend on the original display mode. | ||
mode = DisplayMode.originalMode() | ||
|
||
# By default the fullscreen resolution is the desktop resolution. | ||
d.window.main.fullSize = [mode['width'], mode['height']] | ||
|
||
# In windowed mode mode, leave some space on the sides so that | ||
# the first switch to windowed mode does not place the window in an | ||
# inconvenient location. The reduction is done proportionally. | ||
offx = mode['width'] * 0.15 | ||
offy = mode['height'] * 0.15 | ||
d.window.main.rect = [offx, offy, | ||
mode['width'] - 2*offx, | ||
mode['height'] - 2*offy] | ||
d.window.main.colorDepth = mode['depth'] | ||
|
||
if Version.OS == 'windows' or Version.OS == 'macx' | ||
d.window.main.fullscreen = True | ||
d.window.main.maximize = False | ||
else | ||
d.window.main.fullscreen = False | ||
d.window.main.maximize = True | ||
end | ||
|
||
catch NotFoundError | ||
# DisplayMode isn't available on the server. | ||
end | ||
|
||
# Console defaults. | ||
record d.console | ||
d.console.snap = True | ||
|
Oops, something went wrong.