aboutsummaryrefslogtreecommitdiff
path: root/ag_render.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-08-08 09:18:45 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2020-08-08 09:18:45 -0400
commitf6a2bd488ca74881855f74f5302078526cfbd81c (patch)
tree1700d127a03dff08685660a4238cf9c8881164f4 /ag_render.f90
parenta6f3add98f1c02eeee9c3c4f9bda9ef6415586f9 (diff)
downloadLR-87-f6a2bd488ca74881855f74f5302078526cfbd81c.tar.gz
LR-87-f6a2bd488ca74881855f74f5302078526cfbd81c.zip
Initial work on favorites added. Probably flat-out wrong...
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