ID:894612
 
var/const/coding="
"

mob/verb/coding_talk(msg as message)
usr << browse("[msg]", "window=coding")


I want to make it so that its possible to type in dm coding in a pop-up window to talk about code.
anyone?
I have no idea what you want. If you look in the resources there is a Syntax Highlighter.
I mean like a pop-up that when you type in coding in dm like "mob/verb/something()" it comes up indented like dm and with verb in blue.

In the pop-up, instead of it being like this:

mob/verb/something()

Its like this:

mob/verb/something()
In response to Albro1
Albro1 wrote:
I have no idea what you want. If you look in the resources there is a Syntax Highlighter.

i think hes trying to see if he can make a pop-up window that can be used to show code with the <'dm> </'dm> tags
There exist 2 libraries I know of that do what you ask.

There is Syntax Highlighter by Lummox JR (which I think is better), and DM Syntax Highlighter by Wizkidd0123.

These should give you a way to output highlighted code to a "popup window", but you will probably have to play around with the interface. These will not however highlight the code as you are typing it, like in Dream Maker. I do think it might be possible to achieve that though if you combined macros with the new Maptext, but I wouldn't know how to go about it.
In response to Multiverse7
Multiverse7 wrote:
There exist 2 libraries I know of that do what you ask.

There is Syntax Highlighter by Lummox JR (which I think is better), and DM Syntax Highlighter by Wizkidd0123.

These should give you a way to output highlighted code to a "popup window", but you will probably have to play around with the interface. These will not however highlight the code as you are typing it, like in Dream Maker. I do think it might be possible to achieve that though if you combined macros with the new Maptext, but I wouldn't know how to go about it.

Yeah I just checked out those libraries. They are too advanced for me right now. Guess I won't be able to do this.
Yeah, I don't really know how Lummox's actually works. It has ascii in it lol. You should be able to figure it out using the demo though. Make changes to the demo and see if you can reverse engineer it. A lot of programmers use libraries (even in many languages) without entirely knowing how they work at all.
Looks like all you need to do for Wizkidd's implementation is this:
src << browse(syntax_highlight(code, 1))

Makes it pretty simple compared to Lummox's, where the header stuff isn't returned by the one proc.

Libraries may look complicated on the inside, but all you need to worry about is the set of variables/procs it tells you to use. If all you need to do is push a button to get a sandwich, don't worry about what's behind the curtain. (and don't push the red button)
In response to Kaiochao
Kaiochao wrote:
If all you need to do is push a button to get a sandwich, don't worry about what's behind the curtain.

Can you code that for me? I need dat.
In response to Kaiochao
Kaiochao wrote:
Looks like all you need to do for Wizkidd's implementation is this:
> src << browse(syntax_highlight(code, 1))
>

Makes it pretty simple compared to Lummox's, where the header stuff isn't returned by the one proc.

Libraries may look complicated on the inside, but all you need to worry about is the set of variables/procs it tells you to use. If all you need to do is push a button to get a sandwich, don't worry about what's behind the curtain. (and don't push the red button)

Can you please write the full coding for that? I want to be able to world say in a pop-up coding.

It gives me errors:

icon library.dm:57:error: code: undefined var
icon library.dm:57:error: syntax_highlight: undefined proc
I copied the entire library into my game. Looks like it works.
Wow you will never ever learn how to code you denied the way to code your on own and copied that is not what a coder will do. To learn how to code you must learn how to do it yourself noticing that your game has nothing to do with coding(icon download) why include it there.

Advice delete the coding you copied and try to do it yourself.
In response to Foxhounds
Foxhounds wrote:
Wow you will never ever learn how to code you denied the way to code your on own and copied that is not what a coder will do. To learn how to code you must learn how to do it yourself noticing that your game has nothing to do with coding(icon download) why include it there.

Advice delete the coding you copied and try to do it yourself.

Uh. The entire purpose of a library is to put it straight into your environment, while the way TheDarkChakra did it may be wrong, using a public resource isn't exactly bad, especially if it's published to help others such as the case of a library, or in some cases, a demo. Such resources are there to help the user - specifically in things they can't do themselves, such as parsing a document of text to have properly highlighted syntax matching DM's.