VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
HostPlayerLanguages.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
VoltMod/Core/Text/PlayerLanguages.hpp
>
4
#include <
VoltMod/Host/IPluginLanguages.hpp
>
5
#include <string_view>
6
7
namespace
VoltMod::Internal
8
{
9
10
/** @ref PlayerLanguages over the host's table, which Core cannot include. */
11
class
HostPlayerLanguages
final :
public
PlayerLanguages
12
{
13
public
:
14
explicit
HostPlayerLanguages
(
IPluginLanguages
& host) : _host(host) {}
15
16
std::string_view
Language
(
int
slot)
const override
{
return
_host.Language(slot); }
17
void
SetLanguage
(
int
slot, std::string_view lang)
override
{ _host.SetLanguage(slot, lang); }
18
19
private
:
20
IPluginLanguages
& _host;
21
};
22
23
}
// namespace VoltMod::Internal
IPluginLanguages.hpp
PlayerLanguages.hpp
VoltMod::Internal::HostPlayerLanguages::HostPlayerLanguages
HostPlayerLanguages(IPluginLanguages &host)
Definition
HostPlayerLanguages.hpp:14
VoltMod::Internal::HostPlayerLanguages::Language
std::string_view Language(int slot) const override
Definition
HostPlayerLanguages.hpp:16
VoltMod::Internal::HostPlayerLanguages::SetLanguage
void SetLanguage(int slot, std::string_view lang) override
Definition
HostPlayerLanguages.hpp:17
VoltMod::PlayerLanguages
Definition
PlayerLanguages.hpp:10
VoltMod::Internal
Definition
ClientLanguage.hpp:9
VoltMod::IPluginLanguages
Definition
IPluginLanguages.hpp:10
include
VoltMod
App
Internal
HostPlayerLanguages.hpp
Generated by
1.15.0