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 / textbox function doesnt work?

Author
Message
Mugen Wizardry
User Banned
Posted: 1st Aug 2010 22:24
how do i put this on a sprite instead of calling text 50 million times now?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 1st Aug 2010 22:28
why the hell are you spamming this?

Mugen Wizardry
User Banned
Posted: 1st Aug 2010 23:08
I'm not spamming. I'm giving him updates for my code, and asking him if he needs any more info if you must know.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 2nd Aug 2010 00:10 Edited at: 2nd Aug 2010 00:10
added screen fps.



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 2nd Aug 2010 14:13
still cant figure out what is lagging it.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 2nd Aug 2010 19:16
you've made 9 posts with no reply except me, you're spamming it. just edit your post if you wanna update?

RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 2nd Aug 2010 20:40
Yeah you should just keep one post and edit it until someone else answered. And i don't have any lag with that code. what is the problem you're having?

And I won't be at home for the next 3 weeks, so either someone else helps you with your code, or you have to do it yourself... good luck Mugen Wizardry
Mugen Wizardry
User Banned
Posted: 2nd Aug 2010 20:42
it's lagging when it types. the more letters it types, the slower it goes.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 2nd Aug 2010 20:49 Edited at: 2nd Aug 2010 20:52
That's caused by the really slow and inefficient DBPro text commands. To solve this, switch to Cloggy's D3D_Func text commands.

Oh, I wrote (from Scratch!) a teletyping function which supports multiple lines of text and different colors within lines, including a press space to continue bit. (Requires IanM's matrix util plugin thing for my use of the split string function.)

To use, simply change the Text$ in TTSetText( Text$ ) to be your proposed textbox using the following switches...

| = new line
\w = White text
\r = Red text
\g = Green text
\b = (you guessed it) blue text.

(Using these switches, it should be easy to add more in, providing that they are SINGLE characters. \r2 would not work for example.)

Enjoy.



And no, I couldn't be bothered to comment it as I'm at work right now.

[Yet another edit] Yes I know it pauses slight;y when changing colours. This is because it reads the switch and resets the timeout. I could fix this, but after 20 minutes of trying, I havent managed it quite yet.)

My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 2nd Aug 2010 20:52
could not understand command at line 45.

Split String TT.T$, "|" : Text$ = Get Split Word$( TT.Lne )

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 2nd Aug 2010 20:53
Quote: "Requires IanM's matrix util plugin thing for my use of the split string function.)"

D'Oh!

My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 2nd Aug 2010 20:54
i DO have it..

it turns blue.

but doesnt understand it

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 2nd Aug 2010 20:56
It might turn blue, but do you have the plugin installed as well as the keywords? It might be worth double checking it. It works for me which make me think the issues on your end.

I'm about to go home from work now so If I don't reply tonight, I'll do so tomorrow.

My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 2nd Aug 2010 21:08
well the thing is. i need to be able to select a special color for a special word that is chosen in the text. so technically it needs to work like this.

dim mytext$(maxmsgs)

mytext$(0)="my \c1st paragraph."
mytext$(1)="\cmy 2nd paragraph."

and it will color ONLY the word after \c with the special color. but all other text will have normal color.

same thing for \b and \i except it bolds the selected word or italicizes it.

i need to be able to have it automatically read each and every paragraph, and be able to tell whether or not its done typing..

i think it would be easier just to help fix my code. cuz it does all the stuff i need. it just lags

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 2nd Aug 2010 21:50
Although mine doesn't color only one word, it does color words, and is easy to add bold or italics to it.

Perhaps you should work on it yourself instead of getting other people to do ALL the work for you.

My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 2nd Aug 2010 21:53
well i've been trying. i just need to stop the lag. that's all. nothing more, nothing less.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 2nd Aug 2010 21:56
And like I said...

Quote: "That's caused by the really slow and inefficient DBPro text commands. To solve this, switch to Cloggy's D3D_Func text commands."


My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 2nd Aug 2010 21:57
i WOULD but when i tried to convert it, the text AND the box were both white...

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 2nd Aug 2010 22:01
Did you remember to encase the text with the d3d_start and d3d_end and have NO image/sprite commands between them, or after them?

My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 2nd Aug 2010 22:23
still not working..



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 2nd Aug 2010 23:03
ok i ALMOST got it to work.

But the text is acting weird.

THIS problem I can't figure out..



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 3rd Aug 2010 12:40
is it the font?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 3rd Aug 2010 14:11 Edited at: 3rd Aug 2010 14:12
First problem:

The 4th argument is the alignment, and you tell it to center(1) the text. Use 0 (left align) instead.

And for me d3d_gettextwidth(1," ") returns 0, so use d3d_gettextwidth(1,"_") instead.

Both lines are in display_teletype, somewhere around line 445.

Oh and:
Quote: "[...] you should just keep one post and edit it until someone else answered. [...]"

Thanks
Mugen Wizardry
User Banned
Posted: 3rd Aug 2010 14:20
ok it works.

but its still lagging..



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/

Login to post a reply

Server time is: 2026-07-25 10:03:14
Your offset time is: 2026-07-25 10:03:14