-
-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor comment #3181
base: master
Are you sure you want to change the base?
Editor comment #3181
Conversation
fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test it tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing copyright header.
for (auto& line : m_lines) | ||
line.reset(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to do this.
reader.get("x", m_col.m_bbox.get_left(), 0.f); | ||
reader.get("y", m_col.m_bbox.get_top(), 0.f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already done by MovingObject
constructor.
#ifndef EDITOR_COMMENT_HPP | ||
#define EDITOR_COMMENT_HPP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing copyright header, and also, follow the include guard convention used throughout the source.
explicit EditorComment(const ReaderMapping& reader); | ||
|
||
virtual void draw(DrawingContext& context) override; | ||
virtual void update(float dt_sec) override { MovingObject::update(dt_sec); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary
|
||
private: | ||
void refresh_comment(); | ||
Color get_color(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
(CV) qualifier can be added.
private: | ||
std::string m_comment; | ||
std::vector<std::unique_ptr<InfoBoxLine>> m_lines; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a non-copyable footer to this class.
The editor comment allows level designers to leave a note for themselves or other level designers collaborating on the same level. Similar to a code comment, it can be used to write to-do lists, fixmes, or notes.
This feature supports info box formatting, like what you'd see in the info block or the text scroller.
Testers: Please test all formatting features in the editor comment (of course), the info block, and the text scroller (via credits, I guess).
Use this as a reference for all formatting features:
supertux/src/supertux/info_box_line.cpp
Lines 67 to 87 in 79c6ee8