MCPcopy Create free account
hub / github.com/Cpasjuste/pplay / Player

Method Player

src/player/player.cpp:14–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12using namespace c2d;
13
14Player::Player(Main *_main) : Rectangle(_main->getSize()) {
15
16 main = _main;
17
18 Vector2f pos = main->getSize();
19 Player::setPosition(pos);
20 Player::setOrigin(Origin::BottomRight);
21
22 tweenScale = new TweenScale({0.25f, 0.25f}, {1.0f, 1.0f}, 0.5f);
23 Player::add(tweenScale);
24 tweenPosition = new TweenPosition({pos.x - 16, pos.y - 16}, {pos}, 0.5f);
25 Player::add(tweenPosition);
26
27 Player::setVisibility(Visibility::Hidden);
28
29 mpv = new Mpv(main->getIo()->getDataPath() + "mpv", true);
30
31#ifndef FULL_TEXTURE_TEST
32 texture = new VideoTexture(main, pos);
33 texture->setOutlineColor(Color::Red);
34 texture->setOutlineThickness(4);
35#else
36 texture = new VideoTexture(main, {64, 64});
37 texture->setOrigin(Origin::Center);
38 texture->setPosition(Vector2f(Player::getSize().x / 2, Player::getSize().y / 2));
39#endif
40 Player::add(texture);
41
42 osd = new PlayerOSD(main);
43 Player::add(osd);
44}
45
46Player::~Player() {
47 delete (mpv);

Callers

nothing calls this directly

Calls 1

getDataPathMethod · 0.80

Tested by

no test coverage detected