Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into oculus-refactor
Browse files Browse the repository at this point in the history
Conflicts:
	doomsday/client/src/ui/widgetactions.cpp
  • Loading branch information
skyjake committed Feb 7, 2014
2 parents 4fb217b + d3af953 commit 663640b
Show file tree
Hide file tree
Showing 233 changed files with 10,812 additions and 9,775 deletions.
2 changes: 2 additions & 0 deletions doomsday/api/api_thinker.h
Expand Up @@ -23,6 +23,8 @@
#define LIBDENG_THINKER_H

#include "api_base.h"
#include <de/reader.h>
#include <de/writer.h>

#ifdef __DOOMSDAY__
namespace de {
Expand Down
7 changes: 5 additions & 2 deletions doomsday/api/api_uri.h
Expand Up @@ -84,6 +84,8 @@ DENG_API_TYPEDEF(Uri) // v1
*/
Uri* (*New)(void);

Uri* (*NewWithPath3)(char const *defaultScheme, char const *path);

/**
* Constructs a Uri instance from @a path. The uri should be destroyed with
* Uri_Delete() once it is no longer needed.
Expand All @@ -92,9 +94,9 @@ DENG_API_TYPEDEF(Uri) // v1
* @param defaultResourceClass If no scheme is defined in @a path and this is not @c FC_NULL,
* look for an appropriate default scheme for this class of resource.
*/
Uri* (*NewWithPath2)(char const* path, resourceclassid_t defaultResourceClass);
Uri* (*NewWithPath2)(char const *path, resourceclassid_t defaultResourceClass);

Uri* (*NewWithPath)(char const* path);
Uri* (*NewWithPath)(char const *path);

/**
* Constructs a Uri instance by duplicating @a other. The uri should be destroyed
Expand Down Expand Up @@ -259,6 +261,7 @@ DENG_API_TYPEDEF(Uri) // v1
// Macros for accessing exported functions.
#ifndef DENG_NO_API_MACROS_URI
#define Uri_New _api_Uri.New
#define Uri_NewWithPath3 _api_Uri.NewWithPath3
#define Uri_NewWithPath2 _api_Uri.NewWithPath2
#define Uri_NewWithPath _api_Uri.NewWithPath
#define Uri_Dup _api_Uri.Dup
Expand Down
3 changes: 2 additions & 1 deletion doomsday/api/apis.h
Expand Up @@ -137,7 +137,8 @@ enum {
DE_API_THINKER = DE_API_THINKER_v1,

DE_API_URI_v1 = 2300, // 1.10
DE_API_URI = DE_API_URI_v1,
DE_API_URI_v2 = 2301, // 1.14
DE_API_URI = DE_API_URI_v2,

DE_API_WAD_v1 = 2400, // 1.10
DE_API_WAD_v2 = 2401, // 1.14
Expand Down
12 changes: 10 additions & 2 deletions doomsday/client/client.pro
Expand Up @@ -375,9 +375,9 @@ DENG_HEADERS += \
include/ui/dialogs/alertdialog.h \
include/ui/dialogs/audiosettingsdialog.h \
include/ui/dialogs/coloradjustmentdialog.h \
include/ui/dialogs/gamesdialog.h \
include/ui/dialogs/inputsettingsdialog.h \
include/ui/dialogs/logsettingsdialog.h \
include/ui/dialogs/multiplayerdialog.h \
include/ui/dialogs/networksettingsdialog.h \
include/ui/dialogs/renderersettingsdialog.h \
include/ui/dialogs/videosettingsdialog.h \
Expand All @@ -388,13 +388,17 @@ DENG_HEADERS += \
include/ui/widgets/consolecommandwidget.h \
include/ui/widgets/consolewidget.h \
include/ui/widgets/cvarchoicewidget.h \
include/ui/widgets/cvarlineeditwidget.h \
include/ui/widgets/cvarsliderwidget.h \
include/ui/widgets/cvartogglewidget.h \
include/ui/widgets/gameselectionwidget.h \
include/ui/widgets/gamesessionwidget.h \
include/ui/widgets/gameuiwidget.h \
include/ui/widgets/gamewidget.h \
include/ui/widgets/icvarwidget.h \
include/ui/widgets/keygrabberwidget.h \
include/ui/widgets/mpselectionwidget.h \
include/ui/widgets/multiplayermenuwidget.h \
include/ui/widgets/profilepickerwidget.h \
include/ui/widgets/taskbarwidget.h \
include/ui/fi_main.h \
Expand Down Expand Up @@ -698,9 +702,9 @@ SOURCES += \
src/ui/dialogs/alertdialog.cpp \
src/ui/dialogs/audiosettingsdialog.cpp \
src/ui/dialogs/coloradjustmentdialog.cpp \
src/ui/dialogs/gamesdialog.cpp \
src/ui/dialogs/inputsettingsdialog.cpp \
src/ui/dialogs/logsettingsdialog.cpp \
src/ui/dialogs/multiplayerdialog.cpp \
src/ui/dialogs/networksettingsdialog.cpp \
src/ui/dialogs/videosettingsdialog.cpp \
src/ui/dialogs/vrsettingsdialog.cpp \
Expand All @@ -723,12 +727,16 @@ SOURCES += \
src/ui/widgets/consolecommandwidget.cpp \
src/ui/widgets/consolewidget.cpp \
src/ui/widgets/cvarchoicewidget.cpp \
src/ui/widgets/cvarlineeditwidget.cpp \
src/ui/widgets/cvarsliderwidget.cpp \
src/ui/widgets/cvartogglewidget.cpp \
src/ui/widgets/gameselectionwidget.cpp \
src/ui/widgets/gamesessionwidget.cpp \
src/ui/widgets/gamewidget.cpp \
src/ui/widgets/gameuiwidget.cpp \
src/ui/widgets/keygrabberwidget.cpp \
src/ui/widgets/mpselectionwidget.cpp \
src/ui/widgets/multiplayermenuwidget.cpp \
src/ui/widgets/profilepickerwidget.cpp \
src/ui/widgets/taskbarwidget.cpp \
src/ui/windowsystem.cpp \
Expand Down
3 changes: 2 additions & 1 deletion doomsday/client/data/defaultstyle.pack/rules.dei
Expand Up @@ -21,6 +21,7 @@ group document {
}

group editor {
rule width { constant $= UNIT * 55 }
rule completion.height { constant $= UNIT * 100 }
}

Expand Down Expand Up @@ -62,7 +63,7 @@ group console {

group gameselection {
rule max.width { constant $= UNIT * 215 }
rule max.height { constant $= UNIT * 150 }
rule max.height { constant $= UNIT * 215 }
}

group coloradjustment {
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/clientapp.h
Expand Up @@ -65,6 +65,7 @@ class ClientApp : public de::BaseGuiApp
static ClientApp &app();
static Updater &updater();
static SettingsRegister &logSettings();
static SettingsRegister &networkSettings();
static SettingsRegister &audioSettings(); ///< @todo Belongs in AudioSystem.
static ServerLink &serverLink();
static InputSystem &inputSystem();
Expand Down
11 changes: 3 additions & 8 deletions doomsday/client/include/gl/sys_opengl.h
Expand Up @@ -46,14 +46,9 @@

#if defined(UNIX) && defined(MACOSX)
# define GL_GLEXT_PROTOTYPES
# if defined(MACOSX_NATIVESDK) || defined(MACOS_10_7)
# include <OpenGL/gl.h>
# include <OpenGL/glext.h>
# include <OpenGL/OpenGL.h>
# else
# include <GL/gl.h>
# include <OpenGL/OpenGL.h>
# endif
# include <OpenGL/gl.h>
# include <OpenGL/glext.h>
# include <OpenGL/OpenGL.h>
# define GL_CALL
#endif

Expand Down
10 changes: 6 additions & 4 deletions doomsday/client/include/network/net_main.h
Expand Up @@ -255,22 +255,24 @@ void Net_Ticker(timespan_t time);
*/
void Net_Drawer(void);

dd_bool Net_IsLocalPlayer(int pNum);
dd_bool Net_IsLocalPlayer(int pNum);

void Net_PrintServerInfo(int index, serverinfo_t *info);
void ServerInfo_Print(serverinfo_t const *info, int index);

/**
* Converts textual data to a serverinfo struct. Returns true if the
* label/value pair is recognized.
*/
dd_bool Net_StringToServerInfo(char const *valuePair, serverinfo_t *info);
dd_bool ServerInfo_FromString(serverinfo_t *info, char const *valuePair);

void Net_RecordToServerInfo(de::Record const &rec, serverinfo_t *info);
void ServerInfo_FromRecord(serverinfo_t *info, de::Record const &rec);

#ifdef __cplusplus
} // extern "C"
#endif

de::String ServerInfo_AsStyledText(serverinfo_t const *sv);

de::String Net_UserAgent();

#endif /* LIBDENG_NETWORK_H */
8 changes: 8 additions & 0 deletions doomsday/client/include/network/serverlink.h
Expand Up @@ -37,6 +37,9 @@ class ServerLink : public de::shell::AbstractLink
public:
DENG2_DEFINE_AUDIENCE(DiscoveryUpdate, void linkDiscoveryUpdate(ServerLink const &link))

DENG2_DEFINE_AUDIENCE(Join, void networkGameJoined())
DENG2_DEFINE_AUDIENCE(Leave, void networkGameLeft())

public:
ServerLink();

Expand All @@ -58,6 +61,11 @@ class ServerLink : public de::shell::AbstractLink
*/
void discover(de::String const &domain);

/**
* Asks the master server for information about currently running servers.
*/
void discoverUsingMaster();

bool isDiscovering() const;

int foundServerCount() const;
Expand Down
3 changes: 2 additions & 1 deletion doomsday/client/include/ui/commandaction.h
Expand Up @@ -33,8 +33,9 @@ class CommandAction : public de::Action
public:
CommandAction(de::String const &cmd, int commandSource = CMDS_DDAY);

de::String command() const { return _command; }

void trigger();
CommandAction *duplicate() const;

private:
de::String _command;
Expand Down
@@ -1,4 +1,4 @@
/** @file multiplayerdialog.h Dialog for listing found servers and joining games.
/** @file gamesdialog.h Dialog for viewing and loading available games.
*
* @authors Copyright (c) 2014 Jaakko Keränen <jaakko.keranen@iki.fi>
*
Expand All @@ -16,28 +16,29 @@
* http://www.gnu.org/licenses</small>
*/

#ifndef DENG_CLIENT_MULTIPLAYERDIALOG_H
#define DENG_CLIENT_MULTIPLAYERDIALOG_H
#ifndef DENG_CLIENT_GAMESDIALOG_H
#define DENG_CLIENT_GAMESDIALOG_H

#include <de/DialogWidget>

/**
* Dialog for listing found multiplayer servers and joining games.
*
* Servers can be found via the Master Server, LAN Beacon, and manual IP address.
* Dialog for viewing and loading available games.
*/
class MultiplayerDialog : public de::DialogWidget
class GamesDialog : public de::DialogWidget
{
Q_OBJECT

public:
MultiplayerDialog(de::String const &name = "multiplayer");
GamesDialog(de::String const &name = "games");

public slots:
void showSettings();

protected:
void preparePanelForOpening();

private:
DENG2_PRIVATE(d)
};

#endif // DENG_CLIENT_MULTIPLAYERDIALOG_H
#endif // DENG_CLIENT_GAMESDIALOG_H
1 change: 1 addition & 0 deletions doomsday/client/include/ui/dialogs/networksettingsdialog.h
Expand Up @@ -33,6 +33,7 @@ class NetworkSettingsDialog : public de::DialogWidget

public slots:
void resetToDefaults();
void showDeveloperPopup();

private:
DENG2_PRIVATE(d)
Expand Down
51 changes: 51 additions & 0 deletions doomsday/client/include/ui/widgets/cvarlineeditwidget.h
@@ -0,0 +1,51 @@
/** @file cvarlineeditwidget.h Console variable edit widget.
*
* @authors Copyright (c) 2014 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_CVARLINEEDITWIDGET_H
#define DENG_CLIENT_CVARLINEEDITWIDGET_H

#include <de/LineEditWidget>
#include "icvarwidget.h"

/**
* Console variable text editor.
*/
class CVarLineEditWidget : public de::LineEditWidget, public ICVarWidget
{
Q_OBJECT

public:
CVarLineEditWidget(char const *cvarPath);

char const *cvarPath() const;

public slots:
void updateFromCVar();
void endEditing();

protected slots:
void setCVarValueFromWidget();

protected:
void contentChanged();

private:
DENG2_PRIVATE(d)
};

#endif // DENG_CLIENT_CVARLINEEDITWIDGET_H
19 changes: 16 additions & 3 deletions doomsday/client/include/ui/widgets/gameselectionwidget.h
Expand Up @@ -19,20 +19,33 @@
#ifndef DENG_CLIENT_GAMESELECTIONWIDGET_H
#define DENG_CLIENT_GAMESELECTIONWIDGET_H

#include <de/MenuWidget>
#include <de/ScrollAreaWidget>
#include <de/ButtonWidget>

/**
* Menu for selecting
*/
class GameSelectionWidget : public de::MenuWidget
class GameSelectionWidget : public de::ScrollAreaWidget
{
Q_OBJECT

public:
GameSelectionWidget(de::String const &name = "gameselection");

void setTitleColor(de::DotPath const &colorId,
de::DotPath const &hoverColorId,
de::ButtonWidget::HoverColorMode mode = de::ButtonWidget::ModulateColor);
void setTitleFont(de::DotPath const &fontId);

// Events.
void viewResized();
void update();

signals:
void gameSessionSelected();

protected slots:
void updateSubsetLayout();

private:
DENG2_PRIVATE(d)
};
Expand Down
45 changes: 45 additions & 0 deletions doomsday/client/include/ui/widgets/gamesessionwidget.h
@@ -0,0 +1,45 @@
/** @file gamesessionwidget.h
*
* @authors Copyright (c) 2014 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_GAMESESSIONWIDGET_H
#define DENG_CLIENT_GAMESESSIONWIDGET_H

#include <de/ButtonWidget>
#include <de/DocumentWidget>

/**
* Widget for representing an item (game session) in the game selection menu.
*
* It has two buttons: one for starting the game and one for configuring it.
*/
class GameSessionWidget : public de::GuiWidget
{
public:
GameSessionWidget();

de::ButtonWidget &loadButton();
de::ButtonWidget &infoButton();
de::DocumentWidget &document();

virtual void updateInfoContent();

private:
DENG2_PRIVATE(d)
};

#endif // DENG_CLIENT_GAMESESSIONWIDGET_H

0 comments on commit 663640b

Please sign in to comment.