SusCore - documentation
Package:
com.sharq-it.sus.coreThe foundation of the SUS UI system is an analogue of Vue.js: reactivity, SFC compiler, directives, slots, CSS scoped
Contents
| # | Document | Contents |
|---|---|---|
| 0 | Integration from scratch 🆕 | Installation, scene, first .sharq, SusApp, sus.config.json, Sharq generation |
| 1 | Quick start | Minimal component, bootstrap, installation, configuration |
| 2 | .sharq and directives | SFC-format, $using, $MainElement, v-if/v-show/v-for/:text/@click/style |
| 3 | Reactivity | Prop<T>, Computed<T>, Watch<T>, DependencyTracker, P/C helpers |
| 4 | Slots | Named slots, default slot, SlotPropMap |
| 5 | CSS Scoping | scoped/global, hash classes, Sharq restrictions |
| 6 | Adaptive layout | SusBreakpointService, breakpoint classes, Watch |
| 7 | OverlayHost and portals | Portal container, OverlayCategory, z-order |
| 8 | Events | Emit/On, communication via Prop<T> |
| 9 | Compilation and generation | Pipeline, incremental compilation, SharqValidator |
| 10 | Configuration | sus.config.json |
| 11 | API Reference | SusApp, SusComponent, Bind helpers, SusBootstrap |
| 12 | Running examples | SusBootstrap + SusKeepAlive examples from Samples~ |
| 13 | Built-in audits (Debug / QA) | ClickAudit, BoundsAudit, CallbackAudit, OverlayAudit, StateAudit, LifecycleAudit, … |
| 14 | Roadmap / Plans (in package repo) | Tooltip, WorldSpace (healthbar/nameplate/floating damage) |
| 17 | Dev console | SusConsoleService, hotkey ~, OverlayCategory.Console |
| — | Design tokens | Palette / theme / semantic tokens, fonts, icons, SusApp cascade |
| — | Audit vs Vue | Feature parity notes (WatchEffect, Devtools, …) |
Quick start
xml
<!-- HelloWorld.sharq -->
<template>
<ui:Label $MainElement :text="Message" class="greeting"
style="font-size: 24px; -unity-text-align: middle-center; color: white;" />
</template>
<script>
public string Message = "Hello SUS!";
</script>csharp
// MonoBehaviour on stage — prefer SusApp.
// Mount the component you defined above (HelloWorld); its .g.cs must be generated first.
public class AppEntry : MonoBehaviour
{
public UIDocument uiDocument;
void Start() => SusApp.Create(uiDocument).UseTheme(SusTheme.Dark).Mount<HelloWorld>();
}Where to look for what
- I want to start from scratch → 00-integration.md
- I want to understand the syntax of
.sharq→ 02-sharq-format.md - I want to understand Prop<T> and Computed<T> → 03-reactivity.md
- I want to make a modal/tooltip → 07-overlayhost.md · kit Tooltips
- I want the full API → 11-api-reference.md
- I want to run an example → 12-examples.md
- I want to know about built-in audits (Debug/QA) → 13-audits.md
- I want to configure the compiler → 10-configuration.md
- I want themes / tokens / icons → DESIGN_TOKENS.md
- I want the in-game console → 17-console.md
Related documents
- sus-router — navigation and modals (MIT, open-core companion)
- Integration from scratch - installation and first screen
- Design tokens - theming: colors, fonts, icons
- OverlayHost and portals - overlays: tooltips, popups, modals
- Audit vs Vue - Vue feature parity