-
Notifications
You must be signed in to change notification settings - Fork 813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a default clock mod #7635
Add a default clock mod #7635
Conversation
This mod renders a clock in the top-right corner and is always available (disabled by default). It is useful to have a mod available by default as we work on mod support.
you read my mind :) |
std::vector<std::string> modNames = ini->getKeys(key); | ||
|
||
// Add mods available by default: | ||
for (const std::string_view modName : { "clock" }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hopefully we can get this to scan the mod folder instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The built-in lua/mods
folder may be in devilutionx.mpq, which is tricky to scan
local render = require("devilutionx.render") | ||
|
||
events.GameDrawComplete.add(function() | ||
render.string(os.date('%H:%M:%S', os.time()), render.screen_width() - 69, 6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting number of px 🤔
This mod renders a clock in the top-right corner and is always available (disabled by default).
It is useful to have a mod available by default as we work on mod support.
/cc @nelchael who did the first attempt at this in Nov 2023 in #6775