Skip to content

Commit

Permalink
feat: add icons to state chart history
Browse files Browse the repository at this point in the history
  • Loading branch information
derkork committed Feb 5, 2024
1 parent f6af729 commit 75b4cb9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Improved
- The history in the state chart debugger now uses little icons to show the type history entry. This makes it easier to see what happened at a glance. A big thanks goes out to [Alireza Zamani](https://github.com/alitnk) for suggesting this improvement.

## [0.13.0] - 2024-01-30
### Breaking Change
Expand Down
8 changes: 4 additions & 4 deletions addons/godot_state_charts/utilities/debugger_history.gd
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ func add_history_entry(frame:int, text:String):

## Adds a transition to the history list.
func add_transition(frame:int, name:String, from:String, to:String):
add_history_entry(frame, "Transition: %s from %s to %s" % [name, from, to])
add_history_entry(frame, "↪️ Transition: %s from %s to %s" % [name, from, to])


## Adds an event to the history list.
func add_event(frame:int, event:StringName):
add_history_entry(frame, "Event received: %s" % event)
add_history_entry(frame, "Event received: %s" % event)


## Adds a state entered event to the history list.
func add_state_entered(frame:int, name:StringName):
add_history_entry(frame, "Enter: %s" % name)
add_history_entry(frame, "🟢 Enter: %s" % name)


## Adds a state exited event to the history list.
func add_state_exited(frame:int, name:StringName):
add_history_entry(frame, "exiT: %s" % name)
add_history_entry(frame, "🔴 Exit: %s" % name)


## Clears the history.
Expand Down

0 comments on commit 75b4cb9

Please sign in to comment.