@tlua/gmod 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/achievementicon.d.tlua +0 -1
- package/types/achievements.d.tlua +15 -16
- package/types/ai.d.tlua +5 -6
- package/types/ai_schedule.d.tlua +0 -1
- package/types/ai_task.d.tlua +0 -1
- package/types/angle.d.tlua +18 -19
- package/types/avatarimage.d.tlua +0 -1
- package/types/awesomium.d.tlua +0 -1
- package/types/baseclass.d.tlua +1 -3
- package/types/bf_read.d.tlua +10 -12
- package/types/bit.d.tlua +11 -12
- package/types/button.d.tlua +0 -1
- package/types/cam.d.tlua +16 -17
- package/types/ceffectdata.d.tlua +31 -33
- package/types/chat.d.tlua +5 -6
- package/types/checkbutton.d.tlua +0 -1
- package/types/cleanup.d.tlua +7 -8
- package/types/cluaemitter.d.tlua +11 -13
- package/types/clualocomotion.d.tlua +39 -41
- package/types/cluaparticle.d.tlua +43 -45
- package/types/cmovedata.d.tlua +46 -48
- package/types/cnavarea.d.tlua +76 -78
- package/types/cnavladder.d.tlua +21 -23
- package/types/cnewparticleeffect.d.tlua +25 -27
- package/types/color.d.tlua +28 -29
- package/types/concommand.d.tlua +4 -5
- package/types/constraint.d.tlua +28 -29
- package/types/construct.d.tlua +1 -2
- package/types/contentheader.d.tlua +1 -3
- package/types/contenticon.d.tlua +7 -9
- package/types/contentsidebar.d.tlua +2 -4
- package/types/contentsidebartoolbox.d.tlua +0 -1
- package/types/contextbase.d.tlua +2 -4
- package/types/controlpanel.d.tlua +11 -14
- package/types/controlpresets.d.tlua +11 -13
- package/types/convar.d.tlua +15 -17
- package/types/cookie.d.tlua +3 -4
- package/types/coroutine.d.tlua +7 -8
- package/types/crecipientfilter.d.tlua +15 -17
- package/types/csent.d.tlua +0 -1
- package/types/csoundpatch.d.tlua +13 -15
- package/types/ctakedamageinfo.d.tlua +32 -34
- package/types/ctrllistbox.d.tlua +0 -1
- package/types/ctrlnumpad.d.tlua +5 -7
- package/types/cusercmd.d.tlua +26 -28
- package/types/custom_entity_fields.d.tlua +0 -1
- package/types/cvars.d.tlua +6 -7
- package/types/dadjustablemodelpanel.d.tlua +5 -7
- package/types/dalphabar.d.tlua +1 -3
- package/types/dbinder.d.tlua +2 -4
- package/types/dbubblecontainer.d.tlua +0 -2
- package/types/dbutton.d.tlua +6 -8
- package/types/dcategoryheader.d.tlua +0 -1
- package/types/dcategorylist.d.tlua +0 -1
- package/types/dcheckbox.d.tlua +3 -5
- package/types/dcheckboxlabel.d.tlua +9 -10
- package/types/dcollapsiblecategory.d.tlua +21 -23
- package/types/dcolorbutton.d.tlua +5 -7
- package/types/dcolorcombo.d.tlua +3 -5
- package/types/dcolorcube.d.tlua +11 -13
- package/types/dcolormixer.d.tlua +25 -27
- package/types/dcolorpalette.d.tlua +21 -23
- package/types/dcolumnsheet.d.tlua +3 -5
- package/types/dcombobox.d.tlua +15 -17
- package/types/ddragbase.d.tlua +11 -13
- package/types/ddrawer.d.tlua +6 -8
- package/types/debug.d.tlua +16 -19
- package/types/debugoverlay.d.tlua +11 -12
- package/types/dentityproperties.d.tlua +3 -5
- package/types/derma.d.tlua +10 -11
- package/types/dexpandbutton.d.tlua +1 -3
- package/types/dfilebrowser.d.tlua +20 -21
- package/types/dform.d.tlua +16 -18
- package/types/dframe.d.tlua +24 -25
- package/types/dgrid.d.tlua +9 -11
- package/types/dhorizontaldivider.d.tlua +18 -20
- package/types/dhorizontalscroller.d.tlua +9 -11
- package/types/dhscrollbar.d.tlua +9 -11
- package/types/dhtml.d.tlua +6 -8
- package/types/dhtmlcontrols.d.tlua +5 -6
- package/types/diconbrowser.d.tlua +9 -11
- package/types/diconlayout.d.tlua +16 -18
- package/types/dimage.d.tlua +17 -20
- package/types/dimagebutton.d.tlua +9 -10
- package/types/dkillicon.d.tlua +0 -1
- package/types/dlabel.d.tlua +31 -33
- package/types/dlabeleditable.d.tlua +3 -5
- package/types/dlabelurl.d.tlua +8 -10
- package/types/dlistbox.d.tlua +6 -8
- package/types/dlistboxitem.d.tlua +2 -4
- package/types/dlistlayout.d.tlua +0 -1
- package/types/dlistview.d.tlua +32 -34
- package/types/dlistview_column.d.tlua +12 -14
- package/types/dlistview_columnplain.d.tlua +0 -1
- package/types/dlistview_draggerbar.d.tlua +0 -1
- package/types/dlistview_line.d.tlua +11 -13
- package/types/dlistviewheaderlabel.d.tlua +0 -1
- package/types/dlistviewlabel.d.tlua +0 -1
- package/types/dlistviewline.d.tlua +0 -1
- package/types/dmenu.d.tlua +23 -28
- package/types/dmenubar.d.tlua +2 -7
- package/types/dmenuoption.d.tlua +11 -13
- package/types/dmenuoptioncvar.d.tlua +4 -6
- package/types/dmodelpanel.d.tlua +20 -22
- package/types/dmodelselect.d.tlua +0 -2
- package/types/dmodelselectmulti.d.tlua +0 -2
- package/types/dnotify.d.tlua +8 -10
- package/types/dnumberscratch.d.tlua +24 -26
- package/types/dnumberwang.d.tlua +14 -16
- package/types/dnumpad.d.tlua +0 -1
- package/types/dnumslider.d.tlua +17 -18
- package/types/dpanel.d.tlua +12 -14
- package/types/dpanellist.d.tlua +11 -12
- package/types/dpaneloverlay.d.tlua +5 -7
- package/types/dpanelselect.d.tlua +0 -1
- package/types/dpanpanel.d.tlua +4 -6
- package/types/dprogress.d.tlua +1 -3
- package/types/dproperties.d.tlua +2 -4
- package/types/dproperty_boolean.d.tlua +0 -1
- package/types/dproperty_combo.d.tlua +1 -3
- package/types/dproperty_entity.d.tlua +0 -1
- package/types/dproperty_float.d.tlua +0 -1
- package/types/dproperty_generic.d.tlua +3 -5
- package/types/dproperty_int.d.tlua +0 -1
- package/types/dproperty_vectorcolor.d.tlua +0 -1
- package/types/dpropertysheet.d.tlua +15 -17
- package/types/dragndrop.d.tlua +10 -11
- package/types/draw.d.tlua +10 -12
- package/types/drgbpicker.d.tlua +2 -4
- package/types/drive.d.tlua +11 -13
- package/types/dscrollbargrip.d.tlua +0 -1
- package/types/dscrollpanel.d.tlua +10 -11
- package/types/dshape.d.tlua +5 -7
- package/types/dsizetocontents.d.tlua +3 -5
- package/types/dslider.d.tlua +26 -28
- package/types/dsprite.d.tlua +7 -9
- package/types/dtab.d.tlua +6 -8
- package/types/dtextentry.d.tlua +41 -43
- package/types/dtilelayout.d.tlua +19 -21
- package/types/dtooltip.d.tlua +4 -6
- package/types/dtree.d.tlua +14 -16
- package/types/dtree_node.d.tlua +66 -68
- package/types/dtree_node_button.d.tlua +0 -1
- package/types/duplicator.d.tlua +29 -31
- package/types/dverticaldivider.d.tlua +21 -23
- package/types/dvscrollbar.d.tlua +9 -11
- package/types/editablepanel.d.tlua +0 -1
- package/types/effect.d.tlua +2 -4
- package/types/effects.d.tlua +6 -7
- package/types/engine.d.tlua +21 -22
- package/types/entity.d.tlua +643 -674
- package/types/ents.d.tlua +19 -25
- package/types/enums.d.tlua +0 -1
- package/types/file.d.tlua +39 -40
- package/types/file_class.d.tlua +0 -1
- package/types/fingerposer.d.tlua +0 -1
- package/types/fingervar.d.tlua +0 -1
- package/types/frame.d.tlua +0 -1
- package/types/frame_blend.d.tlua +7 -8
- package/types/game.d.tlua +39 -40
- package/types/gameevent.d.tlua +0 -1
- package/types/gamemode.d.tlua +2 -4
- package/types/global.d.tlua +0 -18
- package/types/gm.d.tlua +266 -268
- package/types/gmod.d.tlua +0 -1
- package/types/gmsave.d.tlua +4 -5
- package/types/gui.d.tlua +21 -22
- package/types/gwen.d.tlua +3 -4
- package/types/halo.d.tlua +2 -3
- package/types/hammer.d.tlua +0 -1
- package/types/hook.d.tlua +4 -5
- package/types/html.d.tlua +0 -1
- package/types/http.d.tlua +1 -2
- package/types/iconeditor.d.tlua +9 -11
- package/types/igmodaudiochannel.d.tlua +40 -42
- package/types/imagecheckbox.d.tlua +2 -4
- package/types/imaterial.d.tlua +25 -27
- package/types/imesh.d.tlua +4 -6
- package/types/input.d.tlua +22 -25
- package/types/invalidateinternalentitycache.d.tlua +0 -1
- package/types/irestore.d.tlua +8 -10
- package/types/isave.d.tlua +8 -10
- package/types/itexture.d.tlua +9 -11
- package/types/ivideowriter.d.tlua +4 -6
- package/types/jit.d.tlua +16 -17
- package/types/killicon.d.tlua +7 -8
- package/types/label.d.tlua +0 -1
- package/types/language.d.tlua +1 -2
- package/types/list.d.tlua +8 -9
- package/types/makeballoon.d.tlua +0 -1
- package/types/markup.d.tlua +2 -3
- package/types/markupobject.d.tlua +4 -6
- package/types/material.d.tlua +0 -1
- package/types/math.d.tlua +83 -84
- package/types/matproxy.d.tlua +3 -4
- package/types/matselect.d.tlua +9 -11
- package/types/menu.d.tlua +0 -1
- package/types/menubar.d.tlua +2 -3
- package/types/mesh.d.tlua +19 -20
- package/types/modelimage.d.tlua +0 -1
- package/types/motionsensor.d.tlua +10 -11
- package/types/navmesh.d.tlua +26 -27
- package/types/net.d.tlua +51 -53
- package/types/nextbot.d.tlua +34 -37
- package/types/notification.d.tlua +2 -3
- package/types/npc.d.tlua +180 -182
- package/types/numpad.d.tlua +7 -8
- package/types/os.d.tlua +3 -5
- package/types/package.d.tlua +0 -1
- package/types/panel.d.tlua +329 -331
- package/types/panellist.d.tlua +0 -1
- package/types/pathfollower.d.tlua +30 -32
- package/types/permissions.d.tlua +6 -7
- package/types/physcollide.d.tlua +2 -4
- package/types/physenv.d.tlua +11 -12
- package/types/physobj.d.tlua +77 -79
- package/types/pixelvis_handle_t.d.tlua +0 -1
- package/types/player.d.tlua +288 -293
- package/types/player_manager.d.tlua +13 -14
- package/types/preseteditor.d.tlua +0 -1
- package/types/presets.d.tlua +6 -7
- package/types/projectedtexture.d.tlua +47 -49
- package/types/properties.d.tlua +5 -6
- package/types/propselect.d.tlua +3 -5
- package/types/radiobutton.d.tlua +0 -1
- package/types/render.d.tlua +142 -143
- package/types/resource.d.tlua +2 -3
- package/types/richtext.d.tlua +0 -1
- package/types/sandbox.d.tlua +52 -54
- package/types/saverestore.d.tlua +12 -13
- package/types/schedule.d.tlua +5 -7
- package/types/scripted_ents.d.tlua +9 -12
- package/types/search.d.tlua +1 -2
- package/types/serverlist.d.tlua +7 -8
- package/types/slidebar.d.tlua +0 -1
- package/types/slider.d.tlua +0 -1
- package/types/sound.d.tlua +10 -11
- package/types/spawnicon.d.tlua +6 -8
- package/types/spawnmenu.d.tlua +23 -25
- package/types/spawnmenucontentpanel.d.tlua +3 -5
- package/types/sql.d.tlua +9 -10
- package/types/stack.d.tlua +4 -6
- package/types/steamworks.d.tlua +18 -19
- package/types/string.d.tlua +46 -50
- package/types/structures.d.tlua +0 -7
- package/types/surface.d.tlua +34 -35
- package/types/surfaceinfo.d.tlua +4 -6
- package/types/system.d.tlua +10 -11
- package/types/table.d.tlua +45 -48
- package/types/task.d.tlua +8 -10
- package/types/team.d.tlua +19 -20
- package/types/textentry.d.tlua +0 -1
- package/types/tgaimage.d.tlua +0 -1
- package/types/timer.d.tlua +14 -15
- package/types/tool.d.tlua +42 -46
- package/types/ugcpublishwindow.d.tlua +7 -9
- package/types/umsg.d.tlua +12 -13
- package/types/undo.d.tlua +10 -11
- package/types/urllabel.d.tlua +0 -1
- package/types/usermessage.d.tlua +2 -3
- package/types/utf8.d.tlua +7 -8
- package/types/util.d.tlua +90 -95
- package/types/vector.d.tlua +36 -37
- package/types/vehicle.d.tlua +48 -51
- package/types/vgui.d.tlua +14 -19
- package/types/video.d.tlua +0 -1
- package/types/vmatrix.d.tlua +35 -36
- package/types/weapon.d.tlua +81 -84
- package/types/weapons.d.tlua +5 -7
- package/types/widgets.d.tlua +1 -2
- package/types/workshopfilebase.d.tlua +4 -6
package/types/surface.d.tlua
CHANGED
|
@@ -26,6 +26,7 @@ interface SurfaceLib {
|
|
|
26
26
|
* @source https://wiki.facepunch.com/gmod/surface.CreateFont
|
|
27
27
|
*/
|
|
28
28
|
CreateFont(fontName: string, fontData: FontData): void;
|
|
29
|
+
|
|
29
30
|
/**
|
|
30
31
|
* Enables or disables the clipping used by the VGUI that limits the drawing operations to a panels bounds.
|
|
31
32
|
*
|
|
@@ -36,6 +37,7 @@ interface SurfaceLib {
|
|
|
36
37
|
* @deprecated Alias of Global.DisableClipping so use that instead.
|
|
37
38
|
*/
|
|
38
39
|
DisableClipping(disable: boolean): boolean;
|
|
40
|
+
|
|
39
41
|
/**
|
|
40
42
|
* Draws a hollow circle, made of lines. For a filled circle, see examples for [surface.DrawPoly](https://wiki.facepunch.com/gmod/surface.DrawPoly).
|
|
41
43
|
*
|
|
@@ -45,7 +47,9 @@ interface SurfaceLib {
|
|
|
45
47
|
* @source https://wiki.facepunch.com/gmod/surface.DrawCircle
|
|
46
48
|
*/
|
|
47
49
|
DrawCircle(originX: number, originY: number, radius: number, r: number, g: number, b: number, a?: number): void;
|
|
50
|
+
|
|
48
51
|
DrawCircle(originX: number, originY: number, radius: number, color: Color): void;
|
|
52
|
+
|
|
49
53
|
/**
|
|
50
54
|
* Draws a line from one point to another.
|
|
51
55
|
*
|
|
@@ -55,6 +59,7 @@ interface SurfaceLib {
|
|
|
55
59
|
* @source https://wiki.facepunch.com/gmod/surface.DrawLine
|
|
56
60
|
*/
|
|
57
61
|
DrawLine(startX: number, startY: number, endX: number, endY: number): void;
|
|
62
|
+
|
|
58
63
|
/**
|
|
59
64
|
* Draws a hollow box with a given border width.
|
|
60
65
|
*
|
|
@@ -64,6 +69,7 @@ interface SurfaceLib {
|
|
|
64
69
|
* @source https://wiki.facepunch.com/gmod/surface.DrawOutlinedRect
|
|
65
70
|
*/
|
|
66
71
|
DrawOutlinedRect(x: number, y: number, w: number, h: number, thickness?: number): void;
|
|
72
|
+
|
|
67
73
|
/**
|
|
68
74
|
* Draws a textured polygon (secretly a triangle fan) with a maximum of 4096 vertices.
|
|
69
75
|
* Only works properly with convex polygons. You may try to render concave polygons, but there is no guarantee that things wont get messed up.
|
|
@@ -79,6 +85,7 @@ interface SurfaceLib {
|
|
|
79
85
|
* @source https://wiki.facepunch.com/gmod/surface.DrawPoly
|
|
80
86
|
*/
|
|
81
87
|
DrawPoly(vertices: table): void;
|
|
88
|
+
|
|
82
89
|
/**
|
|
83
90
|
* Draws a solid rectangle on the screen.
|
|
84
91
|
*
|
|
@@ -88,6 +95,7 @@ interface SurfaceLib {
|
|
|
88
95
|
* @source https://wiki.facepunch.com/gmod/surface.DrawRect
|
|
89
96
|
*/
|
|
90
97
|
DrawRect(x: number, y: number, width: number, height: number): void;
|
|
98
|
+
|
|
91
99
|
/**
|
|
92
100
|
* Draw the specified text on the screen, using the previously set [position](https://wiki.facepunch.com/gmod/surface.SetTextPos), [font](https://wiki.facepunch.com/gmod/surface.SetFont) and [color](https://wiki.facepunch.com/gmod/surface.SetTextColor). This function does **not** handle newlines.
|
|
93
101
|
*
|
|
@@ -99,6 +107,7 @@ interface SurfaceLib {
|
|
|
99
107
|
* @source https://wiki.facepunch.com/gmod/surface.DrawText
|
|
100
108
|
*/
|
|
101
109
|
DrawText(text: string, forceAdditive?: boolean): void;
|
|
110
|
+
|
|
102
111
|
/**
|
|
103
112
|
* Draw a textured rectangle with the given position and dimensions on the screen, using the current active texture set with [surface.SetMaterial](https://wiki.facepunch.com/gmod/surface.SetMaterial). It is also affected by [surface.SetDrawColor](https://wiki.facepunch.com/gmod/surface.SetDrawColor).
|
|
104
113
|
*
|
|
@@ -111,6 +120,7 @@ interface SurfaceLib {
|
|
|
111
120
|
* @source https://wiki.facepunch.com/gmod/surface.DrawTexturedRect
|
|
112
121
|
*/
|
|
113
122
|
DrawTexturedRect(x: number, y: number, width: number, height: number): void;
|
|
123
|
+
|
|
114
124
|
/**
|
|
115
125
|
* Draw a textured rotated rectangle with the given position and dimensions and angle on the screen, using the current active texture.
|
|
116
126
|
*
|
|
@@ -122,6 +132,7 @@ interface SurfaceLib {
|
|
|
122
132
|
* @source https://wiki.facepunch.com/gmod/surface.DrawTexturedRectRotated
|
|
123
133
|
*/
|
|
124
134
|
DrawTexturedRectRotated(x: number, y: number, width: number, height: number, rotation: number): void;
|
|
135
|
+
|
|
125
136
|
/**
|
|
126
137
|
* Draws a textured rectangle with a repeated or partial texture.
|
|
127
138
|
*
|
|
@@ -163,12 +174,14 @@ interface SurfaceLib {
|
|
|
163
174
|
* @source https://wiki.facepunch.com/gmod/surface.DrawTexturedRectUV
|
|
164
175
|
*/
|
|
165
176
|
DrawTexturedRectUV(x: number, y: number, width: number, height: number, startU: number, startV: number, endU: number, endV: number): void;
|
|
177
|
+
|
|
166
178
|
/**
|
|
167
179
|
* Returns the current alpha multiplier affecting drawing operations. This is set by [surface.SetAlphaMultiplier](https://wiki.facepunch.com/gmod/surface.SetAlphaMultiplier) or by the game engine in certain other cases.
|
|
168
180
|
* @realm client and menu
|
|
169
181
|
* @source https://wiki.facepunch.com/gmod/surface.GetAlphaMultiplier
|
|
170
182
|
*/
|
|
171
183
|
GetAlphaMultiplier(): number;
|
|
184
|
+
|
|
172
185
|
/**
|
|
173
186
|
* Returns the current color affecting draw operations.
|
|
174
187
|
*
|
|
@@ -177,6 +190,7 @@ interface SurfaceLib {
|
|
|
177
190
|
* @source https://wiki.facepunch.com/gmod/surface.GetDrawColor
|
|
178
191
|
*/
|
|
179
192
|
GetDrawColor(): Color;
|
|
193
|
+
|
|
180
194
|
/**
|
|
181
195
|
* Returns the [HUD icon](https://github.com/Facepunch/garrysmod/blob/master/garrysmod/scripts/hud_textures.txt) TextureID of a texture with the specified name.
|
|
182
196
|
*
|
|
@@ -185,6 +199,7 @@ interface SurfaceLib {
|
|
|
185
199
|
* @source https://wiki.facepunch.com/gmod/surface.GetHUDTexture
|
|
186
200
|
*/
|
|
187
201
|
GetHUDTexture(name: string): number;
|
|
202
|
+
|
|
188
203
|
/**
|
|
189
204
|
* Retrieves the position and [ScissorRect](https://wiki.facepunch.com/gmod/render.SetScissorRect) information for the [Panel](https://wiki.facepunch.com/gmod/Panel) that is currently being drawn.
|
|
190
205
|
*
|
|
@@ -194,6 +209,7 @@ interface SurfaceLib {
|
|
|
194
209
|
* @source https://wiki.facepunch.com/gmod/surface.GetPanelPaintState
|
|
195
210
|
*/
|
|
196
211
|
GetPanelPaintState(): PanelPaintState;
|
|
212
|
+
|
|
197
213
|
/**
|
|
198
214
|
* Retrieves the currently active scissor rect for the surface library. A faster, narrower version of [surface.GetPanelPaintState](https://wiki.facepunch.com/gmod/surface.GetPanelPaintState).
|
|
199
215
|
*
|
|
@@ -205,6 +221,7 @@ interface SurfaceLib {
|
|
|
205
221
|
* @source https://wiki.facepunch.com/gmod/surface.GetScissorRect
|
|
206
222
|
*/
|
|
207
223
|
GetScissorRect(): (boolean, number, number, number, number);
|
|
224
|
+
|
|
208
225
|
/**
|
|
209
226
|
* Returns the current color affecting text draw operations.
|
|
210
227
|
*
|
|
@@ -213,12 +230,14 @@ interface SurfaceLib {
|
|
|
213
230
|
* @source https://wiki.facepunch.com/gmod/surface.GetTextColor
|
|
214
231
|
*/
|
|
215
232
|
GetTextColor(): Color;
|
|
233
|
+
|
|
216
234
|
/**
|
|
217
235
|
* Returns the X and Y co-ordinate that has been set with [surface.SetTextPos](https://wiki.facepunch.com/gmod/surface.SetTextPos) or changed by [surface.DrawText](https://wiki.facepunch.com/gmod/surface.DrawText).
|
|
218
236
|
* @realm client and menu
|
|
219
237
|
* @source https://wiki.facepunch.com/gmod/surface.GetTextPos
|
|
220
238
|
*/
|
|
221
239
|
GetTextPos(): (number, number);
|
|
240
|
+
|
|
222
241
|
/**
|
|
223
242
|
* Returns the width and height (in pixels) of the given text with the font that has been set with [surface.SetFont](https://wiki.facepunch.com/gmod/surface.SetFont).
|
|
224
243
|
*
|
|
@@ -228,6 +247,7 @@ interface SurfaceLib {
|
|
|
228
247
|
* @source https://wiki.facepunch.com/gmod/surface.GetTextSize
|
|
229
248
|
*/
|
|
230
249
|
GetTextSize(text: string): (number, number);
|
|
250
|
+
|
|
231
251
|
/**
|
|
232
252
|
* Returns the texture id of the material with the given name/path, for use with [surface.SetTexture](https://wiki.facepunch.com/gmod/surface.SetTexture).
|
|
233
253
|
*
|
|
@@ -240,6 +260,7 @@ interface SurfaceLib {
|
|
|
240
260
|
* @source https://wiki.facepunch.com/gmod/surface.GetTextureID
|
|
241
261
|
*/
|
|
242
262
|
GetTextureID(nameOrPath: string): number;
|
|
263
|
+
|
|
243
264
|
/**
|
|
244
265
|
* Returns name/path of texture by ID. Opposite version of this function is [surface.GetTextureID](https://wiki.facepunch.com/gmod/surface.GetTextureID).
|
|
245
266
|
*
|
|
@@ -248,6 +269,7 @@ interface SurfaceLib {
|
|
|
248
269
|
* @source https://wiki.facepunch.com/gmod/surface.GetTextureNameByID
|
|
249
270
|
*/
|
|
250
271
|
GetTextureNameByID(id: number): string;
|
|
272
|
+
|
|
251
273
|
/**
|
|
252
274
|
* Returns the size of the texture with the associated texture ID.
|
|
253
275
|
*
|
|
@@ -257,6 +279,7 @@ interface SurfaceLib {
|
|
|
257
279
|
* @source https://wiki.facepunch.com/gmod/surface.GetTextureSize
|
|
258
280
|
*/
|
|
259
281
|
GetTextureSize(textureID: number): (number, number);
|
|
282
|
+
|
|
260
283
|
/**
|
|
261
284
|
* Play a sound file directly on the client (such as UI sounds, etc).
|
|
262
285
|
*
|
|
@@ -270,6 +293,7 @@ interface SurfaceLib {
|
|
|
270
293
|
* @source https://wiki.facepunch.com/gmod/surface.PlaySound
|
|
271
294
|
*/
|
|
272
295
|
PlaySound(soundfile: string): void;
|
|
296
|
+
|
|
273
297
|
/**
|
|
274
298
|
* Returns the height of the current client's screen.
|
|
275
299
|
*
|
|
@@ -278,6 +302,7 @@ interface SurfaceLib {
|
|
|
278
302
|
* @deprecated You should use Global.ScrH instead.
|
|
279
303
|
*/
|
|
280
304
|
ScreenHeight(): number;
|
|
305
|
+
|
|
281
306
|
/**
|
|
282
307
|
* Returns the width of the current client's screen.
|
|
283
308
|
*
|
|
@@ -286,6 +311,7 @@ interface SurfaceLib {
|
|
|
286
311
|
* @deprecated You should use Global.ScrW instead.
|
|
287
312
|
*/
|
|
288
313
|
ScreenWidth(): number;
|
|
314
|
+
|
|
289
315
|
/**
|
|
290
316
|
* Sets the alpha multiplier that will influence all upcoming drawing operations.
|
|
291
317
|
* See also [render.SetBlend](https://wiki.facepunch.com/gmod/render.SetBlend).
|
|
@@ -294,6 +320,7 @@ interface SurfaceLib {
|
|
|
294
320
|
* @source https://wiki.facepunch.com/gmod/surface.SetAlphaMultiplier
|
|
295
321
|
*/
|
|
296
322
|
SetAlphaMultiplier(multiplier: number): void;
|
|
323
|
+
|
|
297
324
|
/**
|
|
298
325
|
* Set the color of any future shapes to be drawn, can be set by either using R, G, B, A as separate values or by a [Color](https://wiki.facepunch.com/gmod/Color).
|
|
299
326
|
*
|
|
@@ -306,7 +333,9 @@ interface SurfaceLib {
|
|
|
306
333
|
* @source https://wiki.facepunch.com/gmod/surface.SetDrawColor
|
|
307
334
|
*/
|
|
308
335
|
SetDrawColor(r: number, g: number, b: number, a?: number): void;
|
|
336
|
+
|
|
309
337
|
SetDrawColor(color: Color): void;
|
|
338
|
+
|
|
310
339
|
/**
|
|
311
340
|
* Set the current font to be used for text operations later.
|
|
312
341
|
*
|
|
@@ -316,6 +345,7 @@ interface SurfaceLib {
|
|
|
316
345
|
* @source https://wiki.facepunch.com/gmod/surface.SetFont
|
|
317
346
|
*/
|
|
318
347
|
SetFont(fontName: string): void;
|
|
348
|
+
|
|
319
349
|
/**
|
|
320
350
|
* Sets the material to be used in all upcoming draw operations using the surface library.
|
|
321
351
|
*
|
|
@@ -331,6 +361,7 @@ interface SurfaceLib {
|
|
|
331
361
|
* @source https://wiki.facepunch.com/gmod/surface.SetMaterial
|
|
332
362
|
*/
|
|
333
363
|
SetMaterial(material: IMaterial): void;
|
|
364
|
+
|
|
334
365
|
/**
|
|
335
366
|
* Set the color of any future text to be drawn, can be set by either using R, G, B, A as separate numbers or by providing a [Color](https://wiki.facepunch.com/gmod/Color).
|
|
336
367
|
*
|
|
@@ -338,13 +369,16 @@ interface SurfaceLib {
|
|
|
338
369
|
* @source https://wiki.facepunch.com/gmod/surface.SetTextColor
|
|
339
370
|
*/
|
|
340
371
|
SetTextColor(r: number, g: number, b: number, a?: number): void;
|
|
372
|
+
|
|
341
373
|
SetTextColor(color: Color): void;
|
|
374
|
+
|
|
342
375
|
/**
|
|
343
376
|
* Set the top-left position to draw any future text at.
|
|
344
377
|
* @realm client and menu
|
|
345
378
|
* @source https://wiki.facepunch.com/gmod/surface.SetTextPos
|
|
346
379
|
*/
|
|
347
380
|
SetTextPos(x: number, y: number): void;
|
|
381
|
+
|
|
348
382
|
/**
|
|
349
383
|
* Sets the texture to be used in all upcoming draw operations using the surface library.
|
|
350
384
|
*
|
|
@@ -358,38 +392,3 @@ interface SurfaceLib {
|
|
|
358
392
|
*/
|
|
359
393
|
SetTexture(textureID: number): void;
|
|
360
394
|
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
package/types/surfaceinfo.d.tlua
CHANGED
|
@@ -16,12 +16,14 @@ interface SurfaceInfo {
|
|
|
16
16
|
* @source https://wiki.facepunch.com/gmod/SurfaceInfo:GetMaterial
|
|
17
17
|
*/
|
|
18
18
|
GetMaterial(self: SurfaceInfo): IMaterial;
|
|
19
|
+
|
|
19
20
|
/**
|
|
20
21
|
* Returns a list of vertices the brush surface is built from.
|
|
21
22
|
* @realm shared
|
|
22
23
|
* @source https://wiki.facepunch.com/gmod/SurfaceInfo:GetVertices
|
|
23
24
|
*/
|
|
24
25
|
GetVertices(self: SurfaceInfo): Vector[];
|
|
26
|
+
|
|
25
27
|
/**
|
|
26
28
|
* Checks if the brush surface is a nodraw surface, meaning it will not be drawn by the engine.
|
|
27
29
|
*
|
|
@@ -32,6 +34,7 @@ interface SurfaceInfo {
|
|
|
32
34
|
* @source https://wiki.facepunch.com/gmod/SurfaceInfo:IsNoDraw
|
|
33
35
|
*/
|
|
34
36
|
IsNoDraw(self: SurfaceInfo): boolean;
|
|
37
|
+
|
|
35
38
|
/**
|
|
36
39
|
* Checks if the brush surface is displaying the skybox.
|
|
37
40
|
*
|
|
@@ -42,6 +45,7 @@ interface SurfaceInfo {
|
|
|
42
45
|
* @source https://wiki.facepunch.com/gmod/SurfaceInfo:IsSky
|
|
43
46
|
*/
|
|
44
47
|
IsSky(self: SurfaceInfo): boolean;
|
|
48
|
+
|
|
45
49
|
/**
|
|
46
50
|
* Checks if the brush surface is water.
|
|
47
51
|
*
|
|
@@ -53,9 +57,3 @@ interface SurfaceInfo {
|
|
|
53
57
|
*/
|
|
54
58
|
IsWater(self: SurfaceInfo): boolean;
|
|
55
59
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
package/types/system.d.tlua
CHANGED
|
@@ -19,18 +19,21 @@ interface SystemLib {
|
|
|
19
19
|
* @source https://wiki.facepunch.com/gmod/system.AppTime
|
|
20
20
|
*/
|
|
21
21
|
AppTime(): number;
|
|
22
|
+
|
|
22
23
|
/**
|
|
23
24
|
* Returns the current battery power.
|
|
24
25
|
* @realm shared and menu
|
|
25
26
|
* @source https://wiki.facepunch.com/gmod/system.BatteryPower
|
|
26
27
|
*/
|
|
27
28
|
BatteryPower(): number;
|
|
29
|
+
|
|
28
30
|
/**
|
|
29
31
|
* Flashes the window, turning the border to white briefly
|
|
30
32
|
* @realm client and menu
|
|
31
33
|
* @source https://wiki.facepunch.com/gmod/system.FlashWindow
|
|
32
34
|
*/
|
|
33
35
|
FlashWindow(): void;
|
|
36
|
+
|
|
34
37
|
/**
|
|
35
38
|
* Returns the country code of this computer, determined by the IP of the client. Uses the steamworks API function `SteamUtils()->GetIPCountry()`.
|
|
36
39
|
*
|
|
@@ -41,6 +44,7 @@ interface SystemLib {
|
|
|
41
44
|
* @source https://wiki.facepunch.com/gmod/system.GetCountry
|
|
42
45
|
*/
|
|
43
46
|
GetCountry(): string;
|
|
47
|
+
|
|
44
48
|
/**
|
|
45
49
|
* Returns whether or not the game window has focus.
|
|
46
50
|
*
|
|
@@ -51,18 +55,21 @@ interface SystemLib {
|
|
|
51
55
|
* @source https://wiki.facepunch.com/gmod/system.HasFocus
|
|
52
56
|
*/
|
|
53
57
|
HasFocus(): boolean;
|
|
58
|
+
|
|
54
59
|
/**
|
|
55
60
|
* Returns whether the current OS is Linux.
|
|
56
61
|
* @realm shared and menu
|
|
57
62
|
* @source https://wiki.facepunch.com/gmod/system.IsLinux
|
|
58
63
|
*/
|
|
59
64
|
IsLinux(): boolean;
|
|
65
|
+
|
|
60
66
|
/**
|
|
61
67
|
* Returns whether the current OS is OSX.
|
|
62
68
|
* @realm shared and menu
|
|
63
69
|
* @source https://wiki.facepunch.com/gmod/system.IsOSX
|
|
64
70
|
*/
|
|
65
71
|
IsOSX(): boolean;
|
|
72
|
+
|
|
66
73
|
/**
|
|
67
74
|
* Returns whether the game is being run in a window or in fullscreen (you can change this by opening the menu, clicking 'Options', then clicking the 'Video' tab, and changing the Display Mode using the dropdown menu):
|
|
68
75
|
*
|
|
@@ -72,12 +79,14 @@ interface SystemLib {
|
|
|
72
79
|
* @source https://wiki.facepunch.com/gmod/system.IsWindowed
|
|
73
80
|
*/
|
|
74
81
|
IsWindowed(): boolean;
|
|
82
|
+
|
|
75
83
|
/**
|
|
76
84
|
* Returns whether the current OS is Windows.
|
|
77
85
|
* @realm shared and menu
|
|
78
86
|
* @source https://wiki.facepunch.com/gmod/system.IsWindows
|
|
79
87
|
*/
|
|
80
88
|
IsWindows(): boolean;
|
|
89
|
+
|
|
81
90
|
/**
|
|
82
91
|
* Returns the synchronized Steam time. This is the number of seconds since the [Unix epoch](http://en.wikipedia.org/wiki/Unix_time).
|
|
83
92
|
*
|
|
@@ -88,6 +97,7 @@ interface SystemLib {
|
|
|
88
97
|
* @source https://wiki.facepunch.com/gmod/system.SteamTime
|
|
89
98
|
*/
|
|
90
99
|
SteamTime(): number;
|
|
100
|
+
|
|
91
101
|
/**
|
|
92
102
|
* Returns the amount of seconds since the Steam user last moved their mouse.
|
|
93
103
|
*
|
|
@@ -101,14 +111,3 @@ interface SystemLib {
|
|
|
101
111
|
*/
|
|
102
112
|
UpTime(): number;
|
|
103
113
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|