Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using the Screen function
#4
(04-05-2024, 11:13 AM)bplus Wrote: the only good reason to use screen 0 is for screen function Big Grin

Thanks bplus. Screen  0 works for this example. But I need text and graphics, and this mode doesn't provide the features I need.
I want to use thiis font, and this screen size, and a set number of chars per line.. Then I need to look at a screen row and see 
what character is at position P of that row.

I think maybe the simplest way is to map the row, call it RefRow$(), then when chars are printed on it, place the char in this array.

Code: (Select All)
WWidth = 1120: WHeight = 820: Mode = 32: Size = 24
Screen _NewImage(WWidth, WHeight, Mode)
SetFont: f& = _LoadFont("C:\WINDOWS\fonts\courbd.ttf", Size, "monospace"): _Font f&
lhs = (_DesktopWidth - WWidth) / 2
_ScreenMove lhs, 86 ' centre display on screen
CPL = WWidth / _PrintWidth("X")
Print "cpl is"; CPL

Ref = 15: p = 40
Dim RefRow$(80): Locate Ref, p: Print "X": RefRow$(p) = "X"

Print RefRow$(40)

A bit simplistic, but it works ok. What do you think?
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply


Messages In This Thread
Using the Screen function - by PhilOfPerth - 04-05-2024, 11:04 AM
RE: Using the Screen function - by bplus - 04-05-2024, 11:08 AM
RE: Using the Screen function - by bplus - 04-05-2024, 11:13 AM
RE: Using the Screen function - by PhilOfPerth - 04-05-2024, 11:36 PM
RE: Using the Screen function - by bplus - 04-06-2024, 12:25 AM
RE: Using the Screen function - by SMcNeill - 04-06-2024, 12:50 AM
RE: Using the Screen function - by bplus - 04-06-2024, 01:17 AM
RE: Using the Screen function - by Pete - 04-06-2024, 01:19 AM
RE: Using the Screen function - by bplus - 04-06-2024, 01:20 AM
RE: Using the Screen function - by Pete - 04-06-2024, 01:25 AM
RE: Using the Screen function - by SMcNeill - 04-06-2024, 01:34 AM
RE: Using the Screen function - by Pete - 04-06-2024, 01:50 AM
RE: Using the Screen function - by bplus - 04-06-2024, 11:24 AM
RE: Using the Screen function - by PhilOfPerth - 04-06-2024, 12:17 PM
RE: Using the Screen function - by bplus - 04-06-2024, 12:52 PM
RE: Using the Screen function - by PhilOfPerth - 04-07-2024, 01:51 AM
RE: Using the Screen function - by bplus - 04-07-2024, 02:51 PM
RE: Using the Screen function - by Pete - 04-07-2024, 05:15 PM
RE: Using the Screen function - by bobalooie - 04-16-2024, 05:23 PM
RE: Using the Screen function - by eoredson - 04-15-2024, 04:09 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Star Suggestion for new REPLACE$() function zaadstra 3 265 01-26-2026, 05:11 PM
Last Post: grymmjack
  Is there a menu function? Mad Axeman 17 1,129 12-17-2025, 04:43 AM
Last Post: SMcNeill
  error on function returning _mem Herve 5 698 07-05-2025, 08:06 PM
Last Post: hsiangch_ong
Question Can a function return a custom TYPE? 12centuries 3 1,336 06-13-2024, 09:19 PM
Last Post: 12centuries
  SUB & FUNCTION when declaring dynamic library TerryRitchie 9 1,800 06-11-2024, 11:28 AM
Last Post: SpriggsySpriggs

Forum Jump:


Users browsing this thread: 1 Guest(s)