Update ScreenRecoveryUI::Draw* function signatures.
Move away from taking int* for the Y-offset. Change it to int and return
the offset instead.
Test: Check the recovery menu and 'Wipe data' menu.
Change-Id: Ib15e070a0d576a0f8f66f35605cb8479e7071f26
diff --git a/screen_ui.h b/screen_ui.h
index e8d3c32..8402fac 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -179,10 +179,14 @@
virtual int GetProgressBaseline() const;
virtual int GetTextBaseline() const;
- virtual void DrawHorizontalRule(int* y) const;
+ // Draws a highlight bar at (x, y) - (x + width, y + height).
virtual void DrawHighlightBar(int x, int y, int width, int height) const;
- virtual void DrawTextLine(int x, int* y, const char* line, bool bold) const;
- void DrawTextLines(int x, int* y, const char* const* lines) const;
+ // Draws a horizontal rule at Y. Returns the offset it should be moving along Y-axis.
+ virtual int DrawHorizontalRule(int y) const;
+ // Draws a line of text. Returns the offset it should be moving along Y-axis.
+ virtual int DrawTextLine(int x, int y, const char* line, bool bold) const;
+ // Draws multiple text lines. Returns the offset it should be moving along Y-axis.
+ int DrawTextLines(int x, int y, const char* const* lines) const;
};
#endif // RECOVERY_UI_H