MCPcopy Create free account
hub / github.com/RevoSucks/BM64Recomp / init_styling

Method init_styling

src/ui/core/ui_context.cpp:192–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void recompui::init_styling(const std::filesystem::path& rcss_file) {
193 std::string style{};
194 {
195 std::ifstream style_stream{rcss_file};
196 style_stream.seekg(0, std::ios::end);
197 style.resize(style_stream.tellg());
198 style_stream.seekg(0, std::ios::beg);
199
200 style_stream.read(style.data(), style.size());
201 }
202 std::unique_ptr<Rml::StreamMemory> rml_stream = std::make_unique<Rml::StreamMemory>(reinterpret_cast<Rml::byte*>(style.data()), style.size());
203 rml_stream->SetSourceURL(rcss_file.filename().string());
204 context_state.style_sheet = Rml::Factory::InstanceStyleSheetStream(rml_stream.get());
205}
206
207recompui::ContextId recompui::create_context(const std::filesystem::path& path) {
208 ContextId new_context = create_context_impl(nullptr);

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected