MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / windowChanged

Method windowChanged

source/client/StarClientApplication.cpp:276–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276void ClientApplication::windowChanged(WindowMode windowMode, Vec2U screenSize) {
277 auto config = m_root->configuration();
278 if (windowMode == WindowMode::Fullscreen) {
279 config->set("fullscreenResolution", jsonFromVec2U(screenSize));
280 config->set("fullscreen", true);
281 config->set("borderless", false);
282 } else if (windowMode == WindowMode::Borderless) {
283 config->set("borderless", true);
284 config->set("fullscreen", false);
285 } else if (windowMode == WindowMode::Maximized) {
286 config->set("maximized", true);
287 config->set("fullscreen", false);
288 config->set("borderless", false);
289 } else {
290 config->set("maximized", false);
291 config->set("fullscreen", false);
292 config->set("borderless", false);
293 config->set("windowedResolution", jsonFromVec2U(screenSize));
294 }
295}
296
297void ClientApplication::processInput(InputEvent const& event) {
298 if (auto keyDown = event.ptr<KeyDownEvent>()) {

Callers

nothing calls this directly

Calls 3

jsonFromVec2UFunction · 0.85
configurationMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected