Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / How does one keep text on the screen?

Author
Message
hatothedee
12
Years of Service
User Offline
Joined: 3rd Oct 2013
Location:
Posted: 8th Oct 2013 05:07
The title makes me sound stupid, but I was wonder how to keep text on the screen when I print. This resembles my code:


By the way, the first if/then works. The second one works too, but it also shows the "blaarghhhhhhhhhhhhhhhh" portion. Much appreciated!
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 8th Oct 2013 06:52
I may be misunderstanding the problem, but I assume you want to use the text command, so you can place your Shakespearean words where you want to without having them bump the screen up.

http://mattsmith.carbonmade.com/
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Oct 2013 08:15
Are you using a loop? If not, the only way to keep text on screen would be to use wait key to keep the program from ending.

Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 8th Oct 2013 14:55 Edited at: 8th Oct 2013 14:57
This is the loop Phaelax is talking about.


Regards Sph!nx
www.mental-image.net
Ortu
DBPro Master
18
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 8th Oct 2013 16:52
Quote: "he second one works too, but it also shows the "blaarghhhhhhhhhhhhhhhh" "




hatothedee
12
Years of Service
User Offline
Joined: 3rd Oct 2013
Location:
Posted: 8th Oct 2013 17:25
My apologies, when I meant that I wanted to "keep text on the screen", I actually meant how I can keep it within the borders.(sorry about that wattywatts, Phaelax, and Sphinx) By the way, Ortu, I'll try this out. I'll be back with details.
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 8th Oct 2013 17:25 Edited at: 8th Oct 2013 17:38
Yep.. gotta position with SET CURSOR and repeat the print inside your loop:



Alternatively, the TEXT command offers positioning without using SET CURSOR

D.D.
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 8th Oct 2013 17:39 Edited at: 8th Oct 2013 17:54
[double post]

D.D.
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 9th Oct 2013 02:51
Do you want to wrap text?



Formerly OBese87.
Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 9th Oct 2013 03:10
My two cents;



Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 9th Oct 2013 05:00
Seems like every time somebody asks a question around here we have a little competition going on in the replies.

http://mattsmith.carbonmade.com/
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 9th Oct 2013 14:49
There should be more competitions

Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 10th Oct 2013 00:05 Edited at: 10th Oct 2013 00:08
Quote: "My apologies, when I meant that I wanted to "keep text on the screen", I actually meant how I can keep it within the borders."


A cheap method (my specialty) could be to simply store each line as a separate string.

Libervurto's got the professional answer though.

D.D.
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 10th Oct 2013 08:54
Quote: "Seems like every time somebody asks a question around here we have a little competition going on in the replies."

I think that's because we have a lot of fairly experienced coders on here that don't know what to do with themselves. They have mastered the fundamentals of the language but are now intimidated by the idea of starting a major project. They feel like they are wasting their abilities, so when someone posts a problem they are comfortable with they throw themselves into it. Whenever you see a really long helpful post it's from someone who could be making something great but is scared and doesn't know where to start.

I think that's one of the main reasons people write tutorials. Of course we all want to give back to the community, but also there's a sense that you are squandering everything you've learned if you don't do something with it. The most risk-free way of applying your knowledge is to write a tutorial.


Formerly OBese87.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 11th Oct 2013 12:21 Edited at: 11th Oct 2013 12:32
I agree. I also think you tend to feel a little sorry for the helpless; so giving your little two pence or pound; cents or dollar worth of time and experience can help along way.

My belief is running one or two major projects; avoiding working on 9 or 10 little ones; which tend to remain unfinished. I would love to make some platform games, video tutorials, a cartoon, a comedy game and a DBP wiki but I stop myself from working on more than two projects.

It would also be brilliant if we could all work on an open source project of some-kind, but sadly personalities and principles clash; and it is hard on the one or two people who put 90% of the effort in while 20 to 30 people put in 10% as I have seen in the past with the DB Showcase; just because of not getting their own way, many people lose interest, being skilled doesn't always mean being a good sport or sometimes it does not mean being professional.

I quite like Phaelex's tutorials and his code corner. You have some gems as well Libervurto. I did some memblock tutorials and core tutorials in the past; but I am concentrating 100% now on SF and my editor XProducer (aka Dark Shader 2 ala Integrated World Editor) for my building my game and for others to use to build theirs. (Although I've broken my rule a bit by doing a bit of code for FPSCR)

Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 17th Oct 2013 11:19
Quote: " Whenever you see a really long helpful post it's from someone who could be making something great but is scared and doesn't know where to start."


Or it's someone that just wants to help and share their knowledge :/

Login to post a reply

Server time is: 2026-07-06 10:36:12
Your offset time is: 2026-07-06 10:36:12