summaryrefslogtreecommitdiff
path: root/code/fe310/eos/eve/screen/page.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-07-02 23:25:35 +0200
committerUros Majstorovic <majstor@majstor.org>2020-07-02 23:25:35 +0200
commitf550a31fda2cb7d76e917ab69d075daa1557bf99 (patch)
tree107b6e78f23ede2054dfcf879345480788a85f29 /code/fe310/eos/eve/screen/page.c
parentc25bf68c4702b20aea6ca99eb1edd5aca5f6d391 (diff)
string init/draw implemented; page to screen coordinates implemented
Diffstat (limited to 'code/fe310/eos/eve/screen/page.c')
-rw-r--r--code/fe310/eos/eve/screen/page.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/code/fe310/eos/eve/screen/page.c b/code/fe310/eos/eve/screen/page.c
index 25acc49..d96a2ba 100644
--- a/code/fe310/eos/eve/screen/page.c
+++ b/code/fe310/eos/eve/screen/page.c
@@ -25,11 +25,19 @@ void eve_page_init(EVEPage *page, eve_view_touch_t touch, eve_view_draw_t draw,
}
int16_t eve_page_x(EVEPage *page, int16_t x) {
- x + page->win_x - page->window->g.x;
+ return x + page->win_x - page->window->g.x;
}
int16_t eve_page_y(EVEPage *page, int16_t y) {
- y + page->win_y - page->window->g.y;
+ return y + page->win_y - page->window->g.y;
+}
+
+int16_t eve_page_scrx(EVEPage *page, int16_t x) {
+ return x - page->win_x + page->window->g.x;
+}
+
+int16_t eve_page_scry(EVEPage *page, int16_t y) {
+ return y - page->win_y + page->window->g.y;
}
void eve_page_set_focus(EVEPage *page, EVEWidget *widget, EVERect *f) {