-
Notifications
You must be signed in to change notification settings - Fork 4
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
Black buttons? #4
Comments
This, which I think is what you mean, which renders a default style button for me: #include <M5Core2.h>
#include <Core2ez.h>
ezWindow test(50, 50, 220, 80);
ezButton ok(110, 200, 100, 32, "OK");
String testString = "This is a really freaking long sentence that is not supposed to fit in the window so we can see it scrolls...";
void setup() {
ez.begin();
test.spriteBuffer();
ez.Screen.add(test);
ez.Screen.focus();
test.colors.outline = TFT_BLACK;
test.setTextDatum(TL_DATUM);
test.setTextPadding(0);
test.ezFont(FSSB18);
test.spriteBuffer(test.textWidth(testString), 80);
test.setTextColor(TFT_BLACK);
test.drawString(testString, 0 , 20);
test.push();
ok.colors.text = WHITE;
ok.push();
}
void loop() {
ez.update();
} (Note that buttons (and all widgets) add the default screen. if you do someOtherWindowOrAnyOtherWidget.add(widget) it will be taken from there and added to the new window/widget) Still need to change some examples to this: they explicitly add where that's not necessary anymore.) |
That renders no button at all for me. What does work is:
I don't understand when to push, and the required order of operation isn't clear. But I think all of that will go away with (excellent) docs. In leu of docs, one can see if the nomenclature is intuitive. Perhaps this is based on a framework I'm not familiar with; I'm having some difficulty. |
I can create, add and render ezLabels with no trouble, but not ezButtons:
(This is your scroll demo, with a button added)
The button renders solid black, until I touch it, then it renders OK in white.
If I omit
ok.colors.text = WHITE;
, it always remains black, even when touched.What am I leaving out? I expect the default behavior that renders something readable, as ezLabel does.
The code looks like the default should be black text on white background, with no change when pressed.
The text was updated successfully, but these errors were encountered: