colobot/colobot-base/ui/screen/screen.h

69 lines
1.7 KiB
C
Raw Permalink Normal View History

2015-08-04 21:28:58 +00:00
/*
* This file is part of the Colobot: Gold Edition source code
2023-08-06 21:15:48 +00:00
* Copyright (C) 2001-2023, Daniel Roux, EPSITEC SA & TerranovaTeam
2015-08-22 14:40:02 +00:00
* http://epsitec.ch; http://colobot.info; http://github.com/colobot
2015-08-04 21:28:58 +00:00
*
* 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 3 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://gnu.org/licenses
*/
2015-08-04 21:28:58 +00:00
#pragma once
#include <string>
#include <glm/glm.hpp>
2015-08-04 21:28:58 +00:00
class CRobotMain;
class CApplication;
class CEventQueue;
class CSoundInterface;
struct Event;
2015-08-04 21:28:58 +00:00
namespace Gfx
{
class CEngine;
}
namespace Ui
{
2015-08-04 21:28:58 +00:00
class CInterface;
class CScreen
{
public:
CScreen();
virtual ~CScreen();
2015-08-04 21:28:58 +00:00
virtual void CreateInterface() = 0;
virtual bool EventProcess(const Event &event) = 0;
protected:
void CreateVersionDisplay();
2015-08-04 21:28:58 +00:00
void SetBackground(const std::string& filename, bool scaled = false);
protected:
CRobotMain* m_main;
2015-08-04 21:28:58 +00:00
CInterface* m_interface;
CApplication* m_app;
CEventQueue* m_eventQueue;
Gfx::CEngine* m_engine;
CSoundInterface* m_sound;
const glm::vec2 dim = { 32.0f / 640.0f, 32.0f / 480.0f };
2015-08-04 21:28:58 +00:00
const float ox = 3.0f/640.0f, oy = 3.0f/480.0f;
const float sx = (32.0f+2.0f)/640.0f, sy = (32.0f+2.0f)/480.0f;
};
} // namespace Ui