Anyone know where the markup documentation for Garry's Mod is? If not how do you do images in markup?
Cheers.
Which markup are you talking about exactly?
If you're talking about Lua scripting, which is used to create addons, you can find its documentation over at the Garry's Mod Wiki. If not, you're gonna have to clarify.
Via the markup object system. http://wiki.garrysmod.com/page/Category:MarkupObject
Very little documentation is provided for it on this.
You might find more info on the old github .. but I've never used makeup myself
https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexc646.html
I skimmed the code that la_grib posted. Seems like color and font are the only things supported: https://github.com/Facepunch/garrysmod/blob/master/garrysmod/lua/includes/modules/markup.lua#L85-L127
--[[---------------------------------------------------------
Name: ExtractParams(p1,p2,p3)
Desc: This function is used to extract the tag information.
Usage: ** INTERNAL ** Do not use!
-----------------------------------------------------------]]
local function ExtractParams( p1, p2, p3 )
if ( string.sub( p1, 1, 1 ) == "/" ) then
local tag = string.sub( p1, 2 )
if ( tag == "color" or tag == "colour" ) then
table.remove( colour_stack )
elseif ( tag == "font" or tag == "face" ) then
table.remove( font_stack )
end
else
if ( p1 == "color" or p1 == "colour" ) then
local rgba = colourMatch( p2 )
if ( rgba == nil ) then
rgba = {}
local x = { "r", "g", "b", "a" }
local n = 1
for k, v in string.gmatch( p2, "(%d+),?" ) do
rgba[ x[ n ] ] = k
n = n + 1
end
end
table.insert( colour_stack, rgba )
elseif ( p1 == "font" or p1 == "face" ) then
table.insert( font_stack, tostring( p2 ) )
end
end
end
Ah, I was looking at nutscript's use of markup as one of my examples and nutscript uses an editied version with image support. Thanks guys.
Sorry, you need to Log In to post a reply to this thread.