From 75b4cb91fca1dfe72928622db92254ac3cf5d7a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Thom=C3=A4?= Date: Mon, 5 Feb 2024 20:53:06 +0100 Subject: [PATCH] feat: add icons to state chart history --- CHANGES.md | 3 +++ addons/godot_state_charts/utilities/debugger_history.gd | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a5353a8..e484c19 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/addons/godot_state_charts/utilities/debugger_history.gd b/addons/godot_state_charts/utilities/debugger_history.gd index eafd640..fc88125 100644 --- a/addons/godot_state_charts/utilities/debugger_history.gd +++ b/addons/godot_state_charts/utilities/debugger_history.gd @@ -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.