-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MiniScript: console.log -> console.printLine
- Loading branch information
Showing
33 changed files
with
1,333 additions
and
1,333 deletions.
There are no files selected for viewing
106 changes: 53 additions & 53 deletions
106
resources/engine/templates/tscript/gui_script_template.tscript
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,109 +1,109 @@ | ||
# initialize | ||
function: initialize() | ||
console.log("----------------------------------------------------------") | ||
console.log("initialize(): " + gui.screennode.getId()) | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("initialize(): " + gui.screennode.getId()) | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on action | ||
function: onAction($actionType, $elementNodeId) | ||
console.log("----------------------------------------------------------") | ||
console.log("onAction(): " + gui.screennode.getId() + ": " + $elementNodeId + "(" + $actionType + ")") | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("onAction(): " + gui.screennode.getId() + ": " + $elementNodeId + "(" + $actionType + ")") | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on change | ||
function: onChange($elementNodeId) | ||
console.log("----------------------------------------------------------") | ||
console.log("onChange(): " + gui.screennode.getId() + ": " + $elementNodeId) | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("onChange(): " + gui.screennode.getId() + ": " + $elementNodeId) | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on mouse over | ||
function: onMouseOver($elementNodeId) | ||
console.log("----------------------------------------------------------") | ||
console.log("onMouseOver(): " + gui.screennode.getId() + ": " + $elementNodeId) | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("onMouseOver(): " + gui.screennode.getId() + ": " + $elementNodeId) | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on context menu request | ||
function: onContextMenuRequest($elementNodeId, $mouseX, $mouseY) | ||
console.log("----------------------------------------------------------") | ||
console.log("onContextMenuRequest(): " + gui.screennode.getId() + ": " + $elementNodeId + "@" + $mouseX + ", " + $mouseY) | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("onContextMenuRequest(): " + gui.screennode.getId() + ": " + $elementNodeId + "@" + $mouseX + ", " + $mouseY) | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on focus | ||
function: onFocus($elementNodeId) | ||
console.log("----------------------------------------------------------") | ||
console.log("onFocus(): " + gui.screennode.getId() + ": " + $elementNodeId) | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("onFocus(): " + gui.screennode.getId() + ": " + $elementNodeId) | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on unfocus | ||
function: onUnfocus($elementNodeId) | ||
console.log("----------------------------------------------------------") | ||
console.log("onUnfocus(): " + gui.screennode.getId() + ": " + $elementNodeId) | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("onUnfocus(): " + gui.screennode.getId() + ": " + $elementNodeId) | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on move | ||
function: onMove($nodeId) | ||
console.log("----------------------------------------------------------") | ||
console.log("onMove(): " + gui.screennode.getId() + ": " + $nodeId) | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("onMove(): " + gui.screennode.getId() + ": " + $nodeId) | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on move release | ||
function: onMoveRelease($nodeId, $mouseX, $mouseY) | ||
console.log("----------------------------------------------------------") | ||
console.log("onMoveRelease(): " + gui.screennode.getId() + ": " + $nodeId + "@" + $mouseX + ", " + $mouseY) | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("onMoveRelease(): " + gui.screennode.getId() + ": " + $nodeId + "@" + $mouseX + ", " + $mouseY) | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on tooltip show request | ||
function: onTooltipShowRequest($nodeId, $mouseX, $mouseY) | ||
console.log("----------------------------------------------------------") | ||
console.log("onTooltipShowRequest(): " + gui.screennode.getId() + ": " + $nodeId + "@" + $mouseX + ", " + $mouseY) | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("onTooltipShowRequest(): " + gui.screennode.getId() + ": " + $nodeId + "@" + $mouseX + ", " + $mouseY) | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on tooltip close request | ||
function: onTooltipCloseRequest() | ||
console.log("----------------------------------------------------------") | ||
console.log("onTooltipCloseRequest(): " + gui.screennode.getId() + ": " + $nodeId + "@" + $mouseX + ", " + $mouseY) | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("onTooltipCloseRequest(): " + gui.screennode.getId() + ": " + $nodeId + "@" + $mouseX + ", " + $mouseY) | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on drag request | ||
function: onDragRequest($elementNodeId, $mouseX, $mouseY) | ||
console.log("----------------------------------------------------------") | ||
console.log("onDragRequest(): " + gui.screennode.getId() + ": " + $elementNodeId + "@" + $mouseX + ", " + $mouseY) | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("onDragRequest(): " + gui.screennode.getId() + ": " + $elementNodeId + "@" + $mouseX + ", " + $mouseY) | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on tick | ||
function: onTick() | ||
console.log("----------------------------------------------------------") | ||
console.log("onTick(): " + gui.screennode.getId()) | ||
console.log("----------------------------------------------------------") | ||
console.log() | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine("onTick(): " + gui.screennode.getId()) | ||
console.printLine("----------------------------------------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on error | ||
on: error | ||
console.log("An error occurred") | ||
console.printLine("An error occurred") | ||
script.stop() | ||
end |
70 changes: 35 additions & 35 deletions
70
resources/engine/templates/tscript/logic_script_template.tscript
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,71 +1,71 @@ | ||
# on logic added | ||
function: onLogicAdded() | ||
console.log("-----------------------------") | ||
console.log("onLogicAdded(): " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.log("-----------------------------") | ||
console.log() | ||
console.printLine("-----------------------------") | ||
console.printLine("onLogicAdded(): " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.printLine("-----------------------------") | ||
console.printLine() | ||
end | ||
|
||
# initialize engine | ||
function: initializeEngine() | ||
console.log("-----------------------------") | ||
console.log("initializeEngine(): " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.log("-----------------------------") | ||
console.log() | ||
console.printLine("-----------------------------") | ||
console.printLine("initializeEngine(): " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.printLine("-----------------------------") | ||
console.printLine() | ||
end | ||
|
||
# update engine | ||
function: updateEngine() | ||
console.log("-----------------------------") | ||
console.log("updateEngine(): " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.log("-----------------------------") | ||
console.log() | ||
console.printLine("-----------------------------") | ||
console.printLine("updateEngine(): " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.printLine("-----------------------------") | ||
console.printLine() | ||
end | ||
|
||
# initialize logic | ||
function: initializeLogic() | ||
console.log("-----------------------------") | ||
console.log("initializeLogic(): " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.log("-----------------------------") | ||
console.log() | ||
console.printLine("-----------------------------") | ||
console.printLine("initializeLogic(): " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.printLine("-----------------------------") | ||
console.printLine() | ||
end | ||
|
||
# update logic | ||
function: updateLogic() | ||
console.log("-----------------------------") | ||
console.log("updateLogic(): " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.log("-----------------------------") | ||
console.log() | ||
console.printLine("-----------------------------") | ||
console.printLine("updateLogic(): " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.printLine("-----------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on logics processed | ||
function: onLogicsProcessed() | ||
console.log("-----------------------------") | ||
console.log("onLogicsProcessed(): " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.log("-----------------------------") | ||
console.log() | ||
console.printLine("-----------------------------") | ||
console.printLine("onLogicsProcessed(): " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.printLine("-----------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on initialize | ||
on: initialize | ||
console.log("-----------------------------") | ||
console.log("on: initialize: " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.log("-----------------------------") | ||
console.log() | ||
console.printLine("-----------------------------") | ||
console.printLine("on: initialize: " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.printLine("-----------------------------") | ||
console.printLine() | ||
end | ||
|
||
# if no condition is met, nothing will be executed, lol :D | ||
on: nothing | ||
console.log("-----------------------------") | ||
console.log("on-nothing: " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.log("-----------------------------") | ||
console.log() | ||
console.printLine("-----------------------------") | ||
console.printLine("on-nothing: " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.printLine("-----------------------------") | ||
console.printLine() | ||
end | ||
|
||
# on error | ||
on: error | ||
console.log("-----------------------------") | ||
console.log("on-error: " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.log("-----------------------------") | ||
console.printLine("-----------------------------") | ||
console.printLine("on-error: " + logic.getId() + ", hierarchy id: " + logic.getHierarchyId() + ", hierarchy parent id: " + logic.getHierarchyParentId()) | ||
console.printLine("-----------------------------") | ||
script.stop() | ||
end |
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
Oops, something went wrong.