Skip to content

HeroesReplay/sc2-layouts

 
 

Repository files navigation

StarCraft II Layouts

Visual Studio Code extension introducing extensive support for SC2Layout language, utilized in games like StarCraft II and Heroes of the Storm.

Schema files of SC2Layout are hosted in its own repository, from which this extension will always pull most recent version.

Features

It provides all basic stuff you'd expect from extension of this sort. However, it also includes some more obscure things - this section will briefly mention these.


Custom abbreviations

Quick and convenient way for inserting code snippets.

They function the same way as normal code completions, with one exception - they're supposed to be triggered directly inside content of XML element. Upon accepting they'll be expanded to include all boilerplate code.

Frame declarations

Syntax: :FrameType

abbrv-frame-declaration

Desc overrides

Syntax: /Filename/Path/ToTheFrame/Image

abbrv-desc-override

  • Works with Frames, Animations, Stategroups.
  • Special # character at the end is utilized to accept suggestion and expand to choosed element.
  • Suggestions list can be triggered only within root element (<Desc>).

Desc extending / overloading

Syntax: .Name

abbrv-template-overloading

  • List includes:
    • Elements from template(s) used within the scope.
    • Elements from foreign desc - when overriding frame declared in another layout etc.
    • Native hookups available for implementation.
  • Works with deeply nested elements.
  • Suggestions list will exclude elements that are already extended/implemented in scope of current declaration.

Properties of a frame class

Syntax: @ClassName/PropertyName

abbrv-template-overloading

  • Useful for filtering suggestions to properties of choosen class.

Custom panels

Accessible from the activity bar on the left - it will open in a separate container.

desc-tree-props

Desc tree

All layout files from the workspace and their content arranged in a tree.

Frame properties

Provides basic informations about selected frame in corresponding DescTree panel. It includes:

  • Native hookup list
  • Desc types of a frame and its fields
  • Class types of a frame and its properties

Other stuff

Random screenshots made during development. Some of the things shown here are probably bit out of date - it has been improved since then.

Code completions

completions-tooltips

completions-enum

completions-frametype

completions-assets

completions-selectors

completions-templates

Goto definition

image

Document and workspace navigation

image

image

Code diagnostics

image

About

Visual Studio Code extension adds support for SC2Layouts language.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%