MCPcopy Create free account
hub / github.com/davemoore22/sorcery / Input

Method Input

src/gui/input.cpp:36–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34#include "resources/stringstore.hpp"
35#include "types/component.hpp"
36#include "types/game.hpp"
37
38Sorcery::Input::Input(Context &ctx, Component &component)
39 : _ctx{ctx},
40 _component{component} {
41
42 show = false;
43
44 _width = _component.w;
45 _height = _component.h;
46 _colour = _component.colour;
47 _bg_colour = _component.background;
48 _hi_colour = _component.get_float("highlight");
49 _font = _component.font;
50 _title = _ctx.get_string(_component.string_key);
51 _input = "";
52 _input_width = std::stoi(_component.get("input_width").value());
53 _game = nullptr;
54 _name = _component.name;
55}
56

Callers

nothing calls this directly

Calls 3

get_floatMethod · 0.80
get_stringMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected