Top posting users this month | |
Latest topics | » Where to go from here.September 14th 2020, 1:20 pm by MrNicNac» Send me an EmailSeptember 14th 2020, 1:16 pm by MrNicNac» [v1.6.0.0] Lua Script Obfuscator [No Bytecode]July 6th 2015, 7:38 pm by m27frogy» New Site PossiblyJuly 6th 2015, 4:16 pm by m27frogy» Ambassador!April 15th 2015, 11:40 pm by naknak» Boop - TagApril 13th 2015, 9:46 pm by naknak» Vip Class ScriptApril 13th 2015, 4:54 pm by naknak» Who's active?!April 13th 2015, 4:52 pm by naknak» Genesis PointJuly 17th 2014, 7:04 pm by branefreez» Reward SystemJuly 17th 2014, 5:41 am by m27frogy» Script RequestJuly 10th 2014, 11:43 am by naknak» local scripts?July 10th 2014, 11:39 am by naknak» Project: Reconstruction [Died]July 10th 2014, 11:36 am by naknak» Hi. I am new hereApril 26th 2014, 4:01 pm by altshiftkey» What's your favorite sport?January 1st 2014, 2:13 pm by m27frogy» FlashLight ScriptJanuary 1st 2014, 2:11 pm by m27frogy» Gun Making! [READ DESC]January 1st 2014, 2:10 pm by m27frogy» Hi, I am new here!November 26th 2013, 3:33 pm by Keanu73» Improve CodingOctober 26th 2013, 1:12 pm by pook03» Simple ButtonSeptember 1st 2013, 6:19 pm by branefreez |
| | RTMLP - A new way of GUI development. | |
| | Author | Message |
---|
Guest Guest
| Subject: RTMLP - A new way of GUI development. April 22nd 2011, 11:42 am | |
| Roblox Text Markup Language Although I say "text", just like HTML, it's so much more than text. It's for making static GUI pages without having to make each individual one, or hard-code changes. For example, you might want 5 pages with only a different title or content - That's where RTML helps. Just use string.gsub(RTML code,"Content to change", "What to change it to"), which is basic. Here's some example RTML code, which is in fully-working order. - Code:
-
RTML = [[
Anything outside tags is ignored so comments are just left outside the tags. Generally it's easier to tab RTML comments so you can see code easier. Or, for UberPros, just don't put any at all.
<RTML Parent="RTMLFrame">
Your first tag *MUST* be the RTML decleration, and the "Parent" tag is RELATIVE to the script.Parent. What we have here may just say RTMLFrame, but the script puts script.Parent before it automatically. So this RTML markup will go into RTMLFrame.
Each script can only process one RTML document at a time (Takes about 0.001 seconds on this document) so multithreading in the same script is not recommended on larger documents.
<frame x="10" y="35" w="380" h="355"> This frame will "store" all our stuff. In other words it's just there to look nice.
<textlabel x="10" y="10" w="380" h="15" text="Example page : Nyan cat. Your name is: :player:" DynamicText="1"> This is the title, we're actualy making this methodically: First the background, then, from top to bottom, the things ontop of it.
For booleans, use 0 for false and 1 for true. DynamicText states whether things like ":player:" get changed into the player's name.
Dynamic text makes it slightly (unnoticably) slower.
<img x="20" y="45" w="360" h="305" href="51396646"> Now, slightly lower down we put an image of Nyancat
<textlabel x="20" y="360" w="360" h="20" text="RTML made by Trappingnoobs. Credit to allofthese and EpicMathScriptor"> Now give them a small note reffering to textlabels/buttons. ]]
RTMLCurrent = RTMLInner.ProcessRTML(RTML) RTMLInner.RenderRTML(RTMLCurrent)
Last edited by trappingnoobs on May 13th 2011, 4:27 pm; edited 2 times in total (Reason for editing : Full redo of post.) |
| | | naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: Re: RTMLP - A new way of GUI development. April 22nd 2011, 12:55 pm | |
| I would love to try that out. | |
| | | Guest Guest
| Subject: Re: RTMLP - A new way of GUI development. May 11th 2011, 5:17 pm | |
| I've made support for most GUI objects. Here's some RTML I made for an example - Code:
-
RTML = [[ <frame x="5" y="5" w="5" h="5"> <frame x="10" y="10" w="5" h="5"> <textlabel x="10" y="10" w="15" h="15" text="frogs"> <img x="20" y="20" w="100" h="100" href="51396646"> ]]
RTMLCurrent = RTMLInner.ProcessRTML(RTML) RTMLInner.RenderRTML(RTMLCurrent)
It does approximately 5,000 elements per second, which is ridiculously fast. It gets faster after it's rendered once. Processing RTML into a table is almost instantaneous, rendering takes a little longer. |
| | | Guest Guest
| Subject: Re: RTMLP - A new way of GUI development. May 11th 2011, 5:22 pm | |
| I'll allow things like patterns which dynamically change, like, example, in the textlabel element's text parameter, you can put something like
text="Welcome :PlayerName:, you are in my group: :InGroup(500):."
Which'd transform automatically and dynamically on run-time into:
Welcome trappingnoobs, you are in my group: false. |
| | | naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: Re: RTMLP - A new way of GUI development. May 12th 2011, 5:24 pm | |
| Cool. When will I be able to try it? | |
| | | Guest Guest
| Subject: Re: RTMLP - A new way of GUI development. May 13th 2011, 11:51 am | |
| I'll release an early beta today or tomorrow. I'd've finished by now but exam revision is taking up a lot of my time. I'm aiming for 100% in IT and English and Maths (But I'll probably only get 80~90 in math), so..
I've done quite a bit so far. I'm going to allow parenting soon, and make more things local to speed it up. |
| | | Guest Guest
| Subject: Re: RTMLP - A new way of GUI development. May 13th 2011, 5:30 pm | |
| |
| | | blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 25
| Subject: Re: RTMLP - A new way of GUI development. June 11th 2011, 9:11 am | |
| lol holy banana made something like this called RCODE. | |
| | | Guest Guest
| Subject: Re: RTMLP - A new way of GUI development. June 12th 2011, 11:23 am | |
| :o
Edit
OMFG HIS HAS WORKING JAVASCRIPT AND CSS AND STOOF. ERWERGJUIVNRIVBJRIBNRTSINBRJSVIJNBSDFIJBNSDFIBJNDFSIJNBSDFIBJN
I give up. I just give up.
Edit
Nevermind it only runs lua functions to make it look like javascript. I'd assume he uses gsub to replace "}" with "end". |
| | | Guest Guest
| Subject: Re: RTMLP - A new way of GUI development. June 12th 2011, 11:38 am | |
| Love to see the source of that. A bit hypocritical since I source-encrypt all my scripts. I can't even figure out how he gets it to run, it seems to put a script in the workspace, but a non-stop scan proves that script never exists, but it errors somehow. Odd. |
| | | blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 25
| Subject: Re: RTMLP - A new way of GUI development. June 16th 2011, 9:52 am | |
| lol, I'm working on making a better GUI than him! | |
| | | Sponsored content
| Subject: Re: RTMLP - A new way of GUI development. | |
| |
| | | | RTMLP - A new way of GUI development. | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| Who is online? | In total there are 2 users online :: 0 Registered, 0 Hidden and 2 Guests
None
Most users ever online was 54 on August 2nd 2017, 2:13 am
|
| Please tell us what time zone you are in here
Got a really good idea? Post it in projects and it might show up here! |
|