mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-10-31 15:20:13 +00:00
Push params to HudElements options
This commit is contained in:
parent
7471d42cac
commit
378cc1e089
@ -6,7 +6,7 @@
|
||||
#include "config.h"
|
||||
#include "file_utils.h"
|
||||
#include "string_utils.h"
|
||||
|
||||
#include "hud_elements.h"
|
||||
std::string program_name;
|
||||
|
||||
void parseConfigLine(std::string line, std::unordered_map<std::string,std::string>& options) {
|
||||
@ -24,8 +24,10 @@ void parseConfigLine(std::string line, std::unordered_map<std::string,std::strin
|
||||
param = line.substr(0, equal);
|
||||
trim(param);
|
||||
trim(value);
|
||||
if (!param.empty())
|
||||
if (!param.empty()){
|
||||
HUDElements.options.push_back(param);
|
||||
options[param] = value;
|
||||
}
|
||||
}
|
||||
|
||||
void enumerate_config_files(std::vector<std::string>& paths)
|
||||
@ -67,6 +69,7 @@ void enumerate_config_files(std::vector<std::string>& paths)
|
||||
}
|
||||
|
||||
void parseConfigFile(overlay_params& params) {
|
||||
HUDElements.options.clear();
|
||||
params.options.clear();
|
||||
std::vector<std::string> paths;
|
||||
const char *cfg_file = getenv("MANGOHUD_CONFIGFILE");
|
||||
|
3
src/hud_elements.cpp
Normal file
3
src/hud_elements.cpp
Normal file
@ -0,0 +1,3 @@
|
||||
#include "hud_elements.h"
|
||||
|
||||
HudElements HUDElements;
|
9
src/hud_elements.h
Normal file
9
src/hud_elements.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include "overlay.h"
|
||||
#include "overlay_params.h"
|
||||
class HudElements{
|
||||
public:
|
||||
std::vector<std::string> options;
|
||||
};
|
||||
|
||||
extern HudElements HUDElements;
|
@ -27,6 +27,7 @@ foreach s : ['overlay.frag', 'overlay.vert']
|
||||
endforeach
|
||||
|
||||
vklayer_files = files(
|
||||
'hud_elements.cpp',
|
||||
'overlay.cpp',
|
||||
'overlay_params.cpp',
|
||||
'font.cpp',
|
||||
|
Loading…
Reference in New Issue
Block a user