• Creating my owns controls/forms
    9 replies, posted
Hello everyone! I started today with php/html scripting and i think that i did some progress, i'm making a page that let gmod players to get data from sql servers, but actually I have a design problem [B]This...Looks disgusting! ARGH![/B] [IMG]https://dl.dropboxusercontent.com/s/cn58jsmdvypdyar/2014-03-17_00-35-00.jpg?dl=1&token_hash=AAEsYeH5PVvJEufdGN2Lcz_BDKppCTDNdHfoTnqZzP0EAw[/IMG] I need to make a custom element, anyway, i'm note really sure that's the right way to call it because i tried to google it and this doesn't show me what i want... I'm used to glua, and for create custom controls/elements, i just create the vgui control, and write the code like rects and that stuff, then the magic happens! But here i don't know how can i make for create an element for use it later without rewrite it everytime! Example, i want to create a box that shows name, score and a big avatar picture... Any useful link, name of what i'm looking for will be highly appreciated (I'm not asking for make you write it! but please, just don't say "Use google") [B]Thanks so much![/B]
You can't. You can style it with CSS though.
[url]http://www.datatables.net/[/url] try using this, it's alot prettier ^^
[QUOTE=supersnail11;44262431]You can't. You can style it with CSS though.[/QUOTE] Oh, so everything it just parsing args on tags and making them look pretty? [editline]17th March 2014[/editline] [QUOTE=dustymcp;44263610][url]http://www.datatables.net/[/url] try using this, it's alot prettier ^^[/QUOTE] I'll try it! Thanks :D
[QUOTE=gonzalolog;44265138]Oh, so everything it just parsing args on tags and making them look pretty?[/QUOTE] [code] selector { color: red; } [/code] for example. If you wish to target a class or div just use it in the selector as: [code] .container { color: red; } [/code] CSS is really essential, would recommend you learn it.
[QUOTE=gonzalolog;44265138]Oh, so everything it just parsing args on tags and making them look pretty? [editline]17th March 2014[/editline] I'll try it! Thanks :D[/QUOTE] s Yeah, it can take a while but when you have a working one you can keep using it. but as moofy said learn css, as most of the table tags are decrepated for html5 i would suggest learning css and styling them yourself, or use the datatables thing if your not sure what i mean :) Almost forgot, codecademy have a bit on styling tables if im remembering correct, really helped me alot as it is abit wierd at first :)
If you're comfortable using or learning JavaScript, there are plenty of frameworks which can help you build modular components on the client. I don't have experience with too many frameworks, but perhaps this website might help? [url]http://todomvc.com/[/url] One particular library I have experience with is [URL="http://dojotoolkit.org/"]Dojo[/URL] and its UI library, [URL="http://dojotoolkit.org/reference-guide/1.9/dijit/"]Dijit[/URL]. It's nice in that it provides a lot of basic elements for you such as textboxes, dropdowns, etc. With these you can build reusable components (kind of) similar to how GMod works. The advantage is that Dojo/Dijit can use HTML templates instead of manually initializing each control as you would with derma. Unfortunately, there's a bit of a learning curve with this framework and the documentation could use some work.
You actually [B][I]can[/I][/B] create your own components, browser support for it is not very awesome yet, but there's polyfills for it, like [url=http://www.polymer-project.org/]polymer[/url]
Thanks guys! this night i'll continue playing with html and php
And btw. just keep playing the mod dayz SA is pretty boring atm :P
Sorry, you need to Log In to post a reply to this thread.