Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Floating Compass

Overlay a compass on top of the main text window for space efficiency.

Goal

Display the compass as a semi-transparent overlay, saving vertical space while keeping navigation visible.

Basic Floating Compass

# Main window (full width)
[[widgets]]
type = "text"
name = "main"
title = "Game"
x = 0
y = 0
width = 100
height = 85
streams = ["main", "room", "combat"]
z_index = 1

# Floating compass (top right corner)
[[widgets]]
type = "compass"
name = "compass"
x = 85
y = 1
width = 14
height = 7
z_index = 10
style = "compact"
border = false
clickable = true

Transparent Compass

With transparency support:

[[widgets]]
type = "compass"
name = "compass"
x = 85
y = 1
width = 14
height = 7
z_index = 10
style = "unicode"
transparent = true
opacity = 0.8

Corner Positions

Top Right (Default)

[[widgets]]
type = "compass"
name = "compass"
x = "86%"
y = 1
anchor = "top_right"

Top Left

[[widgets]]
type = "compass"
name = "compass"
x = 1
y = 1
anchor = "top_left"

Bottom Right

[[widgets]]
type = "compass"
name = "compass"
x = "86%"
y = "78%"
anchor = "bottom_right"

Compact Styles

Minimal Compass

[[widgets]]
type = "compass"
name = "compass"
style = "minimal"
width = 7
height = 3
# Shows: N E S W in a row

Icons Only

[[widgets]]
type = "compass"
name = "compass"
style = "icons"
width = 9
height = 5
# Shows directional arrows only

Full Rose

[[widgets]]
type = "compass"
name = "compass"
style = "rose"
width = 15
height = 9
# Shows full compass rose with all directions

Compass with Room Name

Combine compass with room title:

[[widgets]]
type = "compass"
name = "compass_with_room"
x = 75
y = 0
width = 25
height = 10
style = "unicode"
show_room_name = true
room_name_position = "top"

Toggle Visibility

Keybind to show/hide compass:

[keybinds."ctrl+c"]
action = "toggle_widget"
widget = "compass"

How It Works

Z-Index Layering

Higher z_index draws on top:

z_index = 1   # Main window (bottom)
z_index = 10  # Compass (top)

Transparency

When transparent = true:

  • Background is not drawn
  • Text underneath may show through
  • opacity controls visibility (0.0-1.0)

Click-Through

click_through = true  # Clicks go to window below
click_through = false # Compass captures clicks

Variations

Mini Compass

Smallest possible:

[[widgets]]
type = "compass"
name = "mini_compass"
style = "dots"
width = 5
height = 3
# Shows • for available directions

Direction Indicators Only

Show only when exits available:

[[widgets]]
type = "compass"
name = "compass"
style = "indicators"
hide_when_empty = true

Centered Floating

[[widgets]]
type = "compass"
name = "compass"
x = "center"
y = 2
width = 15
height = 7
z_index = 10

Tips

  1. Test Overlap: Ensure compass doesn’t cover important text
  2. Use Borders Wisely: Borderless saves space
  3. Consider Clickability: Click navigation is convenient
  4. Adjust Opacity: Find balance between visible and unobtrusive

Troubleshooting

Compass Covers Text

  • Reduce compass size
  • Move to corner with less activity
  • Add toggle keybind

Clicks Not Working

  • Check clickable = true
  • Verify z_index is highest
  • Ensure not blocked by click_through

See Also