Changes:
New Logger Add NTCtrl Base to UI7
This commit is contained in:
@ -28,7 +28,6 @@
|
||||
#include <renderd7/Net.hpp>
|
||||
#include <renderd7/Overlays.hpp>
|
||||
#include <renderd7/Sound.hpp>
|
||||
#include <renderd7/StealConsole.hpp>
|
||||
#include <renderd7/Timer.hpp>
|
||||
#include <renderd7/UI7.hpp>
|
||||
#include <renderd7/global_db.hpp>
|
||||
|
@ -35,15 +35,19 @@ class LoggerBase {
|
||||
/// @brief Init the Logger
|
||||
/// @param filename name[_date_time.txt]
|
||||
void Init(const std::string& name, bool fileless = false);
|
||||
/// @brief Write a String to the File
|
||||
/// @brief Write a String
|
||||
/// @param debug_text string
|
||||
void Write(const std::string& debug_text);
|
||||
/// @param lvl Logger LVL 0 = ERR, 1 =WARNING, >=2= Default
|
||||
void Write(const std::string& debug_text, int lvl = 2);
|
||||
void SetLvl(int lvl) { writelvl = lvl; }
|
||||
const std::vector<std::string>& Lines();
|
||||
|
||||
private:
|
||||
/// \param filename the name of the logfile
|
||||
std::string filename;
|
||||
std::string log_path;
|
||||
std::ofstream _log;
|
||||
int writelvl = 1; // Only log errors/Warnings
|
||||
std::vector<std::string> lines;
|
||||
};
|
||||
} // namespace RenderD7
|
@ -30,9 +30,9 @@ namespace RenderD7 {
|
||||
class SpriteSheetAnimation : public RenderD7::Sprite {
|
||||
public:
|
||||
/// @brief Constructor
|
||||
SpriteSheetAnimation();
|
||||
SpriteSheetAnimation() = default;
|
||||
/// @brief Deconstructor
|
||||
~SpriteSheetAnimation();
|
||||
~SpriteSheetAnimation() = default;
|
||||
RD7_SMART_CTOR(SpriteSheetAnimation);
|
||||
/// @brief Setup an Animation
|
||||
/// @param sheet Input Spritesheet
|
||||
|
@ -1,39 +0,0 @@
|
||||
/**
|
||||
* This file is part of RenderD7
|
||||
* Copyright (C) 2021-2024 NPI-D7, tobid7
|
||||
*
|
||||
* 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://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
namespace RenderD7 {
|
||||
/// @brief StealConsole Class
|
||||
class StealConsole {
|
||||
public:
|
||||
/// @brief Constructor
|
||||
StealConsole();
|
||||
/// @brief Deconstructor
|
||||
~StealConsole();
|
||||
/// @brief The Stolen Stdout
|
||||
/// @return Stdout as string
|
||||
std::string GetStdout();
|
||||
|
||||
private:
|
||||
/// @param stolen_stdout Stolen Stdout
|
||||
std::stringstream stolen_stdout;
|
||||
};
|
||||
} // namespace RenderD7
|
@ -22,7 +22,7 @@
|
||||
#include <renderd7/global_db.hpp>
|
||||
#include <renderd7/renderd7.hpp>
|
||||
|
||||
#define CFGVER "0"
|
||||
#define CFGVER "1"
|
||||
#define THEMEVER "0"
|
||||
|
||||
#ifndef V_RD7BTIME
|
||||
@ -76,6 +76,9 @@ extern bool rd7i_amdt;
|
||||
extern void* rd7i_soc_buf;
|
||||
extern bool rd7i_is_am_init;
|
||||
extern RenderD7::Theme::Ref rd7i_active_theme;
|
||||
extern bool rd7i_lggrf;
|
||||
|
||||
// Use function for protection
|
||||
RenderD7::LoggerBase::Ref _rd7i_logger();
|
||||
RenderD7::Net::Error rd7i_soc_init();
|
||||
void rd7i_soc_deinit();
|
@ -37,7 +37,7 @@
|
||||
#include <renderd7/Color.hpp>
|
||||
#include <renderd7/FunctionTrace.hpp>
|
||||
#include <renderd7/Hardware.hpp>
|
||||
#include <renderd7/Log2.hpp>
|
||||
#include <renderd7/Logger.hpp>
|
||||
#include <renderd7/Memory.hpp>
|
||||
#include <renderd7/Overlays.hpp>
|
||||
#include <renderd7/Ovl.hpp>
|
||||
@ -107,6 +107,7 @@ class RSettings : public RenderD7::Scene {
|
||||
ROVERLAYS, // Overlay Settings
|
||||
RFTRACE, // FTRace Menu
|
||||
RUI7, // UI7 Menu
|
||||
RLOGS, // Logs
|
||||
};
|
||||
|
||||
/// @param shared_request Defines requests from Draw to Logic
|
||||
|
Reference in New Issue
Block a user