2014-02-07 00:09:26 +09:00
|
|
|
/*
|
|
|
|
Copyright (c) 2013 yvt
|
|
|
|
|
|
|
|
This file is part of OpenSpades.
|
|
|
|
|
|
|
|
OpenSpades 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 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
OpenSpades 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 OpenSpades. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Core/RefCountedObject.h>
|
|
|
|
#include <vector>
|
|
|
|
#include <Core/Mutex.h>
|
|
|
|
#include <ScriptBindings/ScriptManager.h>
|
|
|
|
#include <AngelScript/addons/scriptarray.h>
|
2014-02-08 22:21:26 +09:00
|
|
|
#include <Core/Math.h>
|
2014-03-02 02:47:41 +01:00
|
|
|
#include <functional>
|
2014-02-08 22:21:26 +09:00
|
|
|
#include <map>
|
2014-02-07 00:09:26 +09:00
|
|
|
|
|
|
|
namespace spades {
|
|
|
|
class Serveritem;
|
|
|
|
namespace gui {
|
|
|
|
class StartupScreen;
|
|
|
|
class StartupScreenHelper: public RefCountedObject {
|
|
|
|
friend class StartupScreen;
|
|
|
|
StartupScreen *scr;
|
2014-02-08 22:21:26 +09:00
|
|
|
std::vector<IntVector3> modes;
|
|
|
|
struct ReportLine {
|
|
|
|
std::string text;
|
|
|
|
Vector4 color;
|
|
|
|
};
|
|
|
|
std::vector<ReportLine> reportLines;
|
|
|
|
std::string report;
|
|
|
|
void AddReport(const std::string& text = std::string(), Vector4 color = Vector4::Make(1.f, 1.f, 1.f, 1.f));
|
|
|
|
|
2014-03-02 02:47:41 +01:00
|
|
|
std::multimap<std::string, std::function<std::string(std::string)> > incapableConfigs;
|
2014-02-08 22:21:26 +09:00
|
|
|
|
|
|
|
bool shaderHighCapable;
|
|
|
|
bool postFilterHighCapable;
|
|
|
|
bool particleHighCapable;
|
|
|
|
bool openGLCapable;
|
2014-02-07 00:09:26 +09:00
|
|
|
protected:
|
|
|
|
virtual ~StartupScreenHelper();
|
|
|
|
public:
|
2014-02-08 22:21:26 +09:00
|
|
|
StartupScreenHelper();
|
|
|
|
void BindStartupScreen(StartupScreen *scr) {
|
|
|
|
this->scr = scr;
|
|
|
|
}
|
2014-02-07 00:09:26 +09:00
|
|
|
void StartupScreenDestroyed();
|
|
|
|
|
2014-02-08 22:21:26 +09:00
|
|
|
void ExamineSystem();
|
|
|
|
|
|
|
|
int GetNumVideoModes();
|
|
|
|
int GetVideoModeWidth(int index);
|
|
|
|
int GetVideoModeHeight(int index);
|
|
|
|
|
|
|
|
int GetNumReportLines();
|
|
|
|
std::string GetReport() { return report; }
|
|
|
|
std::string GetReportLineText(int line);
|
|
|
|
Vector4 GetReportLineColor(int line);
|
|
|
|
|
|
|
|
std::string CheckConfigCapability(const std::string& cfg, const std::string& value);
|
|
|
|
|
2014-02-07 00:09:26 +09:00
|
|
|
void Start();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|