Browse Source

Added block quotes element

pull/1/head
gyroninja 5 years ago
parent
commit
c9ab5fff09
  1. 6
      src/html/elements/BLOCKQUOTEElement.cpp
  2. 13
      src/html/elements/BLOCKQUOTEElement.h

6
src/html/elements/BLOCKQUOTEElement.cpp

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
#include "BLOCKQUOTEElement.h"
#include "../TextNode.h"
std::unique_ptr<Component> BLOCKQUOTEElement::render(const Node &node, int y, int windowWidth, int windowHeight) {
return std::make_unique<TextComponent>(static_cast<const TextNode&>(node).text, 0, y, 12, false, windowWidth, windowHeight);
}

13
src/html/elements/BLOCKQUOTEElement.h

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
#ifndef BLOCKQUOTEELEMENT_H
#define BLOCKQUOTEELEMENT_H
#include "../../graphics/opengl/components/Component.h"
#include "../../graphics/opengl/components/TextComponent.h"
#include "../TextNode.h"
class BLOCKQUOTEElement {
public:
static std::unique_ptr<Component> render(const Node &node, int y, int windowWidth, int windowHeight);
};
#endif
Loading…
Cancel
Save