MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / Window

Method Window

src/Interface/Window.cpp:42–62  ·  view source on GitHub ↗

* Sets up a blank window with the specified size and position. * @param state Pointer to state the window belongs to. * @param width Width in pixels. * @param height Height in pixels. * @param x X position in pixels. * @param y Y position in pixels. * @param popup Popup animation. */

Source from the content-addressed store, hash-verified

40 * @param popup Popup animation.
41 */
42Window::Window(State *state, int width, int height, int x, int y, WindowPopup popup) : Surface(width, height, x, y), _dx(-x), _dy(-y), _bg(0), _color(0), _popup(popup), _popupStep(0.0), _state(state), _contrast(false), _screen(false), _thinBorder(false)
43{
44 _timer = new Timer(10);
45 _timer->onTimer((SurfaceHandler)&Window::popup);
46
47 if (_popup == POPUP_NONE)
48 {
49 _popupStep = 1.0;
50 }
51 else
52 {
53 setHidden(true);
54 _timer->start();
55 if (_state != 0)
56 {
57 _screen = state->isScreen();
58 if (_screen)
59 _state->toggleScreen();
60 }
61 }
62}
63
64/**
65 * Deletes timers.

Callers

nothing calls this directly

Calls 4

onTimerMethod · 0.80
isScreenMethod · 0.80
toggleScreenMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected