コード例 #1
0
/** Draws the boundaries of the current scene so collisions against the boundaries can be detected.
 */
void Level_1::set_boundaries()
{
    //Create pens to designate "type" of boundary
    QPen losing_boundary_pen = QPen(Qt::red);
    QPen side_boundary_pen = QPen(Qt::blue);

    //Draw top and bottom boundaries of scene
    QLineF top_line(scene->sceneRect().topLeft(), scene->sceneRect().topRight());
    QLineF bottom_line(scene->sceneRect().bottomLeft(), scene->sceneRect().bottomRight());

    scene->addLine(top_line, losing_boundary_pen);
    scene->addLine(bottom_line, losing_boundary_pen);

    //Draw left and right sides of scene
    QLineF left_line(scene->sceneRect().topLeft(), scene->sceneRect().bottomLeft());
    QLineF right_line(scene->sceneRect().topRight(), scene->sceneRect().bottomRight());

    scene->addLine(left_line, side_boundary_pen);
    scene->addLine(right_line, side_boundary_pen);

}
コード例 #2
0
ファイル: FRAMES.C プロジェクト: daemqn/Atari_ST_Sources
outta_memory()
{
top_line("Out of Memory");
}
コード例 #3
0
ファイル: FRAMES.C プロジェクト: daemqn/Atari_ST_Sources
too_many_frames()
{
top_line("Too Many Frames");
}