aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2020-12-02 20:15:03 -0500
committerJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2020-12-02 20:15:03 -0500
commit9bf49b7acbe1654744399a73de363f84d50f1574 (patch)
tree8580ae60db7c4e5e785a36bdc01382ffe6ab055e
parent36bf9cd9fdfc06e12d88fdc647cc932d4a1c6452 (diff)
downloadLR-87-9bf49b7acbe1654744399a73de363f84d50f1574.tar.gz
LR-87-9bf49b7acbe1654744399a73de363f84d50f1574.zip
Fixed status bar rendering issues in AppGraphics due to double-buffering.
-rw-r--r--ag_render.f9043
-rw-r--r--gemini-windows.prj22
2 files changed, 44 insertions, 21 deletions
diff --git a/ag_render.f90 b/ag_render.f90
index b3b76b1..bddec84 100644
--- a/ag_render.f90
+++ b/ag_render.f90
@@ -387,18 +387,30 @@ contains
type(appgraphics_renderer)::self
character(*), intent(in)::text
-
+
+ ! Double-buffer
+ integer::i, active_page
+
+ call resetviewport()
+ call setviewport(0, getmaxy()-self%status_bar_height, getmaxx()+1, getmaxy()+1, .true.)
+ active_page = getactivepage()
self%status_bar_height = 16
-
+
+ do i = 0, 1
+ call setactivepage(i)
+
+ call setbkcolor(LIGHTGRAY)
+ call setcolor(BLACK)
+ call settextstyle(WINDOWS_FONT, HORIZ_DIR, 12)
+
+
+ call clearviewport()
+ call outtextxy(5, 2, trim(text))
+
+ end do
+ call setactivepage(active_page)
call resetviewport()
- call setbkcolor(LIGHTGRAY)
- call setcolor(BLACK)
- call settextstyle(WINDOWS_FONT, HORIZ_DIR, 12)
-
- call bar(0, getmaxy()-self%status_bar_height, getmaxx()+1, getmaxy()+1)
- call outtextxy(5, getmaxy()-self%status_bar_height+2, trim(text))
-
end subroutine draw_status_bar
subroutine draw_scroll_bar(self)
@@ -472,7 +484,8 @@ contains
self%scroll_id = -1
call draw_address_bar(self)
- call draw_status_bar(self, "Welcome to the LR-87 Gemini Client")
+ !call draw_status_bar(self, "Welcome to the LR-87 Gemini Client")
+ call self%report_status("Welcome to the LR-87 Gemini Client")
call draw_scroll_bar(self)
self%background_color = WHITE
@@ -859,19 +872,11 @@ contains
class(appgraphics_renderer)::self
character(*), intent(in)::text
character(64), save::last_text
- integer::vp, ap
if(trim(last_text) == trim(text)) then
return
end if
- vp = getvisualpage()
- ap = getactivepage()
-
- call setactivepage(vp)
- call draw_status_bar(self, text)
-
- call setactivepage(ap)
call draw_status_bar(self, text)
last_text = text
@@ -955,7 +960,7 @@ contains
! Effectively have to redraw everything
call draw_address_bar(self, expanding=expanding_horizontally)
- call draw_status_bar(self, idle_status)
+ call self%report_status(idle_status)
call draw_scroll_bar(self)
call setscrollposition(self%scroll_id, 0)
diff --git a/gemini-windows.prj b/gemini-windows.prj
index eb26b44..f84b768 100644
--- a/gemini-windows.prj
+++ b/gemini-windows.prj
@@ -2,6 +2,13 @@
"Root":{
"Folders":[{
"Folders":[],
+ "Name":"+packaging",
+ "Files":[{
+ "filename":".\\packaging\\appxmanifest.xml",
+ "enabled":"1"
+ }]
+ },{
+ "Folders":[],
"Name":"+samples",
"Files":[{
"filename":".\\samples\\sample1.gmi",
@@ -26,6 +33,13 @@
"filename":".\\wsa.f90",
"enabled":"1"
}]
+ },{
+ "Folders":[],
+ "Name":"+winbuild",
+ "Files":[{
+ "filename":".\\build_appx.bat",
+ "enabled":"1"
+ }]
}],
"Name":"+gemini-windows (lr87.exe)",
"Files":[{
@@ -74,6 +88,9 @@
"filename":".\\platform.F90",
"enabled":"1"
},{
+ "filename":".\\PRIVACY.md",
+ "enabled":"1"
+ },{
"filename":".\\protocol.f90",
"enabled":"1"
},{
@@ -125,12 +142,13 @@
},
"Build Dependencies":1,
"Launch Options":{
+ "Build Before Launch":"true",
"Working Directory":"",
"Launch Using MPI":"false",
"Keep Console":"true",
- "External Console":"false",
+ "Executable":"",
"Command Line Arguments":"",
- "Build Before Launch":"true"
+ "External Console":"false"
},
"Build Options":{
"Makefile":"Makefile",