aboutsummaryrefslogtreecommitdiff
path: root/ag_render.f90
diff options
context:
space:
mode:
Diffstat (limited to 'ag_render.f90')
-rw-r--r--ag_render.f9021
1 files changed, 21 insertions, 0 deletions
diff --git a/ag_render.f90 b/ag_render.f90
index fc80295..383be04 100644
--- a/ag_render.f90
+++ b/ag_render.f90
@@ -43,6 +43,7 @@ implicit none
integer, parameter::ag_render_event_scroll = 5
integer, parameter::ag_render_event_resize = 6
integer, parameter::ag_render_event_mousemove = 7
+ integer, parameter::ag_render_event_favorite = 8
type :: link
integer, dimension(4)::location
@@ -55,6 +56,7 @@ implicit none
integer::address_id
integer::go_button_id
integer::back_button_id
+ integer::fave_button_id
integer::scroll_id
integer::font_size
@@ -153,6 +155,15 @@ contains
end subroutine go_button_callback
+ subroutine fave_button_callback()
+ use appgraphics, only: stopidle
+ implicit none
+
+ ag_render_event = ag_render_event_favorite
+ call stopidle()
+
+ end subroutine fave_button_callback
+
subroutine mouse_button_callback(x, y)
use appgraphics, only: stopidle
implicit none
@@ -264,6 +275,13 @@ contains
call setbuttonposition(self%go_button_id, x, 2, 40, 20)
end if
+ x = x + 50
+ if(self%fave_button_id < 0) then
+ self%fave_button_id = createbutton(x, 2, 40, 20, "Wow!", fave_button_callback)
+ else
+ call setbuttonposition(self%fave_button_id, x, 2, 40, 20)
+ end if
+
! Clears any drawing operations for controls quickly
ignored = switch_to_thread()
@@ -805,6 +823,9 @@ contains
self%y = 0
ag_action = render_action_rewrap
+
+ case(ag_render_event_favorite)
+ ag_action = render_action_favorite
end select