├── .gitattributes
├── .github
└── workflows
│ └── nodejs.yml
├── .gitignore
├── .travis.yml
├── CNAME
├── Gemfile
├── README.md
├── __data
├── css_properties.json
├── events.json
├── lua_client.json
├── lua_client_enums.json
├── lua_server.json
└── lua_server_enums.json
├── _config.yml
├── _data
├── css_properties.json
├── events.json
├── lua_bots.json
├── lua_bots_enums.json
├── lua_client.json
├── lua_client_enums.json
├── lua_server.json
├── lua_server_enums.json
├── modifiers.json
├── override_lua_bots.json
├── override_lua_server.json
└── panorama_enums.json
├── declarations
├── panorama
│ └── README.md
└── server
│ └── README.md
├── dump
├── cl_script_help2.lua
├── dump_panorama_css_properties.md
├── dump_panorama_events.md
└── script_help2.lua
├── examples
└── vscript
│ ├── addon_game_mode.js
│ ├── addon_game_mode.lua
│ ├── addon_game_mode.ts
│ ├── declarations
│ ├── dota-api.d.ts
│ ├── dota-enums.d.ts
│ ├── dota-gameevents.d.ts
│ ├── dota-modifier-properties.d.ts
│ └── dota-std.d.ts
│ ├── lib
│ ├── lib-typescript.d.ts
│ └── typescript.lua
│ ├── modifiers
│ ├── modifier_panic.js
│ ├── modifier_panic.lua
│ └── modifier_panic.ts
│ └── tsconfig.json
├── gen
├── DefinitionGenerator.py
├── enumdump.js
├── enumdump.ts
└── tsconfig.json
├── images
├── bg_hr.png
├── blacktocat.png
├── icon_download.png
└── sprite_download.png
├── index.md
├── javascripts
└── main.js
├── lua_bots.md
├── lua_bots_docs.md
├── lua_bots_enums.md
├── lua_server.md
├── lua_server_declaration.md
├── lua_server_docs.md
├── lua_server_editor.html
├── lua_server_enums.md
├── lua_server_enums_declaration.md
├── lua_server_enums_docs.md
├── override_validate
├── override_validate.js
├── override_validate.ts
├── package.json
├── tsconfig.json
└── yarn.lock
├── panorama_enums.md
├── params.json
├── stylesheets
├── github-light.css
└── stylesheet.css
└── tsconfig.json
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js binary
--------------------------------------------------------------------------------
/.github/workflows/nodejs.yml:
--------------------------------------------------------------------------------
1 | name: Node CI
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | build:
7 |
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - uses: actions/checkout@v1
12 |
13 | - name: Use Node.js
14 | uses: actions/setup-node@v1
15 | with:
16 | node-version: 12.X
17 |
18 | - name: npm install, build, and test
19 | working-directory: ./override_validate
20 | run: |
21 | yarn
22 | yarn test
23 | env:
24 | CI: true
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | panorama/.vscode/
2 | Thumbs.db
3 | .idea/
4 |
5 | _site/
6 | .sass-cache/
7 | Gemfile.lock
8 | node_modules
9 | build
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: ruby
2 | rvm:
3 | - 2.1
4 | cache: bundler
5 | script: "bundle exec jekyll build"
6 |
--------------------------------------------------------------------------------
/CNAME:
--------------------------------------------------------------------------------
1 | docs.moddota.com
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'github-pages'
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # API
2 | This repository aims to document the different interfaces relevant to Dota 2 Modding. It uses these to render http://docs.moddota.com/ and provides a repository for TypeScript declarations to be used for Panorama UI or with [TypescriptToLua](https://github.com/Perryvw/TypescriptToLua) for game code.
3 |
4 | ## File Structure
5 | ### /_data
6 | Contains raw dumps from the engine
7 |
8 | ### /declarations/panorama/
9 | TypeScript declarations for Panorama.
10 | * **dota.d.ts** Declarations for interfacing with the game engine.
11 | * **dota_enums.d.ts** Declarations for enumerations used in Panorama.
12 | * **dota_panels.d.ts** Declarations for Panel interaction in Panorama.
13 |
14 | ### /declarations/server/
15 | TypeScript declarations for the lua API (see [TypescriptToLua](https://github.com/Perryvw/TypescriptToLua)).
16 | * **dota-api.d.ts** Declarations for the Lua API.
17 | * **dota-enums.d.ts** Declarations of Lua enums.
18 | * **dota-gameevents.d.ts** Declarations of the different game events and their event contents.
19 | * **dota-modifier-properties.d.ts** Declarations for modifier properties on Lua modifiers.
20 | * **dota-std.d.ts** Lua std functions used for Dota modding.
21 |
22 | ### /examples/vscript/
23 | Example TypeScript code.
24 |
--------------------------------------------------------------------------------
/__data/events.json:
--------------------------------------------------------------------------------
1 | {
2 | "AddStyle": {
3 | "description": "Add a CSS class to a panel.",
4 | "panelEvent": true,
5 | "args": [
6 | {
7 | "name": "class",
8 | "type": "string"
9 | }
10 | ]
11 | },
12 | "AddStyleAfterDelay": {
13 | "description": "Add a CSS class to a panel after a specified delay. ",
14 | "panelEvent": true,
15 | "args": [
16 | {
17 | "name": "class",
18 | "type": "string"
19 | },
20 | {
21 | "name": "pre-delay",
22 | "type": "float"
23 | }
24 | ]
25 | },
26 | "AddStyleToEachChild": {
27 | "description": "Add a CSS class to all children of this panel.",
28 | "panelEvent": true,
29 | "args": [
30 | {
31 | "name": "class",
32 | "type": "string"
33 | }
34 | ]
35 | },
36 | "AddTimedStyle": {
37 | "description": "Add a class for a specified duration, with optional pre-delay; clears existing timers when called with same class. ",
38 | "panelEvent": true,
39 | "args": [
40 | {
41 | "name": "class",
42 | "type": "string"
43 | },
44 | {
45 | "name": "duration",
46 | "type": "float"
47 | },
48 | {
49 | "name": "pre-delay",
50 | "type": "float"
51 | }
52 | ]
53 | },
54 | "AsyncEvent": {
55 | "description": "Fire another event after a delay (in seconds).",
56 | "panelEvent": false,
57 | "args": [
58 | {
59 | "name": "delay",
60 | "type": "float"
61 | },
62 | {
63 | "name": "eventToFire",
64 | "type": "event"
65 | }
66 | ]
67 | },
68 | "DOTAHideAbilityTooltip": {
69 | "description": "Hide the ability tooltip",
70 | "panelEvent": true,
71 | "args": []
72 | },
73 | "DOTAHideBuffTooltip": {
74 | "description": "Hide the buff tooltip",
75 | "panelEvent": true,
76 | "args": []
77 | },
78 | "DOTAHideDroppedItemTooltip": {
79 | "description": "Hide the dropped item tooltip",
80 | "panelEvent": true,
81 | "args": []
82 | },
83 | "DOTAHideEconItemTooltip": {
84 | "description": "Hide the econ item tooltip.",
85 | "panelEvent": true,
86 | "args": []
87 | },
88 | "DOTAHideProfileCardBattleCupTooltip": {
89 | "description": "Hide the profile card / battle cup tooltip.",
90 | "panelEvent": true,
91 | "args": []
92 | },
93 | "DOTAHideProfileCardTooltip": {
94 | "description": "Hide the profile card tooltip.",
95 | "panelEvent": true,
96 | "args": []
97 | },
98 | "DOTAHideRankTierTooltip": {
99 | "description": "Hide the rank tier tooltip.",
100 | "panelEvent": true,
101 | "args": []
102 | },
103 | "DOTAHideRuneTooltip": {
104 | "description": "Hide the rune tooltip",
105 | "panelEvent": true,
106 | "args": []
107 | },
108 | "DOTAHideTextTooltip": {
109 | "description": "Hide the text tooltip",
110 | "panelEvent": true,
111 | "args": []
112 | },
113 | "DOTAHideTitleImageTextTooltip": {
114 | "description": "Hide the title image text tooltip.",
115 | "panelEvent": true,
116 | "args": []
117 | },
118 | "DOTAHideTitleTextTooltip": {
119 | "description": "Hide the title text tooltip.",
120 | "panelEvent": true,
121 | "args": []
122 | },
123 | "DOTAShowAbilityInventoryItemTooltip": {
124 | "description": "Show tooltip for an item in the entityIndex NPC's inventory.",
125 | "panelEvent": true,
126 | "args": [
127 | {
128 | "name": "entityIndex",
129 | "type": "int32"
130 | },
131 | {
132 | "name": "inventorySlot",
133 | "type": "int32"
134 | }
135 | ]
136 | },
137 | "DOTAShowAbilityShopItemTooltip": {
138 | "description": "Show tooltip for an item in the entityIndex NPC's shop.",
139 | "panelEvent": true,
140 | "args": [
141 | {
142 | "name": "abilityName",
143 | "type": "string"
144 | },
145 | {
146 | "name": "guideName",
147 | "type": "string"
148 | },
149 | {
150 | "name": "entityIndex",
151 | "type": "int32"
152 | }
153 | ]
154 | },
155 | "DOTAShowAbilityTooltip": {
156 | "description": "Show an ability tooltip.",
157 | "panelEvent": true,
158 | "args": [
159 | {
160 | "name": "abilityName",
161 | "type": "string"
162 | }
163 | ]
164 | },
165 | "DOTAShowAbilityTooltipForEntityIndex": {
166 | "description": "Show an ability tooltip. Level information comes from the entity specified by the entityIndex.",
167 | "panelEvent": true,
168 | "args": [
169 | {
170 | "name": "abilityName",
171 | "type": "string"
172 | },
173 | {
174 | "name": "entityIndex",
175 | "type": "int32"
176 | }
177 | ]
178 | },
179 | "DOTAShowAbilityTooltipForGuide": {
180 | "description": "Show an ability tooltip annotated with a particular guide's info.",
181 | "panelEvent": true,
182 | "args": [
183 | {
184 | "name": "abilityName",
185 | "type": "string"
186 | },
187 | {
188 | "name": "guideName",
189 | "type": "string"
190 | }
191 | ]
192 | },
193 | "DOTAShowAbilityTooltipForHero": {
194 | "description": "Show an ability tooltip for the specified hero.",
195 | "panelEvent": true,
196 | "args": [
197 | {
198 | "name": "abilityName",
199 | "type": "string"
200 | },
201 | {
202 | "name": "heroid",
203 | "type": "int32"
204 | },
205 | {
206 | "name": "bool",
207 | "type": "boo"
208 | }
209 | ]
210 | },
211 | "DOTAShowAbilityTooltipForLevel": {
212 | "description": "Show an ability tooltip for a specific level.",
213 | "panelEvent": true,
214 | "args": [
215 | {
216 | "name": "abilityName",
217 | "type": "string"
218 | },
219 | {
220 | "name": "int32",
221 | "type": "int3"
222 | }
223 | ]
224 | },
225 | "DOTAShowBuffTooltip": {
226 | "description": "Show a buff tooltip for the specified entityIndex + buff serial.",
227 | "panelEvent": true,
228 | "args": [
229 | {
230 | "name": "entityIndex",
231 | "type": "int32"
232 | },
233 | {
234 | "name": "buffSerial",
235 | "type": "int32"
236 | },
237 | {
238 | "name": "bOnEnemy",
239 | "type": "bool"
240 | }
241 | ]
242 | },
243 | "DOTAShowEconItemTooltip": {
244 | "description": "Show the econ item tooltip for a given item, style, and hero. Use 0 for the default style, and -1 for the default hero.",
245 | "panelEvent": true,
246 | "args": [
247 | {
248 | "name": "itemDef",
249 | "type": "class item_definition_index_t"
250 | },
251 | {
252 | "name": "styleIndex",
253 | "type": "class style_index_t"
254 | },
255 | {
256 | "name": "heroID",
257 | "type": "int32"
258 | }
259 | ]
260 | }
261 | }
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | title: ModDota API Documentation
2 | description: > # this means to ignore newlines until "baseurl:"
3 | A Project by ModDota to have automated documenation
4 | of all aspects of Custom Games, with more coming over time.
5 | markdown: kramdown
6 | theme: minima
7 | gems:
8 | - jekyll-feed
--------------------------------------------------------------------------------
/_data/events.json:
--------------------------------------------------------------------------------
1 | {
2 | "AddStyle": {
3 | "description": "Add a CSS class to a panel.",
4 | "panelEvent": true,
5 | "args": [
6 | {
7 | "name": "class",
8 | "type": "panoramasymbol"
9 | }
10 | ]
11 | },
12 | "AddStyleAfterDelay": {
13 | "description": "Add a CSS class to a panel after a specified delay. ",
14 | "panelEvent": true,
15 | "args": [
16 | {
17 | "name": "class",
18 | "type": "panoramasymbol"
19 | },
20 | {
21 | "name": "pre-delay",
22 | "type": "float"
23 | }
24 | ]
25 | },
26 | "AddStyleToEachChild": {
27 | "description": "Add a CSS class to all children of this panel.",
28 | "panelEvent": true,
29 | "args": [
30 | {
31 | "name": "class",
32 | "type": "panoramasymbol"
33 | }
34 | ]
35 | },
36 | "AddTimedStyle": {
37 | "description": "Add a class for a specified duration, with optional pre-delay; clears existing timers when called with same class. ",
38 | "panelEvent": true,
39 | "args": [
40 | {
41 | "name": "class",
42 | "type": "panoramasymbol"
43 | },
44 | {
45 | "name": "duration",
46 | "type": "float"
47 | },
48 | {
49 | "name": "pre-delay",
50 | "type": "float"
51 | }
52 | ]
53 | },
54 | "AsyncEvent": {
55 | "description": "Fire another event after a delay (in seconds).",
56 | "panelEvent": false,
57 | "args": [
58 | {
59 | "name": "delay",
60 | "type": "float"
61 | },
62 | {
63 | "name": "eventToFire",
64 | "type": "event"
65 | }
66 | ]
67 | },
68 | "DOTADisplayDashboardTip": {
69 | "description": "Tip to display, panel to attach to (default 'DefaultTipAttachment')",
70 | "panelEvent": false,
71 | "args": [
72 | {
73 | "name": "string",
74 | "type": "string"
75 | },
76 | {
77 | "name": "string",
78 | "type": "string optional"
79 | }
80 | ]
81 | },
82 | "DOTAHideAbilityTooltip": {
83 | "description": "Hide the ability tooltip",
84 | "panelEvent": true,
85 | "args": []
86 | },
87 | "DOTAHideBuffTooltip": {
88 | "description": "Hide the buff tooltip",
89 | "panelEvent": true,
90 | "args": []
91 | },
92 | "DOTAHideDroppedItemTooltip": {
93 | "description": "Hide the dropped item tooltip",
94 | "panelEvent": true,
95 | "args": []
96 | },
97 | "DOTAHideEconItemTooltip": {
98 | "description": "Hide the econ item tooltip.",
99 | "panelEvent": true,
100 | "args": []
101 | },
102 | "DOTAHideProfileCardBattleCupTooltip": {
103 | "description": "Hide the profile card / battle cup tooltip.",
104 | "panelEvent": true,
105 | "args": []
106 | },
107 | "DOTAHideProfileCardTooltip": {
108 | "description": "Hide the profile card tooltip.",
109 | "panelEvent": true,
110 | "args": []
111 | },
112 | "DOTAHideRankTierTooltip": {
113 | "description": "Hide the rank tier tooltip.",
114 | "panelEvent": true,
115 | "args": []
116 | },
117 | "DOTAHideRuneTooltip": {
118 | "description": "Hide the rune tooltip",
119 | "panelEvent": true,
120 | "args": []
121 | },
122 | "DOTAHideTextTooltip": {
123 | "description": "Hide the text tooltip",
124 | "panelEvent": true,
125 | "args": []
126 | },
127 | "DOTAHideTI10EventGameTooltip": {
128 | "description": "Hide the ti10 event game tooltip",
129 | "panelEvent": true,
130 | "args": []
131 | },
132 | "DOTAHideTitleImageTextTooltip": {
133 | "description": "Hide the title image text tooltip.",
134 | "panelEvent": true,
135 | "args": []
136 | },
137 | "DOTAHideTitleTextTooltip": {
138 | "description": "Hide the title text tooltip.",
139 | "panelEvent": true,
140 | "args": []
141 | },
142 | "DOTALiveStreamUpcoming": {
143 | "description": "Notify change in RTime32 we expect the stream to start",
144 | "panelEvent": true,
145 | "args": [
146 | {
147 | "name": "time",
148 | "type": "uint32"
149 | }
150 | ]
151 | },
152 | "DOTALiveStreamVideoLive": {
153 | "description": "Notify change in stream state (we detected the stream going live)",
154 | "panelEvent": true,
155 | "args": [
156 | {
157 | "name": "isLive",
158 | "type": "bool"
159 | }
160 | ]
161 | },
162 | "DOTALiveStreamVideoPlaying": {
163 | "description": "Notify change in video state (is it pointing at a live stream page or not)",
164 | "panelEvent": true,
165 | "args": [
166 | {
167 | "name": "isShowingVideo",
168 | "type": "bool"
169 | }
170 | ]
171 | },
172 | "DOTAShowAbilityInventoryItemTooltip": {
173 | "description": "Show tooltip for an item in the entityIndex NPC's inventory.",
174 | "panelEvent": true,
175 | "args": [
176 | {
177 | "name": "entityIndex",
178 | "type": "int32"
179 | },
180 | {
181 | "name": "inventorySlot",
182 | "type": "int32"
183 | }
184 | ]
185 | },
186 | "DOTAShowAbilityShopItemTooltip": {
187 | "description": "Show tooltip for an item in the entityIndex NPC's shop.",
188 | "panelEvent": true,
189 | "args": [
190 | {
191 | "name": "abilityName",
192 | "type": "string"
193 | },
194 | {
195 | "name": "guideName",
196 | "type": "string"
197 | },
198 | {
199 | "name": "entityIndex",
200 | "type": "int32"
201 | }
202 | ]
203 | },
204 | "DOTAShowAbilityTooltip": {
205 | "description": "Show an ability tooltip.",
206 | "panelEvent": true,
207 | "args": [
208 | {
209 | "name": "abilityName",
210 | "type": "string"
211 | }
212 | ]
213 | },
214 | "DOTAShowAbilityTooltipForEntityIndex": {
215 | "description": "Show an ability tooltip. Level information comes from the entity specified by the entityIndex.",
216 | "panelEvent": true,
217 | "args": [
218 | {
219 | "name": "abilityName",
220 | "type": "string"
221 | },
222 | {
223 | "name": "entityIndex",
224 | "type": "int32"
225 | }
226 | ]
227 | },
228 | "DOTAShowAbilityTooltipForGuide": {
229 | "description": "Show an ability tooltip annotated with a particular guide's info.",
230 | "panelEvent": true,
231 | "args": [
232 | {
233 | "name": "abilityName",
234 | "type": "string"
235 | },
236 | {
237 | "name": "guideName",
238 | "type": "string"
239 | }
240 | ]
241 | },
242 | "DOTAShowAbilityTooltipForHero": {
243 | "description": "Show an ability tooltip for the specified hero.",
244 | "panelEvent": true,
245 | "args": [
246 | {
247 | "name": "abilityName",
248 | "type": "string"
249 | },
250 | {
251 | "name": "heroid",
252 | "type": "int32"
253 | },
254 | {
255 | "name": "bool",
256 | "type": "boo"
257 | }
258 | ]
259 | }
260 | }
--------------------------------------------------------------------------------
/_data/override_lua_bots.json:
--------------------------------------------------------------------------------
1 | {
2 | "Global": {
3 | "functions": {
4 | "GetHeroLevel": {
5 | "arg_names": [
6 | "nPlayerID"
7 | ]
8 | }
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/declarations/panorama/README.md:
--------------------------------------------------------------------------------
1 | ### Declarations have moved!
2 |
3 | Up-to-date declarations at https://github.com/ModDota/TypescriptPanoramaDeclarations
4 |
--------------------------------------------------------------------------------
/declarations/server/README.md:
--------------------------------------------------------------------------------
1 | ### Declarations have moved!
2 |
3 | Up-to-date declarations at https://github.com/TypeScriptToLua/Dota2Declarations
4 |
5 |
--------------------------------------------------------------------------------
/dump/dump_panorama_css_properties.md:
--------------------------------------------------------------------------------
1 | === -s2-mix-blend-mode ===
2 | Controls blending mode for the panel. See CSS mix-blend-mode docs on web, except normal for us is with alpha blending.
Examples:
-s2-mix-blend-mode: normal; 3 | -s2-mix-blend-mode: multiply; 4 | -s2-mix-blend-mode: screen;5 | 6 | 7 | === align === 8 | <Needs a description> 9 | 10 | 11 | === animation === 12 | <Needs a description> 13 | 14 | 15 | === animation-delay === 16 | <Needs a description> 17 | 18 | 19 | === animation-direction === 20 | <Needs a description> 21 | 22 | 23 | === animation-duration === 24 | <Needs a description> 25 | 26 | 27 | === animation-iteration-count === 28 | <Needs a description> 29 | 30 | 31 | === animation-name === 32 | <Needs a description> 33 | 34 | 35 | === animation-timing-function === 36 | <Needs a description> 37 | 38 | 39 | === background-color === 40 | Sets the background fill color/gradient/combination for a panel.
background-color: #FFFFFFFF; 41 | background-color: gradient( linear, 0% 0%, 0% 100%, from( #fbfbfbff ), to( #c0c0c0c0 ) ); 42 | background-color: gradient( linear, 0% 0%, 0% 100%, from( #fbfbfbff ), color-stop( 0.3, #ebebebff ), to( #c0c0c0c0 ) ); 43 | background-color: gradient( radial, 50% 50%, 0% 0%, 80% 80%, from( #00ff00ff ), to( #0000ffff ) ); 44 | background-color: #0d1c22ff, gradient( radial, 100% -0%, 100px -40px, 320% 270%, from( #3a464bff ), color-stop( 0.23, #0d1c22ff ), to( #0d1c22ff ) );45 | 46 | 47 | === background-image === 48 | Comma separated list of images or movies to draw in the background. Can specify "none" to not draw a background layer. Combined with background-position, background-size and background-repeat values.
background-image: url("file://{images}/default.tga"), url( "file://{movies}/Background1080p.webm" );49 | 50 | 51 | === background-position === 52 | Controls the horizontal and vertical placement of the background image, with the format: <left|center|right> <horizontal length> <top|center|bottom> <vertical length>
// aligns the top left corner of the image with the top left corner of the panel (default) 53 | background-position: 0% 0%; 54 | 55 | // centers the image within the background (same as "center center") 56 | background-position: center; 57 | 58 | // aligns the bottom right corner of the image with the bottom right corner of the panel (same as "100% 100%") 59 | background-position: right bottom; 60 | 61 | // the top left corner of the image is placed 10px to the right of, 40px below the top left corner of the panel 62 | background-position: left 10px top 40px;63 | 64 | 65 | === background-repeat === 66 | Controls if the background should be repeated in the horizontal and vertical directions.
background-repeat: repeat; // equals "repeat repeat" (default) 67 | background-repeat: repeat space; // repeats horizontally, spaces vertically 68 | background-repeat: no-repeat round; // 1 column of images, scaled to fit evenly69 | 70 | 71 | === background-size === 72 | Sets the horizontal and vertical dimensions used to draw the background image. Can be set in pixels, percent, "contains" to size down to panel dimensions or "auto" preserves the image aspect ratio. By default, set to "auto" which preveres the image's original size.
background-size: auto; // same as "auto auto" (default) 73 | background-size: 100% 100%; // image fills the panel 74 | background-size: 50% 75%; // image fills 50% of the panel's width, and 75% of the panel's height 75 | background-size: 300px 200px; // image is drawn 300px wide, 200px tall76 | 77 | 78 | === blur === 79 | Sets the amount of blur to apply to the panel and all it's children during composition. Default is no blur, for now Gaussian is the only blur type and takes a horizontal standard deviation, vertical standard deviation, and number of passes. Good std deviation values are around 0-10, if 10 is still not intense enough consider more passes, but more than one pass is bad for perf. As shorthand you can specify with just one value, which will be used for the standard deviation in both directions and 1 pass will be set.
blur: gaussian( 2.5 ); 80 | blur: gaussian( 6, 6, 1 );81 | 82 | 83 | === border === 84 | Shorthand for setting panel border. Specify width, style, and color. Supported styles are: solid, none.
border: 2px solid #111111FF;85 | 86 | 87 | === border-bottom === 88 | Shorthand for setting the bottom panel border. Specify width, style, and color. Supported styles are: solid, none.
border-bottom: 2px solid #111111FF;89 | 90 | 91 | === border-bottom-color === 92 | Specifies border color for the bottom edge of the panel.
border-bottom-color: #111111FF;93 | 94 | 95 | === border-bottom-left-radius === 96 | Specifies border-radius for bottom-left corner which rounds off border and clips background/foreground content to rounded edge. Takes 1 or 2 values in px or %, first value is horizontal radii for elliptical corner, second is vertical radii, if only one is specified then horizontal/vertical will both be set and corner will be circular.
border-bottom-left-radius: 2px 2px; 97 | border-bottom-left-radius: 5%;98 | 99 | 100 | === border-bottom-right-radius === 101 | Specifies border-radius for bottom-right corner which rounds off border and clips background/foreground content to rounded edge. Takes 1 or 2 values in px or %, first value is horizontal radii for elliptical corner, second is vertical radii, if only one is specified then horizontal/vertical will both be set and corner will be circular.
border-bottom-right-radius: 2px 2px; 102 | border-bottom-right-radius: 5%;103 | 104 | 105 | === border-bottom-style === 106 | Specifies border style for the bottom edge of the panel.
border-bottom-style: solid;107 | 108 | 109 | === border-bottom-width === 110 | Specifies border width for the bottom edge of the panel.
border-bottom-width: 2px;111 | 112 | 113 | === border-color === 114 | Specifies border color for panel. If a single color value is set it applies to all sides, if 2 are set the first is top/bottom and the second is left/right, if all four are set then they are top, right, bottom, left in order.
border-color: #111111FF; 115 | border-color: #FF0000FF #00FF00FF #0000FFFF #00FFFFFF;116 | 117 | 118 | === border-left === 119 | Shorthand for setting the left panel border. Specify width, style, and color. Supported styles are: solid, none.
border-left: 2px solid #111111FF;120 | 121 | 122 | === border-left-color === 123 | Specifies border color for the left edge of the panel.
border-left-color: #111111FF;124 | 125 | 126 | === border-left-style === 127 | Specifies border style for the left edge of the panel.
border-left-style: solid;128 | 129 | 130 | === border-left-width === 131 | Specifies border width for the left edge of the panel.
border-left-width: 2px;132 | 133 | 134 | === border-radius === 135 | Shorthand to set border radius for all corners at once. Border radius rounds off corners of the panel, adjusting the border to smoothly round and also clipping background image/color and contents to the specified elliptical or circular values. In this shorthand version you may specify a single value for all raddi, or horizontal / vertical separated by the '/' character. For both horizontal and vertical you may specify 1 to 4 values in pixels or %, they will be taken in order as top-left, top-right, bottom-right, bottom-left radii values.
// 2 px circular corners on all sides 136 | border-radius: 2px; 137 | // Perfect circular or elliptical panel (circular if box was square) 138 | border-radius: 50% / 50%; 139 | // 2 px horizontal radii 4px vertical elliptical corners on all sides 140 | border-radius: 2px / 4px; 141 | // All corners fully specified 142 | border-radius: 2px 3px 4px 2px / 2px 3px 3px 2px;143 | 144 | 145 | === border-right === 146 | Shorthand for setting the right panel border. Specify width, style, and color. Supported styles are: solid, none.
border-right: 2px solid #111111FF;147 | 148 | 149 | === border-right-color === 150 | Specifies border color for the right edge of the panel.
border-right-color: #111111FF;151 | 152 | 153 | === border-right-style === 154 | Specifies border style for the right edge of the panel.
border-right-style: solid;155 | 156 | 157 | === border-right-width === 158 | Specifies border width for the right edge of the panel.
border-right-width: 2px;159 | 160 | 161 | === border-style === 162 | Specifies border style for panel. If a single style value is set it applies to all sides, if 2 are set the first is top/bottom and the second is left/right, if all four are set then they are top, right, bottom, left in order.
border-style: solid; 163 | border-style: solid none solid none;164 | 165 | 166 | === border-top === 167 | Shorthand for setting the top panel border. Specify width, style, and color. Supported styles are: solid, none.
border-top: 2px solid #111111FF;168 | 169 | 170 | === border-top-color === 171 | Specifies border color for the top edge of the panel.
border-top-color: #111111FF;172 | 173 | 174 | === border-top-left-radius === 175 | Specifies border-radius for top-left corner which rounds off border and clips background/foreground content to rounded edge. Takes 1 or 2 values in px or %, first value is horizontal radii for elliptical corner, second is vertical radii, if only one is specified then horizontal/vertical will both be set and corner will be circular.
border-top-left-radius: 2px 2px; 176 | border-top-left-radius: 5%;177 | 178 | 179 | === border-top-right-radius === 180 | Specifies border-radius for top-right corner which rounds off border and clips background/foreground content to rounded edge. Takes 1 or 2 values in px or %, first value is horizontal radii for elliptical corner, second is vertical radii, if only one is specified then horizontal/vertical will both be set and corner will be circular.
border-top-right-radius: 2px 2px; 181 | border-top-right-radius: 5%;182 | 183 | 184 | === border-top-style === 185 | Specifies border style for the top edge of the panel.
border-top-style: solid;186 | 187 | 188 | === border-top-width === 189 | Specifies border width for the top edge of the panel.
border-top-width: 2px;190 | 191 | 192 | === border-width === 193 | Specifies border width for panel. If a single width value is set it applies to all sides, if 2 are set the first is top/bottom and the second is left/right, if all four are set then they are top, right, bottom, left in order.
border-width: 1px;' 194 | border-width: 20px 1px 20px 1px;195 | 196 | 197 | === box-shadow === 198 | Specifies outer shadows for boxes, or inset shadows/glows. The shadow shape will match the border box for the panel,so use border-radius to affect rounding. Syntax takes optional 'inset', optional 'fill' then color, and then horizontal offset pixels, vertical offset pixels, blur radius pixels, and spread distance in pixels. Inset means the shadow is an inner shadow/glow, fill is validonly on outer shadows and means draw the shadow behind the entire box, not clipping it to outside the border area only.
box-shadow: #ffffff80 4px 4px 8px 0px; // outer 199 | box-shadow: fill #ffffff80 4px 4px 8px 0px; // outer, filled 200 | box-shadow: inset #333333b0 0px 0px 8px 12px; // inner201 | 202 | 203 | === brightness === 204 | Sets the brightness that applies to the panel and all it's children during composition. The value is a multiplier on the HSB brightness value.
brightness: 1.5;205 | 206 | 207 | === clip === 208 | Specifies a clip region within the panel, where contents will be clipped at render time. This clipping has no impact on layout, and is fast and supported for transitions/animations. Radial clip mode takes a center point, start angle and angular width of the revealed sector.
clip: rect( 10%, 90%, 90%, 10% );clip: radial( 50% %50, 0deg, 90deg );209 | 210 | 211 | === color === 212 | Sets the foreground fill color/gradient/combination for a panel. This color is the color used to render text within the panel.
color: #FFFFFFFF; 213 | color: gradient( linear, 0% 0%, 0% 100%, from( #cbcbcbff ), to( #a0a0a0a0 ) );214 | 215 | 216 | === context-menu-arrow-position === 217 | Specifies where to point the arrow of a context menu at on this panel. The first value controls how the arrow is positioned horizontally when the context menu is to the top or bottom of the panel, and the second value controls how the arrow is positioned vertically when the context menu is to the left or right of the panel. Default is '50% 50%'.
context-menu-arrow-position: 25% 50%;218 | 219 | 220 | === context-menu-body-position === 221 | Specifies where to position the body of a context menu relative to this panel. The first value controls how the body is aligned horizontally when the context menu is to the top or bottom of the panel, and the second value controls how the body is aligned vertically when the context menu is to the left or right of the panel. 0% means left/top aligned, 50% means center/middle aligned, and 100% means right/bottom aligned. Default is '0% 0%'.
context-menu-body-position: 50% 100%;222 | 223 | 224 | === context-menu-position === 225 | Specifies where to position a context menu relative to this panel. Valid options include 'left', 'top', 'right', and 'bottom'. List up to 4 positions to determine the order that positions are tried if the context menu doesn't fully fit on screen. Default is 'right left bottom top'. If less than 4 positions are specified, the context menu first tries the opposite of the specified position along the same axis before switching to the other axis.
context-menu-position: bottom; 226 | context-menu-position: left bottom;227 | 228 | 229 | === contrast === 230 | Sets the contrast that applies to the panel and all it's children during composition.
contrast: 1.5;231 | 232 | 233 | === flow-children === 234 | <Needs a description> 235 | 236 | 237 | === font === 238 | <Needs a description> 239 | 240 | 241 | === font-family === 242 | Specifies the font face to use.
font-family: Arial; 243 | font-family: "Comic Sans MS";244 | 245 | 246 | === font-size === 247 | Specifies the target font face height in pixels.
font-size: 12;248 | 249 | 250 | === font-style === 251 | Specifies the font style to use. Supported values are normal, and italic
font-style: normal;252 | 253 | 254 | === font-weight === 255 | Specifies the font weight to use. Supported values are light, thin, normal, medium, bold, and black.
font-weight: normal; 256 | font-weight: bold; 257 | font-weight: thin;258 | 259 | 260 | === height === 261 | Sets the height for this panel. Possible values:
hue-rotation: 180deg;270 | 271 | 272 | === letter-spacing === 273 | Sets letter-spacing for text in a string. Possible values:
line-height: 20px;278 | 279 | 280 | === margin === 281 | <Needs a description> 282 | 283 | 284 | === margin-bottom === 285 | <Needs a description> 286 | 287 | 288 | === margin-left === 289 | <Needs a description> 290 | 291 | 292 | === margin-right === 293 | <Needs a description> 294 | 295 | 296 | === margin-top === 297 | <Needs a description> 298 | 299 | 300 | === max-height === 301 | <Needs a description> 302 | 303 | 304 | === max-width === 305 | <Needs a description> 306 | 307 | 308 | === min-height === 309 | <Needs a description> 310 | 311 | 312 | === min-width === 313 | <Needs a description> 314 | 315 | 316 | === opacity === 317 | Sets the opacity or amount of transparency applied to the panel and all it's children during composition. Default of 1.0 means fully opaque, 0.0 means fully transparent.
opacity: 0.8;318 | 319 | 320 | === opacity-mask === 321 | Applies an image as an opacity mask that stretches to the panel bounds and fades out it's content based on the alpha channel. The second float value is an optional opacity value for the mask itself, the image won't interpolate/cross-fade, but you can animate the opacity to fade the mask in/out. The -scroll-up, -scroll-down, and -scroll-up-down varients override the mask and apply only when the various vertical scroll scenarios affect the panel based on the overflow property.
opacity-mask: url( "file://{images}/upper_row_mask.tga" ); 322 | opacity-mask: url( "file://{images}/upper_row_mask.tga" ) 0.5; 323 | opacity-mask-scroll-up: url( "file://{images}/upper_row_mask_up.tga" ) 0.5; 324 | opacity-mask-scroll-down: url( "file://{images}/upper_row_mask_down.tga" ) 0.5; 325 | opacity-mask-scroll-up-down: url( "file://{images}/upper_row_mask_up_down.tga" ) 0.5;326 | 327 | 328 | === opacity-mask-scroll-down === 329 | 330 | 331 | 332 | === opacity-mask-scroll-up === 333 | 334 | 335 | 336 | === opacity-mask-scroll-up-down === 337 | 338 | 339 | 340 | === overflow === 341 | Specifies what to do with contents that overflow the available space for the panel. Possible values:
overflow: squish squish; // squishes contents in horizontal and vertical directions 342 | overflow: squish scroll; // scrolls contents in the Y direction343 | 344 | 345 | === padding === 346 | <Needs a description> 347 | 348 | 349 | === padding-bottom === 350 | <Needs a description> 351 | 352 | 353 | === padding-left === 354 | <Needs a description> 355 | 356 | 357 | === padding-right === 358 | <Needs a description> 359 | 360 | 361 | === padding-top === 362 | <Needs a description> 363 | 364 | 365 | === perspective === 366 | Sets the perspective depth space available for children of the panel. Default of 1000 would mean that children at 1000px zpos are right at the viewers eye, -1000px are just out of view distance faded to nothing.
perspective: 1000;367 | 368 | 369 | === perspective-origin === 370 | Sets the perspective origin which will be used when transforming children of this panel. This can be thought of as the camera x/y position relative to the panel.
perspective-origin: 50% 50%;371 | 372 | 373 | === position === 374 | Sets the x, y, z position for a panel. Must not be in a flowing layout.
position: 3% 20px 0px;375 | 376 | 377 | === pre-transform-rotate2d === 378 | Sets 2 dimensional rotation degrees that apply to the quad for this panel prior to 3 dimensional transforms. This rotation applies without perspective and leaves the panel centered at the same spot as it started.
pre-transform-rotate2d: 45deg;379 | 380 | 381 | === pre-transform-scale2d === 382 | Sets 2 dimensional X/Y scale factors that apply to the quad for this panel prior to 3 dimensional transforms. This scaling applies without perspective and leaves the panel centered at the same spot as it started. Default of 1.0 means no scaling, 0.5 would be half size.
pre-transform-scale2d: 0.8 383 | pre-transform-scale2d: 0.4, 0.6384 | 385 | 386 | === saturation === 387 | Sets the amount of saturation to apply to the panel and all it's children during composition. Default of 1.0 means no adjustment, 0.0 means fully desaturated to gray scale, greater than 1.0 means over-saturation.
saturation: 0.4;388 | 389 | 390 | === sound === 391 | Specifies a sound name to play when this selector is applied.
sound: "whoosh_in";392 | 393 | 394 | === sound-out === 395 | Specifies a sound name to play when this selector is removed.
sound-out: "whoosh_out";396 | 397 | 398 | === text-align === 399 | Specifies the text alignment for text within this panel, defaults to left.
text-align: left; 400 | text-align: right; 401 | text-align: center;402 | 403 | 404 | === text-decoration === 405 | Specifies the decoration for text within this panel, defaults to none. Possible values: none, underline, line-through.
text-decoration: underline;406 | 407 | 408 | === text-overflow === 409 | Controls truncation of text that doesn't fit in a panel. "clip" means to simply truncate (on char boundaries), "ellipsis" means to end with '...', and "shrink" means to a 410 | We default to ellipsis, which is contrary to the normal CSS spec.
text-overflow: ellipsis; 411 | text-overflow: clip; 412 | text-overflow: shrink; 413 |414 | 415 | 416 | === text-shadow === 417 | Specifies text shadows. The shadow shape will match the text the panel can generate,and this is only meaningful for labels. Syntax takes horizontal offset pixels, vertical offset pixels, blur radius pixels, strength, and then shadow color.
text-shadow: 2px 2px 8px 3.0 #333333b0;418 | 419 | 420 | === text-transform === 421 | Specifies the transform for text within this panel, defaults to none. Possible values: none, uppercase, lowercase.
text-transform: uppercase;422 | 423 | 424 | === texture-sampling === 425 | Controls texture sampling mode for the panel. Set to alpha-only to use the textures alpha data across all 3 color channels.
texture-sampling: normal; 426 | texture-sampling: alpha-only;427 | 428 | 429 | === tooltip-arrow-position === 430 | Specifies where to point the arrow of a tooltip at on this panel. The first value controls how the arrow is positioned horizontally when the tooltip is to the top or bottom of the panel, and the second value controls how the arrow is positioned vertically when the tooltip is to the left or right of the panel. Default is '50% 50%'.
tooltip-arrow-position: 25% 50%;431 | 432 | 433 | === tooltip-body-position === 434 | Specifies where to position the body of a tooltip relative to this panel. The first value controls how the body is aligned horizontally when the tooltip is to the top or bottom of the panel, and the second value controls how the body is aligned vertically when the tooltip is to the left or right of the panel. 0% means left/top aligned, 50% means center/middle aligned, and 100% means right/bottom aligned. Default is '0% 0%'.
tooltip-body-position: 50% 100%;435 | 436 | 437 | === tooltip-position === 438 | Specifies where to position a tooltip relative to this panel. Valid options include 'left', 'top', 'right', and 'bottom'. List up to 4 positions to determine the order that positions are tried if the tooltip doesn't fully fit on screen. Default is 'right left bottom top'. If less than 4 positions are specified, the tooltip first tries the opposite of the specified position along the same axis before switching to the other axis.
tooltip-position: bottom; 439 | tooltip-position: left bottom;440 | 441 | 442 | === transform === 443 | Sets the transforms to apply to the panel in 2d or 3d space. You can combine various transforms (comma separated) and they will be applied in order to create a 4x4 3d transform matrix. The possible operations are: translate3d( x, y, z ), translatex( x ), translatey( y ), translatez( z ), scale3d( x, y, z), rotate3d( x, y, z ), rotatex( x ), rotatey( y ), rotatez( z ).
transform: translate3d( -100px, -100px, 0px ); 444 | transform: rotateZ( -32deg ) rotateX( 30deg ) translate3d( 125px, 520px, 230px );445 | 446 | 447 | === transform-origin === 448 | Sets the transform origin about which transforms will be applied. Default is 50% 50% on the panel so a rotation/scale is centered.
transform-origin: 50% 50%449 | 450 | 451 | === transition === 452 | Specifies which properties should transition smoothly to new values if a class/pseudo class changes the styles. Also specifies duration, timing function, and delay. Valid timing functions are: ease, ease-in, ease-out, ease-in-out, linear.
transition: position 2.0s ease-in-out 0.0s, perspective-origin 1.2s ease-in-out 0.8s;453 | 454 | 455 | === transition-delay === 456 | Specifies the delay in seconds to use for transition properties on this panel, if more than one comma delimited value is specified then the values are applied to each property specified in 'transition-property' in order. If only one value is specified then it applies to all the properties specified in transition-property.
transition-delay: 0.0s; 457 | transition-delay: 0.0s, 1.2s;458 | 459 | 460 | === transition-duration === 461 | Specifies the durating in seconds to use for transition properties on this panel, if more than one comma delimited value is specified then the values are applied to each property specified in 'transition-property' in order. If only one value is specified then it applies to all the properties specified in transition-property.
transition-duration: 2.0s; 462 | transition-duration: 2.0s, 1.2s, 1.2s, 4.0s, 2.0s;463 | 464 | 465 | === transition-property === 466 | Specifies which properties should transition smoothly to new values if a class/pseudo class changes the styles.
transition: position, transform, background-color;467 | 468 | 469 | === transition-timing-function === 470 | Specifies the timing function to use for transition properties on this panel, if more than one comma delimited value is specified then the values are applied to each property specified in 'transition-property' in order. If only one value is specified then it applies to all the properties specified in transition-property. Valid timing functions are: ease, ease-in, ease-out, ease-in-out, linear.
transition-timing-function: ease-in-out; 471 | transition-timing-function: ease-in-out, linear; 472 | transition-timing-function: cubic-bezier( 0.785, 0.385, 0.555, 1.505 );473 | 474 | 475 | === vertical-align === 476 | <Needs a description> 477 | 478 | 479 | === visibility === 480 | Controls if the panel is visible and is included in panel layout. Possible values:
wash-color: #39b0d325;485 | 486 | 487 | === white-space === 488 | Controls white-space wrapping on rendered text. "normal" means wrap on whitespace, "nowrap" means do no wrapping at all.
white-space: normal; 489 | white-space: nowrap;490 | 491 | 492 | === width === 493 | Sets the width for this panel. Possible values:
position: 3% 20px 0px;498 | 499 | 500 | === y === 501 | Sets the x, y, z position for a panel. Must not be in a flowing layout.
position: 3% 20px 0px;502 | 503 | 504 | === z === 505 | Sets the x, y, z position for a panel. Must not be in a flowing layout.
position: 3% 20px 0px;506 | 507 | 508 | === z-index === 509 | Sets the z-index for a panel, panels will be sorted and painted in order within a parent panel. The sorting first sorts by the z-pos computed from position and transforms, then if panels have matching zpos zindex is used. z-index is different than z-pos in that it doesn't affect rendering perspective, just paint/hit-test ordering. The default z-index value is 0, and any floating point value is accepted.
z-index: 1;-------------------------------------------------------------------------------- /dump/dump_panorama_events.md: -------------------------------------------------------------------------------- 1 | {| class="wikitable" 2 | ! Event 3 | ! Panel Event 4 | ! Description 5 | |- 6 | |
AddStyle(string class)
7 | | Yes
8 | | Add a CSS class to a panel.
9 | |-
10 | | AddStyleToEachChild(string class)
11 | | Yes
12 | | Add a CSS class to all children of this panel.
13 | |-
14 | | AsyncEvent(float delay, event eventToFire)
15 | | No
16 | | Fire another event after a delay (in seconds).
17 | |-
18 | | DOTAHideAbilityTooltip()
19 | | Yes
20 | | Hide the ability tooltip
21 | |-
22 | | DOTAHideBuffTooltip()
23 | | Yes
24 | | Hide the buff tooltip
25 | |-
26 | | DOTAHideEconItemTooltip()
27 | | Yes
28 | | Hide the econ item tooltip.
29 | |-
30 | | DOTAHideProfileCardBattleCupTooltip()
31 | | Yes
32 | | Hide the profile card / battle cup tooltip.
33 | |-
34 | | DOTAHideProfileCardTooltip()
35 | | Yes
36 | | Hide the profile card tooltip.
37 | |-
38 | | DOTAHideTextTooltip()
39 | | Yes
40 | | Hide the text tooltip
41 | |-
42 | | DOTAHideTitleImageTextTooltip()
43 | | Yes
44 | | Hide the title image text tooltip.
45 | |-
46 | | DOTAHideTitleTextTooltip()
47 | | Yes
48 | | Hide the title text tooltip.
49 | |-
50 | | DOTAShowAbilityInventoryItemTooltip(int32 entityIndex, int32 inventorySlot)
51 | | Yes
52 | | Show tooltip for an item in the entityIndex NPC's inventory.
53 | |-
54 | | DOTAShowAbilityTooltip(string abilityName)
55 | | Yes
56 | | Show an ability tooltip.
57 | |-
58 | | DOTAShowAbilityTooltipForEntityIndex(string abilityName, int32 entityIndex)
59 | | Yes
60 | | Show an ability tooltip. Level information comes from the entity specified by the entityIndex.
61 | |-
62 | | DOTAShowAbilityTooltipForLevel(string abilityName, int32)
63 | | Yes
64 | | Show an ability tooltip for a specific level.
65 | |-
66 | | DOTAShowBuffTooltip(int32 entityIndex, int32 buffSerial, bool bOnEnemy)
67 | | Yes
68 | | Show a buff tooltip for the specified entityIndex + buff serial.
69 | |-
70 | | DOTAShowEconItemTooltip(class item_definition_index_t itemDef, class style_index_t styleIndex, int32 heroID)
71 | | Yes
72 | | Show the econ item tooltip for a given item, style, and hero. Use 0 for the default style, and -1 for the default hero.
73 | |-
74 | | DOTAShowProfileCardBattleCupTooltip(uint64 steamID)
75 | | Yes
76 | | Show the battle cup portion of the user's profile card, if it exists
77 | |-
78 | | DOTAShowProfileCardTooltip(uint64 steamID, bool useProName)
79 | | Yes
80 | | Show a user's profile card. Use pro name determines whether to use their professional team name if applicable.
81 | |-
82 | | DOTAShowTextTooltip(string text)
83 | | Yes
84 | | Show a tooltip with the given text.
85 | |-
86 | | DOTAShowTextTooltipStyled(string text, string style)
87 | | Yes
88 | | Show a tooltip with the given text. Also apply a CSS class named "style" to allow custom styling.
89 | |-
90 | | DOTAShowTitleImageTextTooltip(string title, string imagePath, string text)
91 | | Yes
92 | | Show a tooltip with the given title, image, and text.
93 | |-
94 | | DOTAShowTitleImageTextTooltipStyled(string title, string imagePath, string text, string style)
95 | | Yes
96 | | Show a tooltip with the given title, image, and text. Also apply a CSS class named "style" to allow custom styling.
97 | |-
98 | | DOTAShowTitleTextTooltip(string title, string text)
99 | | Yes
100 | | Show a tooltip with the given title and text.
101 | |-
102 | | DOTAShowTitleTextTooltipStyled(string title, string text, string style)
103 | | Yes
104 | | Show a tooltip with the given title and text. Also apply a CSS class named "style" to allow custom styling.
105 | |-
106 | | IfHasClassEvent(string class, event eventToFire)
107 | | Yes
108 | | Fire another event if this panel has a given class.
109 | |-
110 | | IfHoverOtherEvent(string otherPanelID, event eventToFire)
111 | | Yes
112 | | Fire another event if currently hovering over a panel with the given ID.
113 | |-
114 | | IfNotHasClassEvent(string class, event eventToFire)
115 | | Yes
116 | | Fire another event if this panel does not have a given class.
117 | |-
118 | | IfNotHoverOtherEvent(string otherPanelID, event eventToFire)
119 | | Yes
120 | | Fire another event if not currently hovering over a panel with the given ID.
121 | |-
122 | | MovePanelDown(int32 repeatCount)
123 | | Yes
124 | | Move down from the panel. By default, this will change the focus position, but other panel types may implement this differently.
125 | |-
126 | | MovePanelLeft(int32 repeatCount)
127 | | Yes
128 | | Move left from the panel. By default, this will change the focus position, but other panel types may implement this differently.
129 | |-
130 | | MovePanelRight(int32 repeatCount)
131 | | Yes
132 | | Move right from the panel. By default, this will change the focus position, but other panel types may implement this differently.
133 | |-
134 | | MovePanelUp(int32 repeatCount)
135 | | Yes
136 | | Move up from the panel. By default, this will change the focus position, but other panel types may implement this differently.
137 | |-
138 | | PageDown()
139 | | No
140 | | Scroll the panel down by one page.
141 | |-
142 | | PageLeft()
143 | | No
144 | | Scroll the panel left by one page.
145 | |-
146 | | PagePanelDown()
147 | | Yes
148 | | Scroll the panel down by one page.
149 | |-
150 | | PagePanelLeft()
151 | | Yes
152 | | Scroll the panel left by one page.
153 | |-
154 | | PagePanelRight()
155 | | Yes
156 | | Scroll the panel left by one page.
157 | |-
158 | | PagePanelUp()
159 | | Yes
160 | | Scroll the panel up by one page.
161 | |-
162 | | PageRight()
163 | | No
164 | | Scroll the panel right by one page.
165 | |-
166 | | PageUp()
167 | | No
168 | | Scroll the panel up by one page.
169 | |-
170 | | RemoveStyle(string class)
171 | | Yes
172 | | Remove a CSS class from a panel.
173 | |-
174 | | RemoveStyleFromEachChild(string class)
175 | | Yes
176 | | Remove a CSS class from all children of this panel.
177 | |-
178 | | ScrollDown()
179 | | No
180 | | Scroll the panel down by one line.
181 | |-
182 | | ScrollLeft()
183 | | No
184 | | Scroll the panel left by one line.
185 | |-
186 | | ScrollPanelDown()
187 | | Yes
188 | | Scroll the panel down by one line.
189 | |-
190 | | ScrollPanelLeft()
191 | | Yes
192 | | Scroll the panel left by one line.
193 | |-
194 | | ScrollPanelRight()
195 | | Yes
196 | | Scroll the panel right by one line.
197 | |-
198 | | ScrollPanelUp()
199 | | Yes
200 | | Scroll the panel up by one line.
201 | |-
202 | | ScrollRight()
203 | | No
204 | | Scroll the panel right by one line.
205 | |-
206 | | ScrollToBottom()
207 | | Yes
208 | | Scroll this panel to the bottom.
209 | |-
210 | | ScrollToTop()
211 | | Yes
212 | | Scroll this panel to the top.
213 | |-
214 | | ScrollUp()
215 | | No
216 | | Scroll the panel up by one line.
217 | |-
218 | | SetChildPanelsSelected(bool selected)
219 | | Yes
220 | | Set whether any child panels are :selected.
221 | |-
222 | | SetInputFocus()
223 | | Yes
224 | | Set focus to this panel.
225 | |-
226 | | SetPanelEnabled(bool enabled)
227 | | Yes
228 | | Sets whether the given panel is enabled
229 | |-
230 | | SetPanelSelected(bool selected)
231 | | Yes
232 | | Set whether this panel is :selected.
233 | |-
234 | | TogglePanelSelected()
235 | | Yes
236 | | Toggle whether this panel is :selected.
237 | |-
238 | | ToggleStyle(string class)
239 | | Yes
240 | | Toggle whether a panel has the given CSS class.
241 | |}
--------------------------------------------------------------------------------
/examples/vscript/addon_game_mode.js:
--------------------------------------------------------------------------------
1 | require("lib.typescript");
2 | // Link lua modifier
3 | LinkLuaModifier("modifier_panic", "modifiers/modifier_panic.lua", LuaModifierType.LUA_MODIFIER_MOTION_NONE);
4 | function Precache(context) {
5 | // Nothing to precache...
6 | }
7 | function Activate() {
8 | // Set general settings
9 | const mode = GameRules.GetGameModeEntity();
10 | mode.SetFogOfWarDisabled(true);
11 | mode.SetCustomGameForceHero("npc_dota_hero_jakiro");
12 | mode.SetWeatherEffectsDisabled(true);
13 | mode.SetCustomAttributeDerivedStatValue(AttributeDerivedStats.DOTA_ATTRIBUTE_AGILITY_ARMOR, 0);
14 | GameRules.SetHeroRespawnEnabled(false);
15 | // Listen for state change
16 | ListenToGameEvent("game_rules_state_change", OnStateChange, null);
17 | }
18 | function OnStateChange() {
19 | const state = GameRules.State_Get();
20 | if (state == DOTA_GameState.DOTA_GAMERULES_STATE_PRE_GAME) {
21 | // Start game as soon as we hit the pregame
22 | StartGame();
23 | }
24 | }
25 | function StartGame() {
26 | // Figure out who the players in the game are
27 | let players = [];
28 | for (let pID = 0; pID < DOTALimits_t.DOTA_MAX_TEAM_PLAYERS; pID++) {
29 | if (PlayerResource.IsValidPlayer(pID)) {
30 | players.push(pID);
31 | }
32 | }
33 | // Create instance of our game mode object
34 | const myGameMode = new MyGameMode(players);
35 | myGameMode.Init();
36 | }
37 | class MyGameMode {
38 | constructor(players) {
39 | this.players = players;
40 | }
41 | Init() {
42 | // Print number of players
43 | print(`Starting game with ${this.players.length} players!`);
44 | // Listen for spawns
45 | ListenToGameEvent("npc_spawned", (event) => this.OnNpcSpawn(event), null);
46 | // Set ExecuteOrder filter
47 | GameRules.GetGameModeEntity().SetExecuteOrderFilter((ctx, order) => this.OnExecuteOrder(order), this);
48 | }
49 | OnNpcSpawn(event) {
50 | // Apply our lua modifier to the spawned unit
51 | // We can cast to npc since this is the 'npc_spawned' event
52 | const unit = EntIndexToHScript(event.entindex);
53 | unit.AddNewModifier(null, null, "modifier_panic", { duration: 8 });
54 | }
55 | OnExecuteOrder(order) {
56 | print(order.order_type);
57 | return true;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/examples/vscript/addon_game_mode.lua:
--------------------------------------------------------------------------------
1 | --=======================================================================================
2 | -- Generated by TypescriptToLua transpiler https://github.com/Perryvw/TypescriptToLua
3 | -- Date: Wed Jan 31 2018
4 | --=======================================================================================
5 | require("lib.typescript")
6 | LinkLuaModifier("modifier_panic","modifiers/modifier_panic.lua",LUA_MODIFIER_MOTION_NONE)
7 | function Precache(context)
8 | end
9 | function Activate()
10 | local mode = GameRules.GetGameModeEntity(GameRules)
11 | mode.SetFogOfWarDisabled(mode,true)
12 | mode.SetCustomGameForceHero(mode,"npc_dota_hero_jakiro")
13 | mode.SetWeatherEffectsDisabled(mode,true)
14 | mode.SetCustomAttributeDerivedStatValue(mode,DOTA_ATTRIBUTE_AGILITY_ARMOR,0)
15 | GameRules.SetHeroRespawnEnabled(GameRules,false)
16 | ListenToGameEvent("game_rules_state_change",OnStateChange,nil)
17 | end
18 | function OnStateChange()
19 | local state = GameRules.State_Get(GameRules)
20 | if state==DOTA_GAMERULES_STATE_PRE_GAME then
21 | StartGame()
22 | end
23 | end
24 | function StartGame()
25 | local players = {}
26 | for pID=0,DOTA_MAX_TEAM_PLAYERS-1,1 do
27 | if PlayerResource.IsValidPlayer(PlayerResource,pID) then
28 | table.insert(players, pID)
29 | end
30 | end
31 | local myGameMode = MyGameMode.new(true,players)
32 | myGameMode.Init(myGameMode)
33 | end
34 | MyGameMode = MyGameMode or {}
35 | MyGameMode.__index = MyGameMode
36 | function MyGameMode.new(construct, ...)
37 | local instance = setmetatable({}, MyGameMode)
38 | if construct and MyGameMode.constructor then MyGameMode.constructor(instance, ...) end
39 | return instance
40 | end
41 | function MyGameMode.constructor(self,players)
42 | self.players=players
43 | end
44 | function MyGameMode.Init(self)
45 | print("Starting game with "..#self.players.." players!")
46 | ListenToGameEvent("npc_spawned",function(event) return self.OnNpcSpawn(self,event) end,nil)
47 | GameRules.GetGameModeEntity(GameRules).SetExecuteOrderFilter(GameRules.GetGameModeEntity(GameRules),function(ctx,order) return self.OnExecuteOrder(self,order) end,self)
48 | end
49 | function MyGameMode.OnNpcSpawn(self,event)
50 | local unit = EntIndexToHScript(event.entindex)
51 | unit.AddNewModifier(unit,nil,nil,"modifier_panic",{duration=8})
52 | end
53 | function MyGameMode.OnExecuteOrder(self,order)
54 | print(order.order_type)
55 | return true
56 | end
57 |
--------------------------------------------------------------------------------
/examples/vscript/addon_game_mode.ts:
--------------------------------------------------------------------------------
1 | require("lib.typescript");
2 |
3 | // Link lua modifier
4 | LinkLuaModifier("modifier_panic", "modifiers/modifier_panic.lua", LuaModifierType.LUA_MODIFIER_MOTION_NONE);
5 |
6 | function Precache(context: CScriptPrecacheContext): void {
7 | // Nothing to precache...
8 | }
9 |
10 | function Activate(): void {
11 | // Set general settings
12 | const mode = GameRules.GetGameModeEntity();
13 | mode.SetFogOfWarDisabled(true);
14 | mode.SetCustomGameForceHero("npc_dota_hero_jakiro");
15 | mode.SetWeatherEffectsDisabled(true);
16 | mode.SetCustomAttributeDerivedStatValue(AttributeDerivedStats.DOTA_ATTRIBUTE_AGILITY_ARMOR, 0);
17 | GameRules.SetHeroRespawnEnabled(false);
18 |
19 | // Listen for state change
20 | ListenToGameEvent("game_rules_state_change", OnStateChange, null);
21 | }
22 |
23 | function OnStateChange(): void {
24 | const state = GameRules.State_Get();
25 |
26 | if (state == DOTA_GameState.DOTA_GAMERULES_STATE_PRE_GAME) {
27 | // Start game as soon as we hit the pregame
28 | StartGame();
29 | }
30 | }
31 |
32 | function StartGame(): void {
33 | // Figure out who the players in the game are
34 | let players: PlayerID[] = [];
35 | for (let pID = 0; pID < DOTALimits_t.DOTA_MAX_TEAM_PLAYERS; pID++) {
36 | if (PlayerResource.IsValidPlayer(