[QUOTE=NeatNit;50437951]-- bump from page 3 :D --
Hooks' titles seem to link to the wrong category. Example:
Clicking on Entity in the title of [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/Activate]Entity:Activate[/url] will take you to [url=http://wiki.garrysmod.com/page/Category:Entity]Category:Entity[/url]
But clicking on ENT in [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/ENTITY/Initialize]ENT:Initialize[/url] will take you to [url=http://wiki.garrysmod.com/page/Category:ENTITY]Category:ENTITY[/url] instead of [url=http://wiki.garrysmod.com/page/Category:ENTITY_Hooks]Category:ENTITY_Hooks[/url]
If it's not clear I'm talking about these titles:
[img]https://i.gyazo.com/5c5ce1dc6725b0746c7323fad35182e0.png[/img]
[img]https://i.gyazo.com/e02d2b84614ed36d9238c10b6b46e653.png[/img]
[editline]1st June 2016[/editline]
I could just make redirects though. Doing that now.[/QUOTE]
FIXED.
Is it just me, or
[IMG]http://i.imgur.com/1An9Vcv.jpg[/IMG]
[QUOTE=MPan1;50453680]Is it just me, or
[IMG]http://i.imgur.com/1An9Vcv.jpg[/IMG][/QUOTE]
Oops forgot to remove that :v:
[img]http://i.imgur.com/4swABKk.png[/img]
[url]http://wiki.garrysmod.com/page/GM/HUDPaint[/url]
[url]http://wiki.garrysmod.com/page/Category:2D_Rendering_Hooks[/url]
[url]http://wiki.garrysmod.com/page/Category:2D_Rendering_Functions[/url]
Before we start filling these in, any thoughts?
I feel like this should be seen:
[code]{{Func
|Name=GM:PlayerCanHearPlayersVoice
|Description=Enables or disables voice chat
}}
This works by overwriting the default function, and if returning true it will let the player hear the voice chat.
In the example below, its quite simply checking if the receivers are below 500 units away.
If they are, it will let them hear the voice chat.
{{Example
|Description=Return true, hear voice. Return false, not hear voice.
<pre>
function GM:PlayerCanHearPlayersVoice( ply, rec )
if ply:GetPos():Distance(rec:GetPos()) < 500 then
return true
end
return false
end
</pre>
}}[/code]
[url=http://wiki.garrysmod.com/index.php?title=Gamemode.PlayerCanHearPlayersVoice&oldid=25180]Result[/url], until it gets deleted at least. I call it - how [url=https://www.youtube.com/watch?v=taJAi01Wn6Q]not[/url] to contribute to the wiki!
It's kind of hilarious how badly the author doesn't understand what they're doing. I'm not even mad, I was once that much of a noob and the best way to learn is to make mistakes, but at the same time back when I was a noob I wouldn't dare messing with random stuff like that on a live wiki... Meh, best I don't dwell. :P
[QUOTE=Robotboy655;50866872][img]http://i.imgur.com/4swABKk.png[/img]
[url]http://wiki.garrysmod.com/page/GM/HUDPaint[/url]
[url]http://wiki.garrysmod.com/page/Category:2D_Rendering_Hooks[/url]
[url]http://wiki.garrysmod.com/page/Category:2D_Rendering_Functions[/url]
Before we start filling these in, any thoughts?[/QUOTE]
I didn't realize you posted here, which is why I discussed this on the wiki talk page. Might as well bring it up now.
Most of what I brought up is related to the wiki syntax for using the templates, I guess anyone who's interested in that should just [url=http://wiki.garrysmod.com/page/Template_talk:DrawingContext]read the talk page[/url]. There is one topic worth bringing up here though.
This is the normal text:
[quote]This is a rendering function that requires 3D rendering context.
This means that it will only work in hooks with 3D rendering context.[/quote]
I proposed to add the text in bold:
[quote]This is a rendering function that requires 3D rendering context.
This means that it will only work in hooks with 3D rendering context[b] or after cam.Start3D[/b].[/quote]
Robotboy says:
[quote=Robotboy655]... And the cam.Start* stuff should be mentioned on pages for those functions, not in the template, maybe with addition of special case.
...
Something like this: [url]http://wiki.garrysmod.com/page/cam/Start3D2D[/url][/quote]
I respectfully disagree:
[quote=NeatNit]this literally applies to every single drawing function. I don't see why it shouldn't be part of this template. It applies to DrawModel just as much as Start3D2D.[/quote]
I guess there's only one thing left to do:
[img]https://facepunch.com/fp/ratings/tick.png[/img] - add "or after cam.Start[]D"
[img]https://facepunch.com/fp/ratings/cross.png[/img] - don't add
off-topic (meta-topic?) - this thread was on page 3 :(
How does it apply to every single drawging function? Drawing functions do not change or start a new rendering context. cam.Start* does.
We're talking about this note:
[QUOTE]If you are trying to use this in a GM:HUDPaint or similar hook for huds, you'll need to use cam.Start3D or cam.Start first.[/QUOTE]
This is completely true for Entity:DrawModel.
[QUOTE=NeatNit;50938837]We're talking about this note:
This is completely true for Entity:DrawModel.[/QUOTE]
What? Where is that note from?
[editline]24th August 2016[/editline]
Nvm, found it and removed it, it is being replaced by the new template, I still don't see what the hell you are talking about.
[editline]24th August 2016[/editline]
I do agree with you on the internal readability by the way, not quite sure on the argument order though, from the stand point of fallbacks.
It should fallback to something if no/invalid arguments are given. I am thinking it should fallback to "2D" and "function" since afaik that's the most common combination across the API.
Ugh, stupid mobile chrome deleted the message I just typed. Take 2:
I see no point for fallback. If an argument is missing, someone is using the template wrong. Returning an actual error would actually be better, because the editor can easily see that they made a mistake and correct this mistake - or if they're too dumb to do so, other editors will. It's better than incorrect/ambiguous usage, and for what it's worth, [url=https://m.mediawiki.org/wiki/Help:Extension:ParserFunctions#.23expr]#expr[/url] does the same thing on invalid input.
Regarding the parameter order though, I honestly couldn't care less at this point, both are equally valid so we can just pick one at random and go with it for all I care!
I guess we could have it hide the template and add it to a hidden category then?
I actually meant a variation of this: [url]http://wiki.garrysmod.com/index.php?title=Template:DrawingContext/Forgiving&action=edit[/url]
which, when used incorrectly, spits out this unmistakable text: [url]http://wiki.garrysmod.com/page/Template:DrawingContext/Forgiving[/url]
Again, what I'm saying is that it should be obvious that something is wrong with this page just by glancing at it. It should be in your face like a compiler error so you know you have to fix it.
[editline]24th August 2016[/editline]
And yes, a hidden category (Category:Errors?) is a good idea, though the idea is that these errors would be solved by their creator before they're even saved. Still, if we stick 'em in a category we can easily find and fix the broken ones.
I guess that works.
Update: the template is now used throughout the wiki.
[url]http://wiki.garrysmod.com/page/Category:2D_Rendering_Hooks[/url]
[url]http://wiki.garrysmod.com/page/Category:3D_Rendering_Hooks[/url]
[url]http://wiki.garrysmod.com/page/Category:2D_Rendering_Functions[/url]
[url]http://wiki.garrysmod.com/page/Category:3D_Rendering_Functions[/url]
Can we make a redirect for some Panel pages that don't exist?
For example:
[URL="http://wiki.garrysmod.com/page/Category:DCheckBoxLabel"]DCheckBoxLabel[/URL] [URL="http://image.prntscr.com/image/224368cf1d0944a5a26bd2b6103a0a0a.png"](Pages do not exist)[/URL] -> [URL="http://wiki.garrysmod.com/page/Category:DCheckBox"]DCheckBox[/URL]/[URL="http://wiki.garrysmod.com/page/Category:DLabel"]DLabel[/URL]
[QUOTE=JasonMan34;51191756]Can we make a redirect for some Panel pages that don't exist?
For example:
[URL="http://wiki.garrysmod.com/page/Category:DCheckBoxLabel"]DCheckBoxLabel[/URL] [URL="http://image.prntscr.com/image/224368cf1d0944a5a26bd2b6103a0a0a.png"](Pages do not exist)[/URL] -> [URL="http://wiki.garrysmod.com/page/Category:DCheckBox"]DCheckBox[/URL]/[URL="http://wiki.garrysmod.com/page/Category:DLabel"]DLabel[/URL][/QUOTE]
Robotboy doesn't like redirects, for whatever reason, but in cases like this I tend to agree. I wouldn't want to end up on a different panel from the one I'm looking at.
We can just create the articles properly. I'll do it for GetChecked, can you handle the rest? :wink:
Edit: since it's not obvious, here's how to make a page: [url]http://wiki.garrysmod.com/page/Form:Panel[/url]
[t]https://i.gyazo.com/33f3c754e0c7967c3fdef762c15d05d5.png[/t]
-----------------------------------------------
In classic 'talk first, think later' fashion, I originally typed this reply. Don't listen to it... but it might be useful for unrelated future stuff.
If a function (e.g. DCheckBoxLabel:GetChecked) does exactly the same thing as another function (e.g. DCheckBox:GetChecked), you can transclude the existing one like this
{{:DCheckBox/GetChecked}}
Result:
[t]https://i.gyazo.com/3cb9da20bd6d9bf3ef5155f1cc7481b8.png[/t]
After that, editing DCheckBox:GetChecked will also be reflected in DCheckBoxLabel:GetChecked after a few minutes without any human intervention. There is a downside though - the 'Edit with form' button will appear but should not be used, and there's no way to stop it or warn people from using it.
An alternative is to use subst: like this:
{{subst::DCheckBox/GetChecked}}
This will COPY the contents of DCheckBox:GetChecked into DCheckBoxLabel:GetChecked. After that, both articles will have to be maintained independently from each other (editing one will not affect the other).
[editline]12th October 2016[/editline]
Okay so you used the thing I told you not to use anyway. Whatever!
Why did you put this in CSS?
[code]#p-cactions LI.selected { display:none; }[/code]
It hides the 'Page' button, shown in blue here:
[img]https://i.gyazo.com/fc96b2afb9d3a7a1be2de8c89e847c99.png[/img]
I don't see why it's hidden, I find it pretty darn useful - e.g. to go back to the page when looking at its history (where apparently both History and Page have the class 'selected'). I did override it with a custom script, but why is it there in the first place?
I didn't put it there, it was there forever.
I didn't mean to imply it's new. But someone, at some point in time, had to put it there!
Edit: meh, I guess it was garry acting in mysterious ways, as he does, back when the wiki was formed. Any chance it could get removed? I can't run custom CSS on my phone.
Edit: Thanks.
Does anyone have any ideas for a better layout for the panel page? Here's an example panel page: [url]http://wiki.garrysmod.com/page/Category:DFrame[/url]
The user preference page got some messed up spacing
[quote]
User profileAppearanceDate and timeEditingRecent changesWatchlistSearch optionsMiscSemantic MediaWiki
[/quote]
That's been there forever... They need some padding/margin.
Should I put this on? I had this in my Stylebot forever:
[img]http://i.imgur.com/4N8Ysyj.png[/img]
IMO we should formalize the documentation of functions with multiple forms (such as the Vector constructor). I have no idea how to accomplish this in wiki, but here are some ideas I came up with as far as displaying:
Idea 1: Multiple function signature blocks, with descriptions for each listed in the "Description" section. perhaps each signature could have a description below it.
[t]http://i.imgur.com/OSzoKUQ.png[/t]
Idea 2: Each function signature has its own Description, Arguments, and Returns sections. This could make the page substantially larger, but ensures that all forms have all the details.
[t]http://i.imgur.com/09AtVUO.png[/t]
Idea 3: Below the Returns section (or somewhere) there is a "Other Forms" or something heading that lists the other signatures and perhaps short descriptions.
[t]http://i.imgur.com/qzX2w4i.png[/t]
Another thing; it would be nice to see the return type specified in the opening signature block like this:
[IMG]http://i.imgur.com/fKBSTVM.png[/IMG]
or
[IMG]http://i.imgur.com/nwVr8h0.png[/IMG]
[QUOTE=zerf;51304827]IMO we should formalize the documentation of functions with multiple forms (such as the Vector constructor). I have no idea how to accomplish this in wiki, but here are some ideas I came up with as far as displaying:
Idea 1: Multiple function signature blocks, with descriptions for each listed in the "Description" section. perhaps each signature could have a description below it.
[t]http://i.imgur.com/OSzoKUQ.png[/t]
Idea 2: Each function signature has its own Description, Arguments, and Returns sections. This could make the page substantially larger, but ensures that all forms have all the details.
[t]http://i.imgur.com/09AtVUO.png[/t]
Idea 3: Below the Returns section (or somewhere) there is a "Other Forms" or something heading that lists the other signatures and perhaps short descriptions.
[t]http://i.imgur.com/qzX2w4i.png[/t]
Another thing; it would be nice to see the return type specified in the opening signature block like this:
[IMG]http://i.imgur.com/fKBSTVM.png[/IMG]
or
[IMG]http://i.imgur.com/nwVr8h0.png[/IMG][/QUOTE]
I like idea 1. Would be useful for the default Lua functions with weird arguments.
Oooooh just thought of this:
[IMG]http://i.imgur.com/1Leb6qN.png[/IMG]
On functions with one version, the first one could be open by default (or it could be how it is currently)
[URL="http://hastebin.com/raw/isafamajoy"]Here's the contents[/URL] of the div#content if anyone wants to tinker.
I like the idea but I hate having to copy paste/duplicate descriptions, etc.
[QUOTE=zerf;51304888]Oooooh just thought of this:
[IMG]http://i.imgur.com/1Leb6qN.png[/IMG]
On functions with one version, the first one could be open by default (or it could be how it is currently)
[URL="http://hastebin.com/raw/isafamajoy"]Here's the contents[/URL] of the div#content if anyone wants to tinker.[/QUOTE]
How about the first one (the most common form) would be just as it is now, but between Returns and Examples would be Other Forms, the way you did it? That way the original description could be assumed to have been read, and the other forms' descriptions only need to state the difference. No copy pasting. The main function line might also have "(+ 2 other forms)" like Visual Studio has "(+ 2 overloads)".
The other advantage of this is that it's pretty simple to add to the wiki template-wise, and is fully compatible with current articles. Extra forms would be added like examples are added currently.
Sorry, no mock-up, I'm on my phone.
Made a mock-up:
[img]https://i.gyazo.com/3b6efaa4a15a162ee41d4f558593484b.png[/img]
[editline]4th November 2016[/editline]
Care to say why instead of just rating Disagree?
Edit: whoops, apparently automerge removes ratings.
I've only recently started developing for GMod, and while the wiki has been indescribably useful, I think this change would make it even more so. There's still so much I don't know (both GMod's library and GLua in general) and so many shortcuts I haven't thought to attempt that NeatNit's suggestion would be extremely useful for.
Just the two cents of a guy who's still getting his feet wet.
[QUOTE=NeatNit;51306618]
Care to say why instead of just voting Disagree?
[/QUOTE]
In my opinion it looks ugly to have the other forms be there, it just doesn't look [i]correct[/i]. Even though it's be a bit more work to change the whole upper part, I think it'd be worth it.
Also, if it was changed to work that way, it'd make the page look cleaner overall, and take up less space.
Sorry, you need to Log In to post a reply to this thread.