aboutsummaryrefslogtreecommitdiff
path: root/dumb_render.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-05-01 16:49:35 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2020-05-01 16:49:35 -0400
commit873ffd8201fd520122d8ec94bdd4230d79d0331c (patch)
tree77aa57644e471db464db45f2784af57ec870af54 /dumb_render.f90
parentc7a908cc5adede6ca34519059f2e324dc6737ff6 (diff)
downloadLR-87-873ffd8201fd520122d8ec94bdd4230d79d0331c.zip
LR-87-873ffd8201fd520122d8ec94bdd4230d79d0331c.tar.gz
Added input and error display members to the renderer.
Diffstat (limited to 'dumb_render.f90')
-rw-r--r--dumb_render.f9043
1 files changed, 43 insertions, 0 deletions
diff --git a/dumb_render.f90 b/dumb_render.f90
index 7832891..21d6c34 100644
--- a/dumb_render.f90
+++ b/dumb_render.f90
@@ -32,6 +32,10 @@ implicit none
procedure :: is_link_visible => dumb_text_visible
procedure :: draw_link => dumb_link_draw
+
+ procedure :: request_input => dumb_request_input
+
+ procedure :: draw_error => dumb_draw_error
end type dumb_renderer
@@ -181,4 +185,43 @@ contains
end subroutine dumb_link_draw
+ function dumb_request_input(self, question, answer)
+ implicit none
+
+ class(dumb_renderer)::self
+ character(*), intent(in)::question
+ character(*), intent(out)::answer
+ logical::dumb_request_input
+
+ ! Line Feed
+ Print *, " "
+
+ answer = " "
+
+ Print *, question
+ Read *, answer
+
+ ! Line Feed
+ Print *, " "
+
+ dumb_request_input = (len_trim(answer) > 0)
+
+ end function dumb_request_input
+
+ subroutine dumb_draw_error(self, text)
+ implicit none
+
+ class(dumb_renderer)::self
+ character(*), intent(in)::text
+
+ ! Line Feed
+ Print *, " "
+
+ Print *, "ERROR: "//trim(text)
+
+ ! Line Feed
+ Print *, " "
+
+ end subroutine dumb_draw_error
+
end module dumb_render \ No newline at end of file