Skip to content

Commit

Permalink
Add TODO_Manager addon and create reminders for setting up a new project
Browse files Browse the repository at this point in the history
  • Loading branch information
hatmix committed Jan 27, 2025
1 parent df37304 commit 3b244f8
Show file tree
Hide file tree
Showing 25 changed files with 1,225 additions and 15 deletions.
6 changes: 6 additions & 0 deletions ATTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Godot 4 Jam Template
###### TODO: Update title above
###### TODO: Update title in project settings

###### TODO: Update contributors
A thing by [hatmix](https://hatmix.itch.io)

###### TODO: Add attribution for any assets that require it

## Godot Addons
###### TODO: List any additional addons used
### Godot UI Sound Controller
Author: [Marek "Maaack"](https://github.com/Maaack)
Source: [https://github.com/Maaack/Godot-UI-Sound-Controller](https://github.com/Maaack/Godot-UI-Sound-Controller)
Expand Down
2 changes: 1 addition & 1 deletion HOW_TO_PLAY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# How to Play

A markdown doc with instructions for the player.
###### TODO: A markdown doc with instructions for the player--see https://github.com/daenvil/MarkdownLabel for formatting
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ Features:
* Web, Windows, Linux and macOS exports configured for maximum jam
* Premade basic UI for main menu, pause menu, credits, and settings
* [G.U.I.D.E](https://godotneers.github.io/G.U.I.D.E/) for input with remapping
* Settings persisted across sesssions (where `user://` filesystem is writable)
* Keyboard and controller support for all template UI, touchscreen via [Godot's emulate mouse from touch setting](https://docs.godotengine.org/en/stable/classes/class_projectsettings.html#class-projectsettings-property-input-devices-pointing-emulate-mouse-from-touch)
* Settings persisted across sessions (where `user://` filesystem is writable)
* Keyboard and controller support for all template UI and touchscreen via [Godot's emulate mouse from touch setting](https://docs.godotengine.org/en/stable/classes/class_projectsettings.html#class-projectsettings-property-input-devices-pointing-emulate-mouse-from-touch)
* ATTRIBUTION.md for in-game credits (inspired by [Maaack](https://github.com/Maaack/Godot-Game-Template/blob/main/ATTRIBUTION.md)'s approach)
* CI/CD for automatic Itch.io updates adapted from [abarichello/godot-ci](https://github.com/abarichello/godot-ci)
* [TODO Manager](https://github.com/OrigamiDev-Pete/TODO_Manager) included and todos added for setting up a new project

Don't just settle for the first template you find! Compare the alternatives and decide which best fits your desired feature set, coding style, and approach to game development.

Expand Down Expand Up @@ -72,6 +73,10 @@ See [G.U.I.D.E documentation](https://godotneers.github.io/G.U.I.D.E/) for how t

The input icons are generated by G.U.I.D.E in a RichTextLabel. The buttons used for remapping use the theme generated by `res://ui/controls/remap_input_button_theme.gd`.

## TODO

Stay organized with TODO and FIXME comments in scripts and markdown files. Add your own options per [TODO Manager](https://github.com/OrigamiDev-Pete/TODO_Manager)'s documentation.

## Tests

GUT addon has been removed. I hope to have [gdUnit4](https://github.com/MikeSchulze/gdUnit4) tests working with CI soon.
Expand Down
17 changes: 17 additions & 0 deletions addons/Todo_Manager/ColourPicker.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@tool
extends HBoxContainer

var colour : Color
var title : String:
set = set_title
var index : int

@onready var colour_picker := $TODOColourPickerButton

func _ready() -> void:
$TODOColourPickerButton.color = colour
$Label.text = title

func set_title(value: String) -> void:
title = value
$Label.text = value
44 changes: 44 additions & 0 deletions addons/Todo_Manager/Current.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@tool
extends Panel

signal tree_built # used for debugging

const Todo := preload("res://addons/Todo_Manager/todo_class.gd")
const TodoItem := preload("res://addons/Todo_Manager/todoItem_class.gd")

var _sort_alphabetical := true

@onready var tree := $Tree as Tree

func build_tree(todo_item : TodoItem, patterns : Array, cased_patterns : Array[String]) -> void:
tree.clear()
var root := tree.create_item()
root.set_text(0, "Scripts")
var script := tree.create_item(root)
script.set_text(0, todo_item.get_short_path() + " -------")
script.set_metadata(0, todo_item)
for todo in todo_item.todos:
var item := tree.create_item(script)
var content_header : String = todo.content
if "\n" in todo.content:
content_header = content_header.split("\n")[0] + "..."
item.set_text(0, "(%0) - %1".format([todo.line_number, content_header], "%_"))
item.set_tooltip_text(0, todo.content)
item.set_metadata(0, todo)
for i in range(0, len(cased_patterns)):
if cased_patterns[i] == todo.pattern:
item.set_custom_color(0, patterns[i][1])
emit_signal("tree_built")


func sort_alphabetical(a, b) -> bool:
if a.script_path > b.script_path:
return true
else:
return false

func sort_backwards(a, b) -> bool:
if a.script_path < b.script_path:
return true
else:
return false
Loading

0 comments on commit 3b244f8

Please sign in to comment.