warscript 0.0.1-dev.404878c
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/LICENSE +23 -0
- package/binaryreader.d.ts +20 -0
- package/binaryreader.lua +50 -0
- package/binarywriter.d.ts +21 -0
- package/binarywriter.lua +90 -0
- package/core/dummy.d.ts +22 -0
- package/core/dummy.lua +133 -0
- package/core/game.d.ts +3 -0
- package/core/game.lua +24 -0
- package/core/mapbounds.d.ts +8 -0
- package/core/mapbounds.lua +12 -0
- package/core/thread.d.ts +8 -0
- package/core/thread.lua +40 -0
- package/core/types/ability.d.ts +4 -0
- package/core/types/ability.lua +10 -0
- package/core/types/async.d.ts +3 -0
- package/core/types/async.lua +2 -0
- package/core/types/camera.d.ts +4 -0
- package/core/types/camera.lua +21 -0
- package/core/types/cameraField.d.ts +15 -0
- package/core/types/cameraField.lua +38 -0
- package/core/types/color.d.ts +16 -0
- package/core/types/color.lua +93 -0
- package/core/types/destructable.d.ts +31 -0
- package/core/types/destructable.lua +245 -0
- package/core/types/effect.d.ts +31 -0
- package/core/types/effect.lua +209 -0
- package/core/types/frame.d.ts +140 -0
- package/core/types/frame.lua +882 -0
- package/core/types/game.d.ts +8 -0
- package/core/types/game.lua +41 -0
- package/core/types/group.d.ts +22 -0
- package/core/types/group.lua +94 -0
- package/core/types/handle.d.ts +48 -0
- package/core/types/handle.lua +169 -0
- package/core/types/image.d.ts +30 -0
- package/core/types/image.lua +121 -0
- package/core/types/internal/ability+cooldownRemaining.d.ts +1 -0
- package/core/types/internal/ability+cooldownRemaining.lua +0 -0
- package/core/types/item.d.ts +4 -0
- package/core/types/item.lua +6 -0
- package/core/types/missile.d.ts +22 -0
- package/core/types/missile.lua +233 -0
- package/core/types/order.d.ts +25 -0
- package/core/types/order.lua +55 -0
- package/core/types/player.d.ts +71 -0
- package/core/types/player.lua +448 -0
- package/core/types/playerCamera.d.ts +32 -0
- package/core/types/playerCamera.lua +162 -0
- package/core/types/playerColor.d.ts +40 -0
- package/core/types/playerColor.lua +203 -0
- package/core/types/rect.d.ts +39 -0
- package/core/types/rect.lua +152 -0
- package/core/types/region.d.ts +14 -0
- package/core/types/region.lua +84 -0
- package/core/types/sound.d.ts +69 -0
- package/core/types/sound.lua +247 -0
- package/core/types/tileCell.d.ts +13 -0
- package/core/types/tileCell.lua +100 -0
- package/core/types/timer.d.ts +36 -0
- package/core/types/timer.lua +230 -0
- package/core/types/timerDialog.d.ts +19 -0
- package/core/types/timerDialog.lua +95 -0
- package/core/types/unit.d.ts +10 -0
- package/core/types/unit.lua +24 -0
- package/core/types/widget.d.ts +5 -0
- package/core/types/widget.lua +2 -0
- package/core/util.d.ts +62 -0
- package/core/util.lua +464 -0
- package/core/vecmath/common.d.ts +18 -0
- package/core/vecmath/common.lua +29 -0
- package/core/vecmath/mat2.d.ts +73 -0
- package/core/vecmath/mat2.lua +261 -0
- package/core/vecmath/vec3.d.ts +47 -0
- package/core/vecmath/vec3.lua +350 -0
- package/core/vecmath/vec4.d.ts +54 -0
- package/core/vecmath/vec4.lua +400 -0
- package/crypto/ecc.d.ts +6 -0
- package/crypto/ecc.lua +1734 -0
- package/decl/index.d.ts +116 -0
- package/decl/native.d.ts +8198 -0
- package/destroyable.d.ts +20 -0
- package/destroyable.lua +31 -0
- package/engine/ability.d.ts +5 -0
- package/engine/ability.lua +7 -0
- package/engine/behavior.d.ts +28 -0
- package/engine/behavior.lua +181 -0
- package/engine/behaviour/ability/apply-buff.d.ts +38 -0
- package/engine/behaviour/ability/apply-buff.lua +126 -0
- package/engine/behaviour/ability/apply-unit-behavior.d.ts +12 -0
- package/engine/behaviour/ability/apply-unit-behavior.lua +36 -0
- package/engine/behaviour/ability/damage.d.ts +25 -0
- package/engine/behaviour/ability/damage.lua +75 -0
- package/engine/behaviour/ability/heal.d.ts +16 -0
- package/engine/behaviour/ability/heal.lua +35 -0
- package/engine/behaviour/ability/instant-impact.d.ts +6 -0
- package/engine/behaviour/ability/instant-impact.lua +25 -0
- package/engine/behaviour/ability.d.ts +40 -0
- package/engine/behaviour/ability.lua +175 -0
- package/engine/behaviour/unit/stun-immunity.d.ts +19 -0
- package/engine/behaviour/unit/stun-immunity.lua +67 -0
- package/engine/behaviour/unit.d.ts +20 -0
- package/engine/behaviour/unit.lua +75 -0
- package/engine/buff.d.ts +221 -0
- package/engine/buff.lua +1093 -0
- package/engine/constants.d.ts +7 -0
- package/engine/constants.lua +8 -0
- package/engine/index.d.ts +5 -0
- package/engine/index.lua +2 -0
- package/engine/internal/ability.d.ts +91 -0
- package/engine/internal/ability.lua +531 -0
- package/engine/internal/item/ability.d.ts +2 -0
- package/engine/internal/item/ability.lua +48 -0
- package/engine/internal/item+owner.d.ts +7 -0
- package/engine/internal/item+owner.lua +22 -0
- package/engine/internal/item.d.ts +86 -0
- package/engine/internal/item.lua +580 -0
- package/engine/internal/mechanics/ability-duration.d.ts +4 -0
- package/engine/internal/mechanics/ability-duration.lua +11 -0
- package/engine/internal/mechanics/area-damage.d.ts +2 -0
- package/engine/internal/mechanics/area-damage.lua +33 -0
- package/engine/internal/misc/dummy-units.d.ts +2 -0
- package/engine/internal/misc/dummy-units.lua +14 -0
- package/engine/internal/object-data/armor-increase.d.ts +2 -0
- package/engine/internal/object-data/armor-increase.lua +19 -0
- package/engine/internal/object-data/attribute-bonus.d.ts +2 -0
- package/engine/internal/object-data/attribute-bonus.lua +15 -0
- package/engine/internal/object-data/auto-attack-damage-increase.d.ts +2 -0
- package/engine/internal/object-data/auto-attack-damage-increase.lua +17 -0
- package/engine/internal/object-data/auto-attack-speed-increase.d.ts +2 -0
- package/engine/internal/object-data/auto-attack-speed-increase.lua +14 -0
- package/engine/internal/object-data/dummy-inventory.d.ts +2 -0
- package/engine/internal/object-data/dummy-inventory.lua +16 -0
- package/engine/internal/object-data/dummy-item.d.ts +2 -0
- package/engine/internal/object-data/dummy-item.lua +10 -0
- package/engine/internal/object-data/ghost-visible.d.ts +2 -0
- package/engine/internal/object-data/ghost-visible.lua +15 -0
- package/engine/internal/object-data/invulnerable.d.ts +2 -0
- package/engine/internal/object-data/invulnerable.lua +11 -0
- package/engine/internal/object-data/movement-speed-increase-factor.d.ts +2 -0
- package/engine/internal/object-data/movement-speed-increase-factor.lua +18 -0
- package/engine/internal/unit/ability.d.ts +143 -0
- package/engine/internal/unit/ability.lua +369 -0
- package/engine/internal/unit/allowed-targets.d.ts +17 -0
- package/engine/internal/unit/allowed-targets.lua +19 -0
- package/engine/internal/unit/band-aids/ancestral-spirit-cannibalize.d.ts +2 -0
- package/engine/internal/unit/band-aids/ancestral-spirit-cannibalize.lua +21 -0
- package/engine/internal/unit/bonus.d.ts +41 -0
- package/engine/internal/unit/bonus.lua +188 -0
- package/engine/internal/unit/buff.d.ts +38 -0
- package/engine/internal/unit/buff.lua +81 -0
- package/engine/internal/unit/expiration-timer.d.ts +22 -0
- package/engine/internal/unit/expiration-timer.lua +44 -0
- package/engine/internal/unit/ghost-counter.d.ts +12 -0
- package/engine/internal/unit/ghost-counter.lua +26 -0
- package/engine/internal/unit/invulnerability-counter.d.ts +12 -0
- package/engine/internal/unit/invulnerability-counter.lua +26 -0
- package/engine/internal/unit/missile.d.ts +42 -0
- package/engine/internal/unit/missile.lua +70 -0
- package/engine/internal/unit/movement-speed.d.ts +18 -0
- package/engine/internal/unit/movement-speed.lua +42 -0
- package/engine/internal/unit/summon-event.d.ts +12 -0
- package/engine/internal/unit/summon-event.lua +50 -0
- package/engine/internal/unit+ability.d.ts +9 -0
- package/engine/internal/unit+ability.lua +59 -0
- package/engine/internal/unit+bonus.d.ts +8 -0
- package/engine/internal/unit+bonus.lua +40 -0
- package/engine/internal/unit+damage.d.ts +69 -0
- package/engine/internal/unit+damage.lua +123 -0
- package/engine/internal/unit+rally.d.ts +10 -0
- package/engine/internal/unit+rally.lua +159 -0
- package/engine/internal/unit+spellSteal.d.ts +7 -0
- package/engine/internal/unit+spellSteal.lua +64 -0
- package/engine/internal/unit+transport.d.ts +12 -0
- package/engine/internal/unit+transport.lua +102 -0
- package/engine/internal/unit-missile-data.d.ts +2 -0
- package/engine/internal/unit-missile-data.lua +107 -0
- package/engine/internal/unit-missile-launch.d.ts +7 -0
- package/engine/internal/unit-missile-launch.lua +32 -0
- package/engine/internal/unit.d.ts +312 -0
- package/engine/internal/unit.lua +2430 -0
- package/engine/internal/utility.d.ts +2 -0
- package/engine/internal/utility.lua +13 -0
- package/engine/lightning.d.ts +51 -0
- package/engine/lightning.lua +303 -0
- package/engine/local-client.d.ts +16 -0
- package/engine/local-client.lua +86 -0
- package/engine/object-data/auxiliary/animation-name.d.ts +14 -0
- package/engine/object-data/auxiliary/animation-name.lua +2 -0
- package/engine/object-data/auxiliary/animation-qualifier.d.ts +53 -0
- package/engine/object-data/auxiliary/animation-qualifier.lua +2 -0
- package/engine/object-data/auxiliary/armor-sound-type.d.ts +8 -0
- package/engine/object-data/auxiliary/armor-sound-type.lua +2 -0
- package/engine/object-data/auxiliary/attachment-preset.d.ts +15 -0
- package/engine/object-data/auxiliary/attachment-preset.lua +29 -0
- package/engine/object-data/auxiliary/attack-type.d.ts +11 -0
- package/engine/object-data/auxiliary/attack-type.lua +2 -0
- package/engine/object-data/auxiliary/buff-polarity.d.ts +6 -0
- package/engine/object-data/auxiliary/buff-polarity.lua +2 -0
- package/engine/object-data/auxiliary/buff-resistance-type.d.ts +6 -0
- package/engine/object-data/auxiliary/buff-resistance-type.lua +2 -0
- package/engine/object-data/auxiliary/combat-classification.d.ts +46 -0
- package/engine/object-data/auxiliary/combat-classification.lua +206 -0
- package/engine/object-data/auxiliary/detection-type.d.ts +7 -0
- package/engine/object-data/auxiliary/detection-type.lua +2 -0
- package/engine/object-data/auxiliary/model-node-name.d.ts +12 -0
- package/engine/object-data/auxiliary/model-node-name.lua +2 -0
- package/engine/object-data/auxiliary/model-node-qualifier.d.ts +21 -0
- package/engine/object-data/auxiliary/model-node-qualifier.lua +2 -0
- package/engine/object-data/auxiliary/movement-type.d.ts +10 -0
- package/engine/object-data/auxiliary/movement-type.lua +2 -0
- package/engine/object-data/auxiliary/race.d.ts +14 -0
- package/engine/object-data/auxiliary/race.lua +2 -0
- package/engine/object-data/auxiliary/sound-preset-name.d.ts +8 -0
- package/engine/object-data/auxiliary/sound-preset-name.lua +2 -0
- package/engine/object-data/auxiliary/sound-set-name.d.ts +35 -0
- package/engine/object-data/auxiliary/sound-set-name.lua +2 -0
- package/engine/object-data/auxiliary/targeting-type.d.ts +8 -0
- package/engine/object-data/auxiliary/targeting-type.lua +2 -0
- package/engine/object-data/auxiliary/tech-tree-dependency.d.ts +16 -0
- package/engine/object-data/auxiliary/tech-tree-dependency.lua +8 -0
- package/engine/object-data/auxiliary/unit-classification.d.ts +19 -0
- package/engine/object-data/auxiliary/unit-classification.lua +50 -0
- package/engine/object-data/auxiliary/weapon-sound-type.d.ts +17 -0
- package/engine/object-data/auxiliary/weapon-sound-type.lua +2 -0
- package/engine/object-data/entry/ability-type/armor-increase.d.ts +8 -0
- package/engine/object-data/entry/ability-type/armor-increase.lua +26 -0
- package/engine/object-data/entry/ability-type/attribute-increase.d.ts +12 -0
- package/engine/object-data/entry/ability-type/attribute-increase.lua +52 -0
- package/engine/object-data/entry/ability-type/auto-attack-damage-increase.d.ts +8 -0
- package/engine/object-data/entry/ability-type/auto-attack-damage-increase.lua +26 -0
- package/engine/object-data/entry/ability-type/auto-attack-heal-reduction-effect.d.ts +12 -0
- package/engine/object-data/entry/ability-type/auto-attack-heal-reduction-effect.lua +52 -0
- package/engine/object-data/entry/ability-type/auto-attack-speed-increase.d.ts +8 -0
- package/engine/object-data/entry/ability-type/auto-attack-speed-increase.lua +26 -0
- package/engine/object-data/entry/ability-type/bash.d.ts +16 -0
- package/engine/object-data/entry/ability-type/bash.lua +78 -0
- package/engine/object-data/entry/ability-type/berserk.d.ts +10 -0
- package/engine/object-data/entry/ability-type/berserk.lua +39 -0
- package/engine/object-data/entry/ability-type/blank-configurable.d.ts +21 -0
- package/engine/object-data/entry/ability-type/blank-configurable.lua +249 -0
- package/engine/object-data/entry/ability-type/blank-passive.d.ts +7 -0
- package/engine/object-data/entry/ability-type/blank-passive.lua +28 -0
- package/engine/object-data/entry/ability-type/blizzard.d.ts +16 -0
- package/engine/object-data/entry/ability-type/blizzard.lua +78 -0
- package/engine/object-data/entry/ability-type/blood-lust.d.ts +12 -0
- package/engine/object-data/entry/ability-type/blood-lust.lua +52 -0
- package/engine/object-data/entry/ability-type/chain-lightning.d.ts +12 -0
- package/engine/object-data/entry/ability-type/chain-lightning.lua +52 -0
- package/engine/object-data/entry/ability-type/channel.d.ts +48 -0
- package/engine/object-data/entry/ability-type/channel.lua +140 -0
- package/engine/object-data/entry/ability-type/charge-gold-and-lumber.d.ts +14 -0
- package/engine/object-data/entry/ability-type/charge-gold-and-lumber.lua +65 -0
- package/engine/object-data/entry/ability-type/cleaving-attack.d.ts +8 -0
- package/engine/object-data/entry/ability-type/cleaving-attack.lua +26 -0
- package/engine/object-data/entry/ability-type/cluster-rockets.d.ts +18 -0
- package/engine/object-data/entry/ability-type/cluster-rockets.lua +91 -0
- package/engine/object-data/entry/ability-type/cripple.d.ts +12 -0
- package/engine/object-data/entry/ability-type/cripple.lua +52 -0
- package/engine/object-data/entry/ability-type/critical-strike.d.ts +18 -0
- package/engine/object-data/entry/ability-type/critical-strike.lua +91 -0
- package/engine/object-data/entry/ability-type/curse.d.ts +8 -0
- package/engine/object-data/entry/ability-type/curse.lua +26 -0
- package/engine/object-data/entry/ability-type/dark-summoning.d.ts +10 -0
- package/engine/object-data/entry/ability-type/dark-summoning.lua +39 -0
- package/engine/object-data/entry/ability-type/death-coil.d.ts +8 -0
- package/engine/object-data/entry/ability-type/death-coil.lua +26 -0
- package/engine/object-data/entry/ability-type/disease-cloud.d.ts +15 -0
- package/engine/object-data/entry/ability-type/disease-cloud.lua +65 -0
- package/engine/object-data/entry/ability-type/divine-shield.d.ts +5 -0
- package/engine/object-data/entry/ability-type/divine-shield.lua +12 -0
- package/engine/object-data/entry/ability-type/endurance-aura.d.ts +10 -0
- package/engine/object-data/entry/ability-type/endurance-aura.lua +39 -0
- package/engine/object-data/entry/ability-type/engineering-upgrade.d.ts +13 -0
- package/engine/object-data/entry/ability-type/engineering-upgrade.lua +88 -0
- package/engine/object-data/entry/ability-type/evasion.d.ts +8 -0
- package/engine/object-data/entry/ability-type/evasion.lua +26 -0
- package/engine/object-data/entry/ability-type/faerie-fire.d.ts +10 -0
- package/engine/object-data/entry/ability-type/faerie-fire.lua +39 -0
- package/engine/object-data/entry/ability-type/far-sight.d.ts +9 -0
- package/engine/object-data/entry/ability-type/far-sight.lua +26 -0
- package/engine/object-data/entry/ability-type/feral-spirit.d.ts +11 -0
- package/engine/object-data/entry/ability-type/feral-spirit.lua +39 -0
- package/engine/object-data/entry/ability-type/frenzy.d.ts +12 -0
- package/engine/object-data/entry/ability-type/frenzy.lua +52 -0
- package/engine/object-data/entry/ability-type/frost-nova.d.ts +12 -0
- package/engine/object-data/entry/ability-type/frost-nova.lua +52 -0
- package/engine/object-data/entry/ability-type/ghost-visible.d.ts +10 -0
- package/engine/object-data/entry/ability-type/ghost-visible.lua +39 -0
- package/engine/object-data/entry/ability-type/gold-mine.d.ts +12 -0
- package/engine/object-data/entry/ability-type/gold-mine.lua +52 -0
- package/engine/object-data/entry/ability-type/heal.d.ts +8 -0
- package/engine/object-data/entry/ability-type/heal.lua +26 -0
- package/engine/object-data/entry/ability-type/healing-salve.d.ts +22 -0
- package/engine/object-data/entry/ability-type/healing-salve.lua +78 -0
- package/engine/object-data/entry/ability-type/healing-spray.d.ts +18 -0
- package/engine/object-data/entry/ability-type/healing-spray.lua +91 -0
- package/engine/object-data/entry/ability-type/healing-wave.d.ts +12 -0
- package/engine/object-data/entry/ability-type/healing-wave.lua +52 -0
- package/engine/object-data/entry/ability-type/holy-light.d.ts +8 -0
- package/engine/object-data/entry/ability-type/holy-light.lua +26 -0
- package/engine/object-data/entry/ability-type/incinerate.d.ts +18 -0
- package/engine/object-data/entry/ability-type/incinerate.lua +91 -0
- package/engine/object-data/entry/ability-type/inner-fire.d.ts +14 -0
- package/engine/object-data/entry/ability-type/inner-fire.lua +65 -0
- package/engine/object-data/entry/ability-type/inventory.d.ts +16 -0
- package/engine/object-data/entry/ability-type/inventory.lua +78 -0
- package/engine/object-data/entry/ability-type/invulnerable.d.ts +5 -0
- package/engine/object-data/entry/ability-type/invulnerable.lua +12 -0
- package/engine/object-data/entry/ability-type/lightning-shield.d.ts +8 -0
- package/engine/object-data/entry/ability-type/lightning-shield.lua +26 -0
- package/engine/object-data/entry/ability-type/movement-speed-increase.d.ts +8 -0
- package/engine/object-data/entry/ability-type/movement-speed-increase.lua +26 -0
- package/engine/object-data/entry/ability-type/permanent-immolation.d.ts +8 -0
- package/engine/object-data/entry/ability-type/permanent-immolation.lua +26 -0
- package/engine/object-data/entry/ability-type/phoenix-morph.d.ts +25 -0
- package/engine/object-data/entry/ability-type/phoenix-morph.lua +130 -0
- package/engine/object-data/entry/ability-type/recall.d.ts +10 -0
- package/engine/object-data/entry/ability-type/recall.lua +39 -0
- package/engine/object-data/entry/ability-type/rejuvenation.d.ts +20 -0
- package/engine/object-data/entry/ability-type/rejuvenation.lua +65 -0
- package/engine/object-data/entry/ability-type/searing-arrows.d.ts +8 -0
- package/engine/object-data/entry/ability-type/searing-arrows.lua +26 -0
- package/engine/object-data/entry/ability-type/shock-wave.d.ts +10 -0
- package/engine/object-data/entry/ability-type/shock-wave.lua +39 -0
- package/engine/object-data/entry/ability-type/slow-poison.d.ts +12 -0
- package/engine/object-data/entry/ability-type/slow-poison.lua +52 -0
- package/engine/object-data/entry/ability-type/slow.d.ts +12 -0
- package/engine/object-data/entry/ability-type/slow.lua +52 -0
- package/engine/object-data/entry/ability-type/spell-damage-reduction.d.ts +10 -0
- package/engine/object-data/entry/ability-type/spell-damage-reduction.lua +39 -0
- package/engine/object-data/entry/ability-type/spiked-carapace.d.ts +12 -0
- package/engine/object-data/entry/ability-type/spiked-carapace.lua +52 -0
- package/engine/object-data/entry/ability-type/spirit-touch.d.ts +14 -0
- package/engine/object-data/entry/ability-type/spirit-touch.lua +65 -0
- package/engine/object-data/entry/ability-type/storm-bolt.d.ts +8 -0
- package/engine/object-data/entry/ability-type/storm-bolt.lua +26 -0
- package/engine/object-data/entry/ability-type/summon-quilbeast.d.ts +11 -0
- package/engine/object-data/entry/ability-type/summon-quilbeast.lua +39 -0
- package/engine/object-data/entry/ability-type/summon-water-elemental.d.ts +11 -0
- package/engine/object-data/entry/ability-type/summon-water-elemental.lua +39 -0
- package/engine/object-data/entry/ability-type.d.ts +148 -0
- package/engine/object-data/entry/ability-type.lua +1058 -0
- package/engine/object-data/entry/buff-type/applicable.d.ts +16 -0
- package/engine/object-data/entry/buff-type/applicable.lua +377 -0
- package/engine/object-data/entry/buff-type/blank.d.ts +8 -0
- package/engine/object-data/entry/buff-type/blank.lua +17 -0
- package/engine/object-data/entry/buff-type.d.ts +64 -0
- package/engine/object-data/entry/buff-type.lua +316 -0
- package/engine/object-data/entry/destructible-type.d.ts +21 -0
- package/engine/object-data/entry/destructible-type.lua +83 -0
- package/engine/object-data/entry/item-type/blank.d.ts +8 -0
- package/engine/object-data/entry/item-type/blank.lua +21 -0
- package/engine/object-data/entry/item-type.d.ts +49 -0
- package/engine/object-data/entry/item-type.lua +259 -0
- package/engine/object-data/entry/lightning-type.d.ts +37 -0
- package/engine/object-data/entry/lightning-type.lua +191 -0
- package/engine/object-data/entry/unit-type/blank.d.ts +6 -0
- package/engine/object-data/entry/unit-type/blank.lua +13 -0
- package/engine/object-data/entry/unit-type.d.ts +218 -0
- package/engine/object-data/entry/unit-type.lua +1306 -0
- package/engine/object-data/entry/upgrade/blank.d.ts +8 -0
- package/engine/object-data/entry/upgrade/blank.lua +22 -0
- package/engine/object-data/entry/upgrade.d.ts +59 -0
- package/engine/object-data/entry/upgrade.lua +238 -0
- package/engine/object-data/entry.d.ts +80 -0
- package/engine/object-data/entry.lua +634 -0
- package/engine/object-data/utility/object-data-entry-id-generator.d.ts +6 -0
- package/engine/object-data/utility/object-data-entry-id-generator.lua +63 -0
- package/engine/object-data/utility/order-type-string-id-factory.d.ts +9 -0
- package/engine/object-data/utility/order-type-string-id-factory.lua +368 -0
- package/engine/object-field/ability.d.ts +115 -0
- package/engine/object-field/ability.lua +471 -0
- package/engine/object-field/unit.d.ts +15 -0
- package/engine/object-field/unit.lua +49 -0
- package/engine/object-field.d.ts +84 -0
- package/engine/object-field.lua +444 -0
- package/engine/random.d.ts +10 -0
- package/engine/random.lua +9 -0
- package/engine/standard/entries/ability-type.d.ts +8 -0
- package/engine/standard/entries/ability-type.lua +8 -0
- package/engine/standard/entries/lightning-type.d.ts +16 -0
- package/engine/standard/entries/lightning-type.lua +16 -0
- package/engine/standard/entries/unit-type.d.ts +63 -0
- package/engine/standard/entries/unit-type.lua +63 -0
- package/engine/standard/entries/upgrade.d.ts +92 -0
- package/engine/standard/entries/upgrade.lua +92 -0
- package/engine/standard/fields/ability.d.ts +737 -0
- package/engine/standard/fields/ability.lua +749 -0
- package/engine/standard/pathing-textures.d.ts +6 -0
- package/engine/standard/pathing-textures.lua +7 -0
- package/engine/text-tag.d.ts +25 -0
- package/engine/text-tag.lua +109 -0
- package/engine/unit.d.ts +20 -0
- package/engine/unit.lua +31 -0
- package/event.d.ts +53 -0
- package/event.lua +269 -0
- package/exception.d.ts +17 -0
- package/exception.lua +53 -0
- package/file.d.ts +4 -0
- package/file.lua +42 -0
- package/global/math.d.ts +21 -0
- package/global/math.lua +72 -0
- package/global/vec2.d.ts +66 -0
- package/global/vec2.lua +159 -0
- package/index.d.ts +8 -0
- package/index.lua +9 -0
- package/lualib_bundle.lua +2629 -0
- package/math/vec2.d.ts +18 -0
- package/math/vec2.lua +42 -0
- package/math.d.ts +39 -0
- package/math.lua +91 -0
- package/net/signal.d.ts +11 -0
- package/net/signal.lua +56 -0
- package/net/socket.d.ts +9 -0
- package/net/socket.lua +26 -0
- package/network.d.ts +31 -0
- package/network.lua +194 -0
- package/objutil/ability.d.ts +710 -0
- package/objutil/ability.lua +3781 -0
- package/objutil/buff.d.ts +110 -0
- package/objutil/buff.lua +769 -0
- package/objutil/dummy.d.ts +2 -0
- package/objutil/dummy.lua +49 -0
- package/objutil/idgen.d.ts +9 -0
- package/objutil/idgen.lua +92 -0
- package/objutil/item.d.ts +38 -0
- package/objutil/item.lua +254 -0
- package/objutil/object.d.ts +43 -0
- package/objutil/object.lua +213 -0
- package/objutil/unit.d.ts +134 -0
- package/objutil/unit.lua +913 -0
- package/objutil/upgrade.d.ts +22 -0
- package/objutil/upgrade.lua +127 -0
- package/operation.d.ts +35 -0
- package/operation.lua +179 -0
- package/package.json +47 -0
- package/patch-lualib.d.ts +2 -0
- package/patch-lualib.lua +67 -0
- package/patch-natives.d.ts +11 -0
- package/patch-natives.lua +14 -0
- package/string.d.ts +106 -0
- package/string.lua +34 -0
- package/time/dayOfWeek.d.ts +97 -0
- package/time/dayOfWeek.lua +53 -0
- package/time/localDate.d.ts +145 -0
- package/time/localDate.lua +236 -0
- package/time/localDateTime.d.ts +133 -0
- package/time/localDateTime.lua +154 -0
- package/time/localTime.d.ts +87 -0
- package/time/localTime.lua +91 -0
- package/time/month.d.ts +146 -0
- package/time/month.lua +129 -0
- package/time/year.d.ts +117 -0
- package/time/year.lua +81 -0
- package/types.d.ts +13 -0
- package/types.lua +0 -0
- package/util/objectPool.d.ts +6 -0
- package/util/objectPool.lua +28 -0
- package/util/stream.d.ts +29 -0
- package/util/stream.lua +453 -0
- package/util/stringBuilder.d.ts +8 -0
- package/util/stringBuilder.lua +25 -0
- package/utility/arrays.d.ts +57 -0
- package/utility/arrays.lua +369 -0
- package/utility/base64.d.ts +23 -0
- package/utility/base64.lua +177 -0
- package/utility/bit-set.d.ts +18 -0
- package/utility/bit-set.lua +12 -0
- package/utility/functions.d.ts +5 -0
- package/utility/functions.lua +90 -0
- package/utility/json.d.ts +2 -0
- package/utility/json.lua +400 -0
- package/utility/linked-set.d.ts +49 -0
- package/utility/linked-set.lua +181 -0
- package/utility/lua-maps.d.ts +6 -0
- package/utility/lua-maps.lua +25 -0
- package/utility/lua-sets.d.ts +6 -0
- package/utility/lua-sets.lua +37 -0
- package/utility/lzw.d.ts +2 -0
- package/utility/lzw.lua +161 -0
- package/utility/observable-array.d.ts +17 -0
- package/utility/observable-array.lua +30 -0
- package/utility/preconditions.d.ts +23 -0
- package/utility/preconditions.lua +58 -0
- package/utility/records.d.ts +3 -0
- package/utility/records.lua +9 -0
- package/utility/reflection.d.ts +4 -0
- package/utility/reflection.lua +31 -0
- package/utility/strings.d.ts +2 -0
- package/utility/strings.lua +44 -0
- package/utility/types.d.ts +39 -0
- package/utility/types.lua +2 -0
|
@@ -0,0 +1,882 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local __TS__New = ____lualib.__TS__New
|
|
5
|
+
local __TS__ObjectDefineProperty = ____lualib.__TS__ObjectDefineProperty
|
|
6
|
+
local __TS__SetDescriptor = ____lualib.__TS__SetDescriptor
|
|
7
|
+
local ____exports = {}
|
|
8
|
+
local leftBorderFrame, rightBorderFrame
|
|
9
|
+
local ____handle = require("core.types.handle")
|
|
10
|
+
local Handle = ____handle.Handle
|
|
11
|
+
local ____player = require("core.types.player")
|
|
12
|
+
local Player = ____player.Player
|
|
13
|
+
local ____event = require("event")
|
|
14
|
+
local Event = ____event.Event
|
|
15
|
+
local TriggerEvent = ____event.TriggerEvent
|
|
16
|
+
local ____timer = require("core.types.timer")
|
|
17
|
+
local Timer = ____timer.Timer
|
|
18
|
+
local frameClick = BlzFrameClick
|
|
19
|
+
local frameGetEnable = BlzFrameGetEnable
|
|
20
|
+
local frameIsVisible = BlzFrameIsVisible
|
|
21
|
+
local frameSetEnable = BlzFrameSetEnable
|
|
22
|
+
local frameSetScale = BlzFrameSetScale
|
|
23
|
+
local getCameraTargetPositionX = GetCameraTargetPositionX
|
|
24
|
+
local getCameraTargetPositionY = GetCameraTargetPositionY
|
|
25
|
+
local ____rawget = _G.rawget
|
|
26
|
+
local rawset = _G.rawset
|
|
27
|
+
local invoke = Event.invoke
|
|
28
|
+
local FrameEvent = __TS__Class()
|
|
29
|
+
FrameEvent.name = "FrameEvent"
|
|
30
|
+
__TS__ClassExtends(FrameEvent, TriggerEvent)
|
|
31
|
+
function FrameEvent.prototype.____constructor(self, frame, eventType, c)
|
|
32
|
+
TriggerEvent.prototype.____constructor(
|
|
33
|
+
self,
|
|
34
|
+
function(trigger) return BlzTriggerRegisterFrameEvent(trigger, frame.handle, eventType) end,
|
|
35
|
+
c
|
|
36
|
+
)
|
|
37
|
+
frame.destroyEvent:addListener(function()
|
|
38
|
+
self:destroy()
|
|
39
|
+
end)
|
|
40
|
+
end
|
|
41
|
+
FrameEvent.playerCollector = function()
|
|
42
|
+
return Player:of(GetTriggerPlayer())
|
|
43
|
+
end
|
|
44
|
+
local consoleUIBackdrop = BlzGetFrameByName("ConsoleUIBackdrop", 0)
|
|
45
|
+
local leftBorder = BlzCreateFrameByType(
|
|
46
|
+
"FRAME",
|
|
47
|
+
"LeftBorderFrame",
|
|
48
|
+
consoleUIBackdrop,
|
|
49
|
+
"",
|
|
50
|
+
0
|
|
51
|
+
)
|
|
52
|
+
local rightBorder = BlzCreateFrameByType(
|
|
53
|
+
"FRAME",
|
|
54
|
+
"RightBorderFrame",
|
|
55
|
+
consoleUIBackdrop,
|
|
56
|
+
"",
|
|
57
|
+
0
|
|
58
|
+
)
|
|
59
|
+
local function updateBorders()
|
|
60
|
+
local w = BlzGetLocalClientWidth()
|
|
61
|
+
local h = BlzGetLocalClientHeight()
|
|
62
|
+
local width4by3 = (w - h / 600 * 800) / 2
|
|
63
|
+
local pxtodpi = 0.6 / h
|
|
64
|
+
BlzFrameSetAbsPoint(leftBorder, FRAMEPOINT_TOPLEFT, -width4by3 * pxtodpi, 0.6)
|
|
65
|
+
BlzFrameSetSize(leftBorder, 0.001, 0.6)
|
|
66
|
+
BlzFrameSetAbsPoint(rightBorder, FRAMEPOINT_TOPRIGHT, (-width4by3 + w) * pxtodpi, 0.6)
|
|
67
|
+
BlzFrameSetSize(rightBorder, 0.001, 0.6)
|
|
68
|
+
end
|
|
69
|
+
local worldFrame = BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0)
|
|
70
|
+
local worldFrameTooltip = BlzCreateFrameByType(
|
|
71
|
+
"FRAME",
|
|
72
|
+
"WorldFrameTooltip",
|
|
73
|
+
worldFrame,
|
|
74
|
+
"",
|
|
75
|
+
0
|
|
76
|
+
)
|
|
77
|
+
BlzFrameSetTooltip(worldFrame, worldFrameTooltip)
|
|
78
|
+
local dummyButtonOn = BlzCreateFrameByType(
|
|
79
|
+
"BUTTON",
|
|
80
|
+
"DummyButton",
|
|
81
|
+
worldFrame,
|
|
82
|
+
"",
|
|
83
|
+
0
|
|
84
|
+
)
|
|
85
|
+
local dummyButtonOff = BlzCreateFrameByType(
|
|
86
|
+
"BUTTON",
|
|
87
|
+
"DummyButton",
|
|
88
|
+
worldFrame,
|
|
89
|
+
"",
|
|
90
|
+
0
|
|
91
|
+
)
|
|
92
|
+
local syncTrigger = CreateTrigger()
|
|
93
|
+
BlzTriggerRegisterFrameEvent(syncTrigger, dummyButtonOn, FRAMEEVENT_CONTROL_CLICK)
|
|
94
|
+
BlzTriggerRegisterFrameEvent(syncTrigger, dummyButtonOff, FRAMEEVENT_CONTROL_CLICK)
|
|
95
|
+
local isMouseOnZeroSync = {}
|
|
96
|
+
local isMouseOnWorld = BlzFrameIsVisible(worldFrameTooltip)
|
|
97
|
+
local isMouseOnWorldSync = {}
|
|
98
|
+
TriggerAddAction(
|
|
99
|
+
syncTrigger,
|
|
100
|
+
function()
|
|
101
|
+
isMouseOnWorldSync[GetPlayerId(GetTriggerPlayer())] = BlzGetTriggerFrame() == dummyButtonOn
|
|
102
|
+
end
|
|
103
|
+
)
|
|
104
|
+
Timer.onPeriod[1 / 64]:addListener(function()
|
|
105
|
+
if frameIsVisible(worldFrameTooltip) ~= isMouseOnWorld then
|
|
106
|
+
isMouseOnWorld = not isMouseOnWorld
|
|
107
|
+
frameClick(isMouseOnWorld and dummyButtonOn or dummyButtonOff)
|
|
108
|
+
end
|
|
109
|
+
end)
|
|
110
|
+
____exports.FramePoint = {}
|
|
111
|
+
local FramePoint = ____exports.FramePoint
|
|
112
|
+
do
|
|
113
|
+
FramePoint.TOP_LEFT = FRAMEPOINT_TOPLEFT
|
|
114
|
+
FramePoint.TOP = FRAMEPOINT_TOP
|
|
115
|
+
FramePoint.TOP_RIGHT = FRAMEPOINT_TOPRIGHT
|
|
116
|
+
FramePoint.LEFT = FRAMEPOINT_LEFT
|
|
117
|
+
FramePoint.CENTER = FRAMEPOINT_CENTER
|
|
118
|
+
FramePoint.RIGHT = FRAMEPOINT_RIGHT
|
|
119
|
+
FramePoint.BOTTOM_LEFT = FRAMEPOINT_BOTTOMLEFT
|
|
120
|
+
FramePoint.BOTTOM = FRAMEPOINT_BOTTOM
|
|
121
|
+
FramePoint.BOTTOM_RIGHT = FRAMEPOINT_BOTTOMRIGHT
|
|
122
|
+
end
|
|
123
|
+
____exports.Frame = __TS__Class()
|
|
124
|
+
local Frame = ____exports.Frame
|
|
125
|
+
Frame.name = "Frame"
|
|
126
|
+
__TS__ClassExtends(Frame, Handle)
|
|
127
|
+
function Frame.prototype.____constructor(self, ...)
|
|
128
|
+
Handle.prototype.____constructor(self, ...)
|
|
129
|
+
self.hideCounter = 0
|
|
130
|
+
self.disableCounter = 0
|
|
131
|
+
end
|
|
132
|
+
function Frame.isMouseOnWorld(self, player)
|
|
133
|
+
if player then
|
|
134
|
+
return (isMouseOnWorldSync[player.id] or false) and not isMouseOnZeroSync[player.id]
|
|
135
|
+
end
|
|
136
|
+
return BlzFrameIsVisible(worldFrameTooltip) and not isMouseOnZeroSync[Player["local"].id]
|
|
137
|
+
end
|
|
138
|
+
function Frame.prototype.onDestroy(self)
|
|
139
|
+
BlzDestroyFrame(self.handle)
|
|
140
|
+
return Handle.prototype.onDestroy(self)
|
|
141
|
+
end
|
|
142
|
+
function Frame.prototype.getEvent(self, eventType, c)
|
|
143
|
+
self.events = self.events or ({})
|
|
144
|
+
local eventId = GetHandleId(eventType)
|
|
145
|
+
if not self.events[eventId] then
|
|
146
|
+
self.events[eventId] = __TS__New(
|
|
147
|
+
FrameEvent,
|
|
148
|
+
self,
|
|
149
|
+
eventType,
|
|
150
|
+
c and (function() return Player:of(GetTriggerPlayer()), c() end) or FrameEvent.playerCollector
|
|
151
|
+
)
|
|
152
|
+
end
|
|
153
|
+
return self.events[eventId]
|
|
154
|
+
end
|
|
155
|
+
function Frame.prototype.hide(self)
|
|
156
|
+
self.hideCounter = self.hideCounter + 1
|
|
157
|
+
if self.hideCounter > 0 then
|
|
158
|
+
BlzFrameSetVisible(self.handle, false)
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
function Frame.prototype.show(self)
|
|
162
|
+
self.hideCounter = self.hideCounter - 1
|
|
163
|
+
if self.hideCounter <= 0 then
|
|
164
|
+
self.hideCounter = 0
|
|
165
|
+
BlzFrameSetVisible(self.handle, true)
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
function Frame.prototype.disable(self)
|
|
169
|
+
self.disableCounter = self.disableCounter + 1
|
|
170
|
+
if self.disableCounter > 0 then
|
|
171
|
+
frameSetEnable(self.handle, false)
|
|
172
|
+
local onDisable = ____rawget(self, "onDisable")
|
|
173
|
+
if onDisable ~= nil then
|
|
174
|
+
invoke(onDisable)
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
function Frame.prototype.enable(self)
|
|
179
|
+
self.disableCounter = self.disableCounter - 1
|
|
180
|
+
if self.disableCounter <= 0 then
|
|
181
|
+
self.disableCounter = 0
|
|
182
|
+
frameSetEnable(self.handle, true)
|
|
183
|
+
local onEnable = ____rawget(self, "onEnable")
|
|
184
|
+
if onEnable ~= nil then
|
|
185
|
+
invoke(onEnable)
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
function Frame.prototype.addText(self, text)
|
|
190
|
+
BlzFrameAddText(self.handle, text)
|
|
191
|
+
end
|
|
192
|
+
function Frame.prototype.clearAllPoints(self)
|
|
193
|
+
BlzFrameClearAllPoints(self.handle)
|
|
194
|
+
end
|
|
195
|
+
function Frame.prototype.getChild(self, index)
|
|
196
|
+
return ____exports.Frame:of(BlzFrameGetChild(self.handle, index))
|
|
197
|
+
end
|
|
198
|
+
function Frame.prototype.getChildrenCount(self)
|
|
199
|
+
return BlzFrameGetChildrenCount(self.handle)
|
|
200
|
+
end
|
|
201
|
+
function Frame.prototype.setSize(self, width, height)
|
|
202
|
+
BlzFrameSetSize(self.handle, width, height)
|
|
203
|
+
end
|
|
204
|
+
function Frame.prototype.setPoint(self, point, relative, relativePoint, x, y)
|
|
205
|
+
BlzFrameSetPoint(
|
|
206
|
+
self.handle,
|
|
207
|
+
point,
|
|
208
|
+
relative.handle,
|
|
209
|
+
relativePoint,
|
|
210
|
+
x,
|
|
211
|
+
y
|
|
212
|
+
)
|
|
213
|
+
end
|
|
214
|
+
function Frame.prototype.setAbsPoint(self, point, x, y)
|
|
215
|
+
BlzFrameSetAbsPoint(self.handle, point, x, y)
|
|
216
|
+
end
|
|
217
|
+
function Frame.prototype.setAllPoints(self, other)
|
|
218
|
+
BlzFrameSetAllPoints(self.handle, other.handle)
|
|
219
|
+
end
|
|
220
|
+
function Frame.prototype.setFont(self, filename, height, flags)
|
|
221
|
+
BlzFrameSetFont(self.handle, filename, height, flags)
|
|
222
|
+
end
|
|
223
|
+
function Frame.prototype.setTexture(self, filename, flag, blend)
|
|
224
|
+
BlzFrameSetTexture(self.handle, filename, flag, blend)
|
|
225
|
+
end
|
|
226
|
+
function Frame.prototype.setTextAlignment(self, vert, horz)
|
|
227
|
+
BlzFrameSetTextAlignment(self.handle, vert, horz)
|
|
228
|
+
end
|
|
229
|
+
function Frame.prototype.setVertexColor(self, color)
|
|
230
|
+
BlzFrameSetVertexColor(
|
|
231
|
+
self.handle,
|
|
232
|
+
BlzConvertColor(color.a, color.r, color.g, color.b)
|
|
233
|
+
)
|
|
234
|
+
end
|
|
235
|
+
function Frame.prototype.setTextColor(self, color)
|
|
236
|
+
BlzFrameSetTextColor(
|
|
237
|
+
self.handle,
|
|
238
|
+
BlzConvertColor(color.a, color.r, color.g, color.b)
|
|
239
|
+
)
|
|
240
|
+
end
|
|
241
|
+
function Frame.prototype.setTooltip(self, tooltip)
|
|
242
|
+
BlzFrameSetTooltip(self.handle, tooltip.handle)
|
|
243
|
+
end
|
|
244
|
+
function Frame.prototype.setMinMaxValue(self, minValue, maxValue)
|
|
245
|
+
BlzFrameSetMinMaxValue(self.handle, minValue, maxValue)
|
|
246
|
+
end
|
|
247
|
+
function Frame.prototype.setStepSize(self, stepSize)
|
|
248
|
+
BlzFrameSetStepSize(self.handle, stepSize)
|
|
249
|
+
end
|
|
250
|
+
function Frame.prototype.setFocus(self, flag)
|
|
251
|
+
BlzFrameSetFocus(self.handle, flag)
|
|
252
|
+
end
|
|
253
|
+
function Frame.prototype.resetFocus(self)
|
|
254
|
+
if BlzFrameGetEnable(self.handle) then
|
|
255
|
+
BlzFrameSetEnable(self.handle, false)
|
|
256
|
+
BlzFrameSetEnable(self.handle, true)
|
|
257
|
+
end
|
|
258
|
+
end
|
|
259
|
+
function Frame.prototype.click(self)
|
|
260
|
+
BlzFrameClick(self.handle)
|
|
261
|
+
end
|
|
262
|
+
function Frame.createSimple(self, name, parent, createContext)
|
|
263
|
+
return self:of(BlzCreateSimpleFrame(
|
|
264
|
+
name,
|
|
265
|
+
parent and parent.handle or BlzGetOriginFrame(ORIGIN_FRAME_SIMPLE_UI_PARENT, 0),
|
|
266
|
+
createContext or 0
|
|
267
|
+
))
|
|
268
|
+
end
|
|
269
|
+
function Frame.create(self, name, parent, priority, createContext)
|
|
270
|
+
return self:of(BlzCreateFrame(name, parent.handle, priority or 0, createContext or 0))
|
|
271
|
+
end
|
|
272
|
+
function Frame.createByType(self, typeName, name, parent, inherits, createContext)
|
|
273
|
+
return self:of(BlzCreateFrameByType(
|
|
274
|
+
typeName,
|
|
275
|
+
name,
|
|
276
|
+
parent.handle,
|
|
277
|
+
inherits or "",
|
|
278
|
+
createContext or 0
|
|
279
|
+
))
|
|
280
|
+
end
|
|
281
|
+
function Frame.byName(self, name, context)
|
|
282
|
+
if context == nil then
|
|
283
|
+
context = 0
|
|
284
|
+
end
|
|
285
|
+
return self:of(BlzGetFrameByName(name, context))
|
|
286
|
+
end
|
|
287
|
+
function Frame.byOrigin(self, frameType, index)
|
|
288
|
+
if index == nil then
|
|
289
|
+
index = 0
|
|
290
|
+
end
|
|
291
|
+
return self:of(BlzGetOriginFrame(frameType, index))
|
|
292
|
+
end
|
|
293
|
+
Frame.GAME_UI = ____exports.Frame:byOrigin(ORIGIN_FRAME_GAME_UI)
|
|
294
|
+
Frame.CONSOLE_UI = ____exports.Frame:byOrigin(ORIGIN_FRAME_SIMPLE_UI_PARENT)
|
|
295
|
+
Frame.CONSOLE_UI_BACKDROP = ____exports.Frame:byName("ConsoleUIBackdrop")
|
|
296
|
+
Frame.WORLD = ____exports.Frame:byOrigin(ORIGIN_FRAME_WORLD_FRAME)
|
|
297
|
+
Frame.CHAT = ____exports.Frame:byOrigin(ORIGIN_FRAME_CHAT_MSG)
|
|
298
|
+
Frame.TIME_OF_DAY_CLOCK = ____exports.Frame.GAME_UI:getChild(5):getChild(0)
|
|
299
|
+
__TS__ObjectDefineProperty(
|
|
300
|
+
Frame,
|
|
301
|
+
"leftBorder",
|
|
302
|
+
{get = function(self)
|
|
303
|
+
Timer.onPeriod[1 / 64]:addListener(updateBorders)
|
|
304
|
+
rawset(self, "leftBorder", leftBorderFrame)
|
|
305
|
+
rawset(self, "rightBorder", rightBorderFrame)
|
|
306
|
+
return leftBorderFrame
|
|
307
|
+
end}
|
|
308
|
+
)
|
|
309
|
+
__TS__ObjectDefineProperty(
|
|
310
|
+
Frame,
|
|
311
|
+
"rightBorder",
|
|
312
|
+
{get = function(self)
|
|
313
|
+
Timer.onPeriod[1 / 64]:addListener(updateBorders)
|
|
314
|
+
rawset(self, "leftBorder", leftBorderFrame)
|
|
315
|
+
rawset(self, "rightBorder", rightBorderFrame)
|
|
316
|
+
return rightBorderFrame
|
|
317
|
+
end}
|
|
318
|
+
)
|
|
319
|
+
__TS__ObjectDefineProperty(
|
|
320
|
+
Frame,
|
|
321
|
+
"minX",
|
|
322
|
+
{get = function(self)
|
|
323
|
+
local w = BlzGetLocalClientWidth()
|
|
324
|
+
local h = BlzGetLocalClientHeight()
|
|
325
|
+
local width4by3 = (w - h / 600 * 800) / 2
|
|
326
|
+
local pxtodpi = 0.6 / h
|
|
327
|
+
return -width4by3 * pxtodpi
|
|
328
|
+
end}
|
|
329
|
+
)
|
|
330
|
+
__TS__ObjectDefineProperty(
|
|
331
|
+
Frame,
|
|
332
|
+
"maxX",
|
|
333
|
+
{get = function(self)
|
|
334
|
+
local w = BlzGetLocalClientWidth()
|
|
335
|
+
local h = BlzGetLocalClientHeight()
|
|
336
|
+
local width4by3 = (w - h / 600 * 800) / 2
|
|
337
|
+
local pxtodpi = 0.6 / h
|
|
338
|
+
return (-width4by3 + w) * pxtodpi
|
|
339
|
+
end}
|
|
340
|
+
)
|
|
341
|
+
Frame.centerX = 0.4
|
|
342
|
+
Frame.minY = 0
|
|
343
|
+
Frame.maxY = 0.6
|
|
344
|
+
Frame.centerY = 0.3
|
|
345
|
+
__TS__SetDescriptor(
|
|
346
|
+
Frame.prototype,
|
|
347
|
+
"visible",
|
|
348
|
+
{
|
|
349
|
+
get = function(self)
|
|
350
|
+
return BlzFrameIsVisible(self.handle)
|
|
351
|
+
end,
|
|
352
|
+
set = function(self, visible)
|
|
353
|
+
BlzFrameSetVisible(self.handle, visible)
|
|
354
|
+
self.hideCounter = visible and 0 or 1
|
|
355
|
+
end
|
|
356
|
+
},
|
|
357
|
+
true
|
|
358
|
+
)
|
|
359
|
+
__TS__SetDescriptor(
|
|
360
|
+
Frame.prototype,
|
|
361
|
+
"enabled",
|
|
362
|
+
{
|
|
363
|
+
get = function(self)
|
|
364
|
+
return frameGetEnable(self.handle)
|
|
365
|
+
end,
|
|
366
|
+
set = function(self, enabled)
|
|
367
|
+
if frameGetEnable(self.handle) ~= enabled then
|
|
368
|
+
frameSetEnable(self.handle, enabled)
|
|
369
|
+
if enabled then
|
|
370
|
+
local onEnable = ____rawget(self, "onEnable")
|
|
371
|
+
if onEnable ~= nil then
|
|
372
|
+
invoke(onEnable)
|
|
373
|
+
end
|
|
374
|
+
else
|
|
375
|
+
local onDisable = ____rawget(self, "onDisable")
|
|
376
|
+
if onDisable ~= nil then
|
|
377
|
+
invoke(onDisable)
|
|
378
|
+
end
|
|
379
|
+
end
|
|
380
|
+
end
|
|
381
|
+
self.disableCounter = enabled and 0 or 1
|
|
382
|
+
end
|
|
383
|
+
},
|
|
384
|
+
true
|
|
385
|
+
)
|
|
386
|
+
__TS__SetDescriptor(
|
|
387
|
+
Frame.prototype,
|
|
388
|
+
"parent",
|
|
389
|
+
{
|
|
390
|
+
get = function(self)
|
|
391
|
+
return ____exports.Frame:of(BlzFrameGetParent(self.handle))
|
|
392
|
+
end,
|
|
393
|
+
set = function(self, parent)
|
|
394
|
+
BlzFrameSetParent(self.handle, parent.handle)
|
|
395
|
+
end
|
|
396
|
+
},
|
|
397
|
+
true
|
|
398
|
+
)
|
|
399
|
+
__TS__SetDescriptor(
|
|
400
|
+
Frame.prototype,
|
|
401
|
+
"text",
|
|
402
|
+
{
|
|
403
|
+
get = function(self)
|
|
404
|
+
return BlzFrameGetText(self.handle)
|
|
405
|
+
end,
|
|
406
|
+
set = function(self, text)
|
|
407
|
+
BlzFrameSetText(self.handle, text)
|
|
408
|
+
end
|
|
409
|
+
},
|
|
410
|
+
true
|
|
411
|
+
)
|
|
412
|
+
__TS__SetDescriptor(
|
|
413
|
+
Frame.prototype,
|
|
414
|
+
"textSizeLimit",
|
|
415
|
+
{
|
|
416
|
+
get = function(self)
|
|
417
|
+
return BlzFrameGetTextSizeLimit(self.handle)
|
|
418
|
+
end,
|
|
419
|
+
set = function(self, size)
|
|
420
|
+
BlzFrameSetTextSizeLimit(self.handle, size)
|
|
421
|
+
end
|
|
422
|
+
},
|
|
423
|
+
true
|
|
424
|
+
)
|
|
425
|
+
__TS__SetDescriptor(
|
|
426
|
+
Frame.prototype,
|
|
427
|
+
"value",
|
|
428
|
+
{
|
|
429
|
+
get = function(self)
|
|
430
|
+
return BlzFrameGetValue(self.handle)
|
|
431
|
+
end,
|
|
432
|
+
set = function(self, value)
|
|
433
|
+
BlzFrameSetValue(self.handle, value)
|
|
434
|
+
end
|
|
435
|
+
},
|
|
436
|
+
true
|
|
437
|
+
)
|
|
438
|
+
__TS__SetDescriptor(
|
|
439
|
+
Frame.prototype,
|
|
440
|
+
"height",
|
|
441
|
+
{
|
|
442
|
+
get = function(self)
|
|
443
|
+
return BlzFrameGetHeight(self.handle)
|
|
444
|
+
end,
|
|
445
|
+
set = function(self, height)
|
|
446
|
+
BlzFrameSetSize(self.handle, self.width, height)
|
|
447
|
+
end
|
|
448
|
+
},
|
|
449
|
+
true
|
|
450
|
+
)
|
|
451
|
+
__TS__SetDescriptor(
|
|
452
|
+
Frame.prototype,
|
|
453
|
+
"width",
|
|
454
|
+
{
|
|
455
|
+
get = function(self)
|
|
456
|
+
return BlzFrameGetWidth(self.handle)
|
|
457
|
+
end,
|
|
458
|
+
set = function(self, width)
|
|
459
|
+
BlzFrameSetSize(self.handle, width, self.height)
|
|
460
|
+
end
|
|
461
|
+
},
|
|
462
|
+
true
|
|
463
|
+
)
|
|
464
|
+
__TS__SetDescriptor(
|
|
465
|
+
Frame.prototype,
|
|
466
|
+
"alpha",
|
|
467
|
+
{
|
|
468
|
+
get = function(self)
|
|
469
|
+
return BlzFrameGetAlpha(self.handle)
|
|
470
|
+
end,
|
|
471
|
+
set = function(self, alpha)
|
|
472
|
+
BlzFrameSetAlpha(self.handle, alpha)
|
|
473
|
+
end
|
|
474
|
+
},
|
|
475
|
+
true
|
|
476
|
+
)
|
|
477
|
+
__TS__SetDescriptor(
|
|
478
|
+
Frame.prototype,
|
|
479
|
+
"scale",
|
|
480
|
+
{
|
|
481
|
+
get = function(self)
|
|
482
|
+
return self._scale or 1
|
|
483
|
+
end,
|
|
484
|
+
set = function(self, v)
|
|
485
|
+
frameSetScale(self.handle, v)
|
|
486
|
+
self._scale = v ~= 1 and v or nil
|
|
487
|
+
end
|
|
488
|
+
},
|
|
489
|
+
true
|
|
490
|
+
)
|
|
491
|
+
__TS__SetDescriptor(
|
|
492
|
+
Frame.prototype,
|
|
493
|
+
"name",
|
|
494
|
+
{get = function(self)
|
|
495
|
+
return BlzFrameGetName(self.handle)
|
|
496
|
+
end},
|
|
497
|
+
true
|
|
498
|
+
)
|
|
499
|
+
__TS__SetDescriptor(
|
|
500
|
+
Frame.prototype,
|
|
501
|
+
"onClick",
|
|
502
|
+
{get = function(self)
|
|
503
|
+
return self:getEvent(FRAMEEVENT_CONTROL_CLICK)
|
|
504
|
+
end},
|
|
505
|
+
true
|
|
506
|
+
)
|
|
507
|
+
__TS__SetDescriptor(
|
|
508
|
+
Frame.prototype,
|
|
509
|
+
"onCheckboxChecked",
|
|
510
|
+
{get = function(self)
|
|
511
|
+
return self:getEvent(FRAMEEVENT_CHECKBOX_CHECKED)
|
|
512
|
+
end},
|
|
513
|
+
true
|
|
514
|
+
)
|
|
515
|
+
__TS__SetDescriptor(
|
|
516
|
+
Frame.prototype,
|
|
517
|
+
"onCheckboxUnchecked",
|
|
518
|
+
{get = function(self)
|
|
519
|
+
return self:getEvent(FRAMEEVENT_CHECKBOX_UNCHECKED)
|
|
520
|
+
end},
|
|
521
|
+
true
|
|
522
|
+
)
|
|
523
|
+
__TS__SetDescriptor(
|
|
524
|
+
Frame.prototype,
|
|
525
|
+
"onEnter",
|
|
526
|
+
{get = function(self)
|
|
527
|
+
return self:getEvent(FRAMEEVENT_EDITBOX_ENTER)
|
|
528
|
+
end},
|
|
529
|
+
true
|
|
530
|
+
)
|
|
531
|
+
__TS__SetDescriptor(
|
|
532
|
+
Frame.prototype,
|
|
533
|
+
"onMouseDoubleClick",
|
|
534
|
+
{get = function(self)
|
|
535
|
+
return self:getEvent(FRAMEEVENT_MOUSE_DOUBLECLICK)
|
|
536
|
+
end},
|
|
537
|
+
true
|
|
538
|
+
)
|
|
539
|
+
__TS__SetDescriptor(
|
|
540
|
+
Frame.prototype,
|
|
541
|
+
"onMouseDown",
|
|
542
|
+
{get = function(self)
|
|
543
|
+
self.events = self.events or ({})
|
|
544
|
+
local eventId = GetHandleId(FRAMEEVENT_MOUSE_DOWN)
|
|
545
|
+
if not self.events[eventId] then
|
|
546
|
+
local event = __TS__New(Event)
|
|
547
|
+
self.mouseInside = {}
|
|
548
|
+
self.onMouseEnter:addListener(function(player)
|
|
549
|
+
self.mouseInside[player.id] = true
|
|
550
|
+
end)
|
|
551
|
+
self.onMouseLeave:addListener(function(player)
|
|
552
|
+
self.mouseInside[player.id] = false
|
|
553
|
+
end)
|
|
554
|
+
Player.onMouseDown:addListener(function(player, button)
|
|
555
|
+
if self.mouseInside[player.id] then
|
|
556
|
+
Event.invoke(event, player, button)
|
|
557
|
+
end
|
|
558
|
+
end)
|
|
559
|
+
self.events[eventId] = event
|
|
560
|
+
end
|
|
561
|
+
return self.events[eventId]
|
|
562
|
+
end},
|
|
563
|
+
true
|
|
564
|
+
)
|
|
565
|
+
__TS__SetDescriptor(
|
|
566
|
+
Frame.prototype,
|
|
567
|
+
"onMouseEnter",
|
|
568
|
+
{get = function(self)
|
|
569
|
+
return self:getEvent(FRAMEEVENT_MOUSE_ENTER)
|
|
570
|
+
end},
|
|
571
|
+
true
|
|
572
|
+
)
|
|
573
|
+
__TS__SetDescriptor(
|
|
574
|
+
Frame.prototype,
|
|
575
|
+
"onMouseLeave",
|
|
576
|
+
{get = function(self)
|
|
577
|
+
return self:getEvent(FRAMEEVENT_MOUSE_LEAVE)
|
|
578
|
+
end},
|
|
579
|
+
true
|
|
580
|
+
)
|
|
581
|
+
__TS__SetDescriptor(
|
|
582
|
+
Frame.prototype,
|
|
583
|
+
"onMouseUp",
|
|
584
|
+
{get = function(self)
|
|
585
|
+
return self:getEvent(FRAMEEVENT_MOUSE_UP)
|
|
586
|
+
end},
|
|
587
|
+
true
|
|
588
|
+
)
|
|
589
|
+
__TS__SetDescriptor(
|
|
590
|
+
Frame.prototype,
|
|
591
|
+
"onMouseWheel",
|
|
592
|
+
{get = function(self)
|
|
593
|
+
return self:getEvent(
|
|
594
|
+
FRAMEEVENT_MOUSE_WHEEL,
|
|
595
|
+
function() return BlzGetTriggerFrameValue() / 120 end
|
|
596
|
+
)
|
|
597
|
+
end},
|
|
598
|
+
true
|
|
599
|
+
)
|
|
600
|
+
__TS__SetDescriptor(
|
|
601
|
+
Frame.prototype,
|
|
602
|
+
"popupMenuItemChangeEvent",
|
|
603
|
+
{get = function(self)
|
|
604
|
+
local value = self.value
|
|
605
|
+
return self:getEvent(
|
|
606
|
+
FRAMEEVENT_POPUPMENU_ITEM_CHANGED,
|
|
607
|
+
function()
|
|
608
|
+
local previousValue = value
|
|
609
|
+
value = BlzGetTriggerFrameValue()
|
|
610
|
+
return self, previousValue, value
|
|
611
|
+
end
|
|
612
|
+
)
|
|
613
|
+
end},
|
|
614
|
+
true
|
|
615
|
+
)
|
|
616
|
+
__TS__SetDescriptor(
|
|
617
|
+
Frame.prototype,
|
|
618
|
+
"valueChangeLocalEvent",
|
|
619
|
+
{get = function(self)
|
|
620
|
+
local event = __TS__New(Event)
|
|
621
|
+
local lastValue = self.value
|
|
622
|
+
local function listener()
|
|
623
|
+
if self.value ~= lastValue then
|
|
624
|
+
local newValue = self.value
|
|
625
|
+
Event.invoke(event, self, lastValue, newValue)
|
|
626
|
+
lastValue = newValue
|
|
627
|
+
end
|
|
628
|
+
end
|
|
629
|
+
Timer.onPeriod[1 / 64]:addListener(listener)
|
|
630
|
+
self.destroyEvent:addListener(function()
|
|
631
|
+
Timer.onPeriod[1 / 64]:removeListener(listener)
|
|
632
|
+
end)
|
|
633
|
+
rawset(self, "valueChangeLocalEvent", event)
|
|
634
|
+
return event
|
|
635
|
+
end},
|
|
636
|
+
true
|
|
637
|
+
)
|
|
638
|
+
__TS__SetDescriptor(
|
|
639
|
+
Frame.prototype,
|
|
640
|
+
"onSliderValueChanged",
|
|
641
|
+
{get = function(self)
|
|
642
|
+
return self:getEvent(
|
|
643
|
+
FRAMEEVENT_SLIDER_VALUE_CHANGED,
|
|
644
|
+
function() return BlzGetTriggerFrameValue() end
|
|
645
|
+
)
|
|
646
|
+
end},
|
|
647
|
+
true
|
|
648
|
+
)
|
|
649
|
+
__TS__SetDescriptor(
|
|
650
|
+
Frame.prototype,
|
|
651
|
+
"onEditBoxTextChange",
|
|
652
|
+
{get = function(self)
|
|
653
|
+
return self:getEvent(
|
|
654
|
+
FRAMEEVENT_EDITBOX_TEXT_CHANGED,
|
|
655
|
+
function() return BlzGetTriggerFrameText() end
|
|
656
|
+
)
|
|
657
|
+
end},
|
|
658
|
+
true
|
|
659
|
+
)
|
|
660
|
+
__TS__SetDescriptor(
|
|
661
|
+
Frame.prototype,
|
|
662
|
+
"onEditBoxTextChangeLocal",
|
|
663
|
+
{get = function(self)
|
|
664
|
+
local event = __TS__New(Event)
|
|
665
|
+
local lastValue = self.text
|
|
666
|
+
local function listener()
|
|
667
|
+
if self.text ~= lastValue then
|
|
668
|
+
local newValue = self.text
|
|
669
|
+
Event.invoke(event, self, lastValue, newValue)
|
|
670
|
+
lastValue = newValue
|
|
671
|
+
end
|
|
672
|
+
end
|
|
673
|
+
Timer.onPeriod[1 / 64]:addListener(listener)
|
|
674
|
+
self.destroyEvent:addListener(function()
|
|
675
|
+
Timer.onPeriod[1 / 64]:removeListener(listener)
|
|
676
|
+
end)
|
|
677
|
+
rawset(self, "onEditBoxTextChangeLocal", event)
|
|
678
|
+
return event
|
|
679
|
+
end},
|
|
680
|
+
true
|
|
681
|
+
)
|
|
682
|
+
__TS__SetDescriptor(
|
|
683
|
+
Frame.prototype,
|
|
684
|
+
"onEnable",
|
|
685
|
+
{get = function(self)
|
|
686
|
+
local event = __TS__New(Event)
|
|
687
|
+
rawset(self, "onEnable", event)
|
|
688
|
+
return event
|
|
689
|
+
end},
|
|
690
|
+
true
|
|
691
|
+
)
|
|
692
|
+
__TS__SetDescriptor(
|
|
693
|
+
Frame.prototype,
|
|
694
|
+
"onDisable",
|
|
695
|
+
{get = function(self)
|
|
696
|
+
local event = __TS__New(Event)
|
|
697
|
+
rawset(self, "onDisable", event)
|
|
698
|
+
return event
|
|
699
|
+
end},
|
|
700
|
+
true
|
|
701
|
+
)
|
|
702
|
+
__TS__ObjectDefineProperty(
|
|
703
|
+
Frame,
|
|
704
|
+
"onKeyPress",
|
|
705
|
+
{get = function(self)
|
|
706
|
+
if not self.onKeyPressEvent then
|
|
707
|
+
self.onKeyPressEvent = __TS__New(
|
|
708
|
+
TriggerEvent,
|
|
709
|
+
function(trigger) return Timer:simple(
|
|
710
|
+
0,
|
|
711
|
+
function()
|
|
712
|
+
do
|
|
713
|
+
local oskey = 10
|
|
714
|
+
while oskey < 255 do
|
|
715
|
+
do
|
|
716
|
+
local metakey = 0
|
|
717
|
+
while metakey < 5 do
|
|
718
|
+
for ____, player in ipairs(Player.all) do
|
|
719
|
+
BlzTriggerRegisterPlayerKeyEvent(
|
|
720
|
+
trigger,
|
|
721
|
+
player.handle,
|
|
722
|
+
ConvertOsKeyType(oskey),
|
|
723
|
+
metakey,
|
|
724
|
+
true
|
|
725
|
+
)
|
|
726
|
+
end
|
|
727
|
+
metakey = metakey + 1
|
|
728
|
+
end
|
|
729
|
+
end
|
|
730
|
+
oskey = oskey + 1
|
|
731
|
+
end
|
|
732
|
+
end
|
|
733
|
+
end
|
|
734
|
+
) end,
|
|
735
|
+
function() return Player:of(GetTriggerPlayer()), BlzGetTriggerPlayerKey(), BlzGetTriggerPlayerMetaKey() end
|
|
736
|
+
)
|
|
737
|
+
end
|
|
738
|
+
return self.onKeyPressEvent
|
|
739
|
+
end}
|
|
740
|
+
)
|
|
741
|
+
__TS__ObjectDefineProperty(
|
|
742
|
+
Frame,
|
|
743
|
+
"onKeyRelease",
|
|
744
|
+
{get = function(self)
|
|
745
|
+
if not self.onKeyReleaseEvent then
|
|
746
|
+
self.onKeyReleaseEvent = __TS__New(
|
|
747
|
+
TriggerEvent,
|
|
748
|
+
function(trigger) return Timer:simple(
|
|
749
|
+
0,
|
|
750
|
+
function()
|
|
751
|
+
do
|
|
752
|
+
local oskey = 10
|
|
753
|
+
while oskey < 255 do
|
|
754
|
+
do
|
|
755
|
+
local metakey = 0
|
|
756
|
+
while metakey < 5 do
|
|
757
|
+
for ____, player in ipairs(Player.all) do
|
|
758
|
+
BlzTriggerRegisterPlayerKeyEvent(
|
|
759
|
+
trigger,
|
|
760
|
+
player.handle,
|
|
761
|
+
ConvertOsKeyType(oskey),
|
|
762
|
+
metakey,
|
|
763
|
+
false
|
|
764
|
+
)
|
|
765
|
+
end
|
|
766
|
+
metakey = metakey + 1
|
|
767
|
+
end
|
|
768
|
+
end
|
|
769
|
+
oskey = oskey + 1
|
|
770
|
+
end
|
|
771
|
+
end
|
|
772
|
+
end
|
|
773
|
+
) end,
|
|
774
|
+
function() return Player:of(GetTriggerPlayer()), BlzGetTriggerPlayerKey(), BlzGetTriggerPlayerMetaKey() end
|
|
775
|
+
)
|
|
776
|
+
end
|
|
777
|
+
return self.onKeyReleaseEvent
|
|
778
|
+
end}
|
|
779
|
+
)
|
|
780
|
+
__TS__ObjectDefineProperty(
|
|
781
|
+
Frame,
|
|
782
|
+
"onMouseUp",
|
|
783
|
+
{get = function(self)
|
|
784
|
+
local event = __TS__New(
|
|
785
|
+
TriggerEvent,
|
|
786
|
+
function(trigger) return Timer:simple(
|
|
787
|
+
0,
|
|
788
|
+
function()
|
|
789
|
+
for ____, player in ipairs(Player.all) do
|
|
790
|
+
TriggerRegisterPlayerEvent(trigger, player.handle, EVENT_PLAYER_MOUSE_UP)
|
|
791
|
+
end
|
|
792
|
+
end
|
|
793
|
+
) end,
|
|
794
|
+
function() return Player:of(GetTriggerPlayer()), BlzGetTriggerPlayerMouseButton(), BlzGetTriggerPlayerMouseX(), BlzGetTriggerPlayerMouseY() end
|
|
795
|
+
)
|
|
796
|
+
rawset(____exports.Frame, "onMouseUp", event)
|
|
797
|
+
return event
|
|
798
|
+
end}
|
|
799
|
+
)
|
|
800
|
+
__TS__ObjectDefineProperty(
|
|
801
|
+
Frame,
|
|
802
|
+
"onMouseDown",
|
|
803
|
+
{get = function(self)
|
|
804
|
+
if not self.onMouseDownEvent then
|
|
805
|
+
self.onMouseDownEvent = __TS__New(
|
|
806
|
+
TriggerEvent,
|
|
807
|
+
function(trigger) return Timer:simple(
|
|
808
|
+
0,
|
|
809
|
+
function()
|
|
810
|
+
for ____, player in ipairs(Player.all) do
|
|
811
|
+
TriggerRegisterPlayerEvent(trigger, player.handle, EVENT_PLAYER_MOUSE_DOWN)
|
|
812
|
+
end
|
|
813
|
+
end
|
|
814
|
+
) end,
|
|
815
|
+
function() return Player:of(GetTriggerPlayer()), BlzGetTriggerPlayerMouseButton(), BlzGetTriggerPlayerMouseX(), BlzGetTriggerPlayerMouseY() end
|
|
816
|
+
)
|
|
817
|
+
end
|
|
818
|
+
return self.onMouseDownEvent
|
|
819
|
+
end}
|
|
820
|
+
)
|
|
821
|
+
__TS__ObjectDefineProperty(
|
|
822
|
+
Frame,
|
|
823
|
+
"onMouseMove",
|
|
824
|
+
{get = function(self)
|
|
825
|
+
local event = __TS__New(
|
|
826
|
+
TriggerEvent,
|
|
827
|
+
function(trigger) return Timer:simple(
|
|
828
|
+
0,
|
|
829
|
+
function()
|
|
830
|
+
for ____, player in ipairs(Player.all) do
|
|
831
|
+
TriggerRegisterPlayerEvent(trigger, player.handle, EVENT_PLAYER_MOUSE_MOVE)
|
|
832
|
+
end
|
|
833
|
+
end
|
|
834
|
+
) end,
|
|
835
|
+
function() return Player:of(GetTriggerPlayer()), BlzGetTriggerPlayerMouseX(), BlzGetTriggerPlayerMouseY() end
|
|
836
|
+
)
|
|
837
|
+
rawset(____exports.Frame, "onMouseMove", event)
|
|
838
|
+
return event
|
|
839
|
+
end}
|
|
840
|
+
)
|
|
841
|
+
__TS__ObjectDefineProperty(
|
|
842
|
+
Frame,
|
|
843
|
+
"onMouseMoveLocal",
|
|
844
|
+
{get = function(self)
|
|
845
|
+
local invoke = Event.invoke
|
|
846
|
+
local event = __TS__New(Event)
|
|
847
|
+
local syncX = 0
|
|
848
|
+
local syncY = 0
|
|
849
|
+
local syncCamX = getCameraTargetPositionX()
|
|
850
|
+
local syncCamY = getCameraTargetPositionY()
|
|
851
|
+
local lastX = syncX
|
|
852
|
+
local lastY = syncY
|
|
853
|
+
self.onMouseMove:addListener(function(player, x, y)
|
|
854
|
+
if player.isLocal then
|
|
855
|
+
syncX = x
|
|
856
|
+
syncY = y
|
|
857
|
+
syncCamX = getCameraTargetPositionX()
|
|
858
|
+
syncCamY = getCameraTargetPositionY()
|
|
859
|
+
lastX = x
|
|
860
|
+
lastY = y
|
|
861
|
+
invoke(event, x, y)
|
|
862
|
+
end
|
|
863
|
+
end)
|
|
864
|
+
Timer.onPeriod[1 / 64]:addListener(function()
|
|
865
|
+
if syncX == 0 and syncY == 0 then
|
|
866
|
+
return
|
|
867
|
+
end
|
|
868
|
+
local x = syncX + (getCameraTargetPositionX() - syncCamX)
|
|
869
|
+
local y = syncY + (getCameraTargetPositionY() - syncCamY)
|
|
870
|
+
if x ~= lastX or y ~= lastY then
|
|
871
|
+
lastX = x
|
|
872
|
+
lastY = y
|
|
873
|
+
invoke(event, x, y)
|
|
874
|
+
end
|
|
875
|
+
end)
|
|
876
|
+
rawset(____exports.Frame, "onMouseMoveLocal", event)
|
|
877
|
+
return event
|
|
878
|
+
end}
|
|
879
|
+
)
|
|
880
|
+
leftBorderFrame = ____exports.Frame:of(leftBorder)
|
|
881
|
+
rightBorderFrame = ____exports.Frame:of(rightBorder)
|
|
882
|
+
return ____exports
|