mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
refactor: replace references to Events with Input
This commit is contained in:
parent
4c48afbb90
commit
b202d1455b
15 changed files with 160 additions and 116 deletions
|
|
@ -5,12 +5,12 @@
|
|||
#include "content/ContentBuilder.hpp"
|
||||
#include "io/io.hpp"
|
||||
#include "io/engine_paths.hpp"
|
||||
#include "window/Events.hpp"
|
||||
#include "window/input.hpp"
|
||||
#include "voxels/Block.hpp"
|
||||
#include "coders/toml.hpp"
|
||||
|
||||
// All in-game definitions (blocks, items, etc..)
|
||||
void corecontent::setup(ContentBuilder& builder) {
|
||||
void corecontent::setup(Input& input, ContentBuilder& builder) {
|
||||
{
|
||||
Block& block = builder.blocks.create(CORE_AIR);
|
||||
block.replaceable = true;
|
||||
|
|
@ -29,8 +29,8 @@ void corecontent::setup(ContentBuilder& builder) {
|
|||
|
||||
auto bindsFile = "res:bindings.toml";
|
||||
if (io::is_regular_file(bindsFile)) {
|
||||
Events::loadBindings(
|
||||
bindsFile, io::read_string(bindsFile), BindType::BIND
|
||||
input.getBindings().read(
|
||||
toml::parse(bindsFile, io::read_string(bindsFile)), BindType::BIND
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue