Regg's OffTopic

Go down

Regg's OffTopic

Post by Regg on Tue 28 May 2013, 22:17

There's been some griping here about the colors used for the code () boxes. Green text on a white background can be difficult to read. So I'm asking for suggestions for a new color scheme. Post your ideas, and if we can reach a consensus, I'll update the CSS.
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Re: Regg's OffTopic

Post by TheGeneral on Wed 29 May 2013, 01:05

Which ever colour schem is picked a contrast of a dark background with a light coloured text is what is needed I think. Dark bluebg/ white text, blackbg/ white text, etc. if it is possible to get the code written like the editor that would be even better. Highlighting the various syntax etc.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
tvig0r0us wrote:Thanks to everyone that has supported and stuck with OFDR along the way. It is a great game and is largely under appreciated, but those of us that love it are happy to have others to enjoy it with.

tvig


TheGeneral
TheGeneral
Veteran

Points : 783
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Re: Regg's OffTopic

Post by Regg on Wed 29 May 2013, 02:46

I was looking around the forumotion.com help forum, but couldn't find anything about syntax highlighting other than 'we support it'. I'm trying to get an account on that forum so I can post a question.
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Re: Regg's OffTopic

Post by TheGeneral on Wed 29 May 2013, 11:32

here is the thread I started on the help forum.

http://help.forumotion.com/t118162-how-can-i-change-the-colour-of-text-in-code

Here is a link that I was sent to see if this could help:

http://www.avacweb.com/t324-10-syntax-highlighting-with-panda

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
tvig0r0us wrote:Thanks to everyone that has supported and stuck with OFDR along the way. It is a great game and is largely under appreciated, but those of us that love it are happy to have others to enjoy it with.

tvig


TheGeneral
TheGeneral
Veteran

Points : 783
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Re: Regg's OffTopic

Post by Regg on Wed 29 May 2013, 21:16

Been trying to get this Panda syntax highlighter working, but it looks like Forumotion.com is actually breaking the Panda code! Forumotion.com offers this warning:
Be careful, your javascript code must be functional when published. In effect, we compress the code in order to improve your forum pages loading time.
But whatever 'compression' method they are using is actually breaking the code, as Firefox logs a syntax error and aborts the script. Since the bastards locked the topic without providing any resolution, I'm trying to start a new thread, but still waiting on my account to be approved.
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Re: Regg's OffTopic

Post by Regg on Wed 29 May 2013, 21:33

FYI -- when I make my own web page and include the Panda JavaScript code, there are no syntax errors! It is quite clear that Forumotion.com's so-called compression is screwing up the code.
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Re: Regg's OffTopic

Post by Regg on Thu 30 May 2013, 02:59

I was able to figure out what was going on with the Panda script and get it resolved! We now have syntax highlighting in the code boxes! I still need to get it working properly for Lua, though.
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Re: Regg's OffTopic

Post by TheGeneral on Thu 30 May 2013, 10:44

thats looking great dude! just a prompt about the bg colour though, if you can change that and the colour of the text to suit I think you're on to a winner there.

Your help is greatly appreciated.

Cheers

MD

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
tvig0r0us wrote:Thanks to everyone that has supported and stuck with OFDR along the way. It is a great game and is largely under appreciated, but those of us that love it are happy to have others to enjoy it with.

tvig


TheGeneral
TheGeneral
Veteran

Points : 783
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Re: Regg's OffTopic

Post by Regg on Fri 31 May 2013, 07:49

Those colors looking any better mate?

I'm slowly adding the Lua keywords and functions.
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Re: Regg's OffTopic

Post by TheGeneral on Fri 31 May 2013, 09:48

Code:
function testcode()
    OFP:move("unit","waypointp","ADDTOFRONT")
    OFP:defend("unit","bunker",50,"ADDTOEND")
    MDG:kickSomeAss("unit","pla","allgunsblazing","fragthefuckers","OVERRIDE")
end

function onHit()
    if unit == myunit then
          MDG:yourfucked("unit","Dead")
    end
end

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
tvig0r0us wrote:Thanks to everyone that has supported and stuck with OFDR along the way. It is a great game and is largely under appreciated, but those of us that love it are happy to have others to enjoy it with.

tvig


TheGeneral
TheGeneral
Veteran

Points : 783
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Re: Regg's OffTopic

Post by TheGeneral on Fri 31 May 2013, 09:52

looking at my test code above, I'm not sure what it looks like on other colour varients in peoples editors, but I have white and blue the other way around, all the variables are in white too and red for the strings in the parenthesis.

Liking the background colour and the line numbering too.

funny isn't it, how we seem to be the only ones discussing this matter when other people were complaining about it. Thought this was an open forum?? scratch

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
tvig0r0us wrote:Thanks to everyone that has supported and stuck with OFDR along the way. It is a great game and is largely under appreciated, but those of us that love it are happy to have others to enjoy it with.

tvig


TheGeneral
TheGeneral
Veteran

Points : 783
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Re: Regg's OffTopic

Post by John J. Stevens on Fri 31 May 2013, 10:25

looking great - I tried playing with PANDA as well but became a bit frustrated with the recursive discussions of the threads - now I know it has something to do with the way forummotion handles its BBS code.

Either case it is looking good and like others, appreciate seeing these different skill sets being shared!

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
John J. Stevens
John J. Stevens
Admin

Location : WV/PA
Points : 284
Reputation : 21
Join date : 2012-12-19

Back to top Go down

Re: Regg's OffTopic

Post by Regg on Sat 01 Jun 2013, 19:02

Thanks for the kind words. I'm glad I found an interesting place to share my skills!

Forumotion's Javascript 'optimizer' strips out all comments and attempts to remove white-space in scripts in order to cut down the total file size. But it was removing a space where it was needed. Adding a back-slash before the space fixed it!

There is still an issue with the Panda script not recognizing comments in posted code, and I'm not sure if I'll be able to get that one worked out. Its not just comments in Lua, but even the built-in defaults. Anyone here familiar with Regular Expressions and/or Javascript?
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Re: Regg's OffTopic

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum