-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b85110
commit ca60a14
Showing
25 changed files
with
1,373 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ dist | |
*.vcss_c | ||
*.vxml_c | ||
*.bin | ||
panorama_debugger.cfg | ||
*.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
build | ||
coverage | ||
**/dist | ||
**/vue_example | ||
.github | ||
package.json | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"files.exclude": { | ||
"**/node_modules": true | ||
// "**/node_modules/**": true, | ||
"**/node_modules/[^b]**": true | ||
} | ||
} |
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
addon/content/solid-example/panorama/layout/custom_game/app.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<root> | ||
<styles> | ||
<include src="s2r://panorama/styles/dotastyles.vcss_c"/> | ||
</styles> | ||
<scripts> | ||
<include src="file://{resources}/scripts/custom_game/panorama-polyfill.js" /> | ||
<include src="file://{resources}/scripts/custom_game/app.js" /> | ||
</scripts> | ||
<Panel hittest="false" > | ||
<Panel id="app" /> | ||
</Panel> | ||
</root> |
7 changes: 7 additions & 0 deletions
7
addon/content/solid-example/panorama/layout/custom_game/custom_loading_screen.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<root> | ||
<scripts> | ||
<include src="file://{resources}/scripts/custom_game/custom_loading_screen.js" /> | ||
</scripts> | ||
<Panel> | ||
</Panel> | ||
</root> |
30 changes: 30 additions & 0 deletions
30
addon/content/solid-example/panorama/layout/custom_game/custom_ui_manifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<root> | ||
<script> | ||
//GameUI.SetRenderTopInsetOverride( 0 ); | ||
//GameUI.SetRenderBottomInsetOverride( 0 ); | ||
GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_ACTION_PANEL, false ); | ||
GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_ACTION_MINIMAP, false ); | ||
GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_INVENTORY_PANEL, false ); | ||
GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_INVENTORY_SHOP, false ); | ||
GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_INVENTORY_ITEMS, true ); | ||
GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_INVENTORY_QUICKBUY, false ); | ||
GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_INVENTORY_COURIER, false ); | ||
GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_INVENTORY_PROTECT, false ); | ||
GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_INVENTORY_GOLD, false ); | ||
GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_SHOP_SUGGESTEDITEMS, false ); | ||
//GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_FLYOUT_SCOREBOARD, false ); | ||
//GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_TOP_MENU_BUTTONS, false ); | ||
//GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_TOP_BAR_BACKGROUND, false ); | ||
//GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_TOP_TIMEOFDAY, false ); | ||
//GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_TOP_HEROES, false ); | ||
//GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_QUICK_STATS, false ); | ||
//GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_KILLCAM, false ); | ||
//GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_HERO_SELECTION_TEAMS, false ); | ||
//GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_HERO_SELECTION_GAME_NAME, false ); | ||
//GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_HERO_SELECTION_CLOCK, false ); | ||
//GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_PREGAME_STRATEGYUI, false ); | ||
</script> | ||
<Panel> | ||
<CustomUIElement type="Hud" layoutfile="file://{resources}/layout/custom_game/app.xml" /> | ||
</Panel> | ||
</root> |
8 changes: 8 additions & 0 deletions
8
addon/content/solid-example/panorama/layout/custom_game/libs.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<root> | ||
<scripts> | ||
<include src="file://{resources}/scripts/custom_game/panorama-polyfill.js" /> | ||
<include src="file://{resources}/scripts/custom_game/libs.js" /> | ||
</scripts> | ||
<Panel hittest="false" > | ||
</Panel> | ||
</root> |
39 changes: 39 additions & 0 deletions
39
addon/content/solid-example/panorama/scripts/custom_game/app.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
'use strict'; const require = GameUI.__require; | ||
|
||
var libs = require('./libs.js'); | ||
|
||
function Item(props) { | ||
let [root, setRoot] = libs.createSignal(null); | ||
let [text, setText] = libs.createSignal(''); | ||
let el; | ||
libs.onMount(() => { | ||
$.Msg('onMount ', el); | ||
}); | ||
libs.createEffect(() => { | ||
$.Msg('effect root ', root()); | ||
}, root); | ||
return (() => { | ||
const _el$ = libs.createElement("Panel", { | ||
id: "root" | ||
}, null), | ||
_el$2 = libs.createElement("Label", {}, _el$); | ||
const _ref$ = el; | ||
typeof _ref$ === "function" ? libs.use(_ref$, _el$) : el = _el$; | ||
libs.effect(_$p => libs.setProp(_el$2, "text", text(), _$p)); | ||
return _el$; | ||
})(); | ||
} | ||
function HelloWorld() { | ||
return (() => { | ||
const _el$3 = libs.createElement("Panel", {}, null); | ||
libs.createTextNode(`Hello World!`, _el$3); | ||
libs.setProp(_el$3, "style", { | ||
flowChildren: 'right' | ||
}); | ||
libs.insert(_el$3, libs.createComponent(Item, { | ||
show: true | ||
}, _el$3), null); | ||
return _el$3; | ||
})(); | ||
} | ||
libs.render(() => libs.createComponent(HelloWorld, {}, null), $('#app')); |
18 changes: 18 additions & 0 deletions
18
addon/content/solid-example/panorama/scripts/custom_game/custom_loading_screen.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
const root = $.GetContextPanel(); | ||
const modules = GameUI.__modules = {} | ||
GameUI.__loadModule = function (name, exports) { | ||
if (modules[name]) { | ||
$.Msg(`Reload module: ${name} `, exports ? '👏' : '☠️') | ||
} | ||
modules[name] = exports | ||
} | ||
GameUI.__require = function (name) { | ||
name = name.slice(2, name.length-3); | ||
if (!modules[name]) { | ||
const m = $.CreatePanel('Panel', root, name) | ||
m.BLoadLayout(`file://{resources}/layout/custom_game/${name}.xml`, false, false); | ||
$.Msg(`Load module: ${name} `, modules[name] ? '👏' : '☠️') | ||
} | ||
return modules[name] | ||
} |
Oops, something went wrong.