mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-25 08:41:01 +01:00
[escher] Modify header view controller to handle the logic without data
Change-Id: I87b544e39f24961683085af3f6060be357ee4f24
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
#include <escher/button.h>
|
||||
#include <assert.h>
|
||||
|
||||
Button::Button(Responder * parentResponder) :
|
||||
Button::Button(Responder * parentResponder, const char * textBody, Invocation invocation) :
|
||||
Responder(parentResponder),
|
||||
m_textView(),
|
||||
m_invocation(Invocation(nullptr, nullptr)),
|
||||
m_textView(TextView(textBody, 0.5f, 0.5f)),
|
||||
m_invocation(invocation),
|
||||
m_backgroundColor(KDColorWhite)
|
||||
{
|
||||
m_textView.setBackgroundColor(KDColorWhite);
|
||||
m_textView.setTextColor(KDColorBlack);
|
||||
m_textView.setAlignment(0.5f, 0.5f);
|
||||
}
|
||||
|
||||
void Button::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
@@ -39,14 +36,6 @@ bool Button::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
}
|
||||
|
||||
void Button::setText(const char * textBody) {
|
||||
m_textView.setText(textBody);
|
||||
}
|
||||
|
||||
void Button::setInvocation(Invocation invocation) {
|
||||
m_invocation = invocation;
|
||||
}
|
||||
|
||||
void Button::setBackgroundColor(KDColor backgroundColor) {
|
||||
m_backgroundColor = backgroundColor;
|
||||
m_textView.setBackgroundColor(backgroundColor);
|
||||
|
||||
Reference in New Issue
Block a user