Fix printerdemo C++ build after API changes

This commit is contained in:
Simon Hausmann 2020-09-08 22:34:22 +02:00
parent 52b19606d1
commit 246a7142ec

View file

@ -12,15 +12,15 @@ LICENSE END */
// FIXME: Ideally it should be a better type in the generated code
using InkData = std::tuple<sixtyfps::Color, float>;
struct InkLevelModel : sixtyfps::Model<InkData> {
struct InkLevelModel : sixtyfps::Model<InkData>
{
int count() const override { return m_data.size(); }
InkData get(int i) const override { return m_data[i]; }
std::vector<InkData> m_data = {
{ sixtyfps::Color(0xffffff00), 0.9 },
{ sixtyfps::Color(0xff00ffff), 0.5 },
{ sixtyfps::Color(0xffff00ff), 0.8 },
{ sixtyfps::Color(0xff000000), 0.1 }};
std::vector<InkData> m_data = { { sixtyfps::Color::from_argb_encoded(0xffffff00), 0.9 },
{ sixtyfps::Color::from_argb_encoded(0xff00ffff), 0.5 },
{ sixtyfps::Color::from_argb_encoded(0xffff00ff), 0.8 },
{ sixtyfps::Color::from_argb_encoded(0xff000000), 0.1 } };
};
int main()