Commit Graph

288 Commits

Author SHA1 Message Date
Adam 5b62eba35f Fixed things for when a thread requests a redraw. (#1570)
* Fixed things for when a thread requests a redraw.

* @guldoman's changes.

* Whoops.
2023-08-07 15:26:49 +01:00
Guldoman 48bcf66cc1 When logging don't use `core.status_view` if not yet initialized 2023-08-07 15:26:38 +01:00
Guldoman 43f9b8accc Add mouse grab (#1501)
* Add mouse grab

We now also send mouse movement events only to the interested view.

* Add deprecation messages handler

* Make various `View`s respect `on_mouse_left`

* `StatusView`
* `TitleView`
* `TreeView`
* `ToolbarView`

* Fix scrollbar in `TreeView` not updating

We were in some cases sending outdated mouse positions to the scrollbar, 
which made it think that the mouse was hovering it.

This also updates the hovered item more responsively during scroll.
2023-08-07 15:26:38 +01:00
Jan 9fb714236b Add View dragging (#1402) 2023-08-07 15:26:38 +01:00
Adam 9634715618 Added in support for foreground and background events. (#1395) 2023-08-07 15:26:38 +01:00
Adam acbd8715f4 Added in explicit touchscreen keyboard support. (#1389) 2023-08-07 15:26:38 +01:00
Adam b30ea9e9ef Disable `trimwhitespace` and `drawwhitespace` via their configs (#1446)
Instead of completely disabling them, we now use their internal toggle.

Also moved `drawwhitespace` commands inside the plugin.

---

* Fixed bug where commands would show even when plugin was disbled. Also removed antiquated way of disabling.

* Fixed typos.

* Also moved trimwhitespace out of config, if it already has a default enabled value of false.

* Changed documentation.

* Clarified comments.
2023-08-07 15:26:38 +01:00
Guldoman c1adfb55d2 Limit `core.threads` without a timeout to run 30 times per second 2023-08-07 15:26:38 +01:00
Adam Harrison c8977ca62b Made things clearer, as per jgm's suggestion. 2023-08-07 15:26:38 +01:00
Adam b348acaa81 Made coroutines make more sense, and fixed a bug. (#1381)
* Made coroutines make more sense, and fixed a bug.

* Fixed typo.

* Additional checking for off-cycles.

* Fixed issue with calling step too much.

* If we have no redraw, set next step time for next frame.

* Added in `now` variables to reduce calls.
2023-08-07 15:26:38 +01:00
Jefferson González 68108aeff2 NagView: properly rescale on scale change (#1379)
* drop font option since style.font is always used
2023-08-07 15:02:19 +01:00
Guldoman c40e19d9fe Make mod-version follow semver (#1036)
* Make mod-version follow semver
  Now plugins can optionally specify the minor and patch version they
support.
  If no minor or patch version is specified, it's considered 0.
  Plugins are only loaded if they have the same major version and a
  smaller or equal minor+patch version.
* Add modversion to logging and plugin mismatch nagview

---------

Co-authored-by: Jefferson González <jgmdev@gmail.com>
2023-08-07 15:02:19 +01:00
Adam 1378c3d6a7 Getting rid of annoying forward slash on windows. (#1345) 2023-08-07 15:02:06 +01:00
Adam 9b0a348a91 Added in Config Postload (#1336)
* Added in an `onload` variable to configs which is called by the plugin loader.

* Used appropriate parameter.

* Fixed tabbing.
2023-08-07 15:01:50 +01:00
George Sokianos 65d95c7f40 Merge branch 'master' into amiga2.1 2023-01-08 21:04:04 +00:00
Dave 4e272c33de Minor typos in init text 2022-12-30 13:32:20 +01:00
Simon Krauter 8603644726
Fix two typos in data/init.lua (#1272) 2022-12-27 19:56:30 -04:00
Martin Ashby d4989d98bd
Add example settings to _overwrite_ an existing key binding (#1270) 2022-12-27 18:40:22 -05:00
jgmdev fb43e6f9e6 traceback: some lua versions do not support message as nil 2022-11-07 12:48:09 -04:00
Takase 437b954595
make the default core.ignore_files more specific (#1160)
* make the default core.ignore_files more specific

instead of blanket ignoring all dotfiles, we define a list of folders
and files to ignore. this makes the overall experience better.

* fix wrong path pattern

* add ignore_files to user init
2022-10-19 22:23:01 -04:00
Guldoman 5c2c95765e
Add IME support (#991) 2022-10-15 19:58:51 -04:00
Jefferson González f89088d0ec
dirmonitor: add watch to subdirs on file limit mode (#1155) 2022-10-13 00:37:52 -04:00
Jefferson González 214c9d6287
dirwatch: exit coroutine if project not open anymore to properly gargage collect it (#1142) 2022-10-11 13:22:44 -04:00
George Sokianos 2bdfd5a694 Merge branch 'master' into amiga-2.0 2022-09-26 17:27:35 +01:00
George Sokianos 283f1d0837 Fixed an issue when the user added a directory in the project that already existed 2022-08-29 20:28:33 +01:00
George Sokianos 7b51ee99de Fixed editor refresh whenever init.lua is changed, no matter the working folder 2022-08-28 18:03:34 +01:00
Aqil Contractor 9b1bfeacac
Added a smoothing and strikethrough option to font loading. (#1087)
* Added a smoothing option to font loading.
* Added a font strikethrough option to font loading.
* Fixed underline applying incorrectly in cases of non-underlined fallback fonts being used.

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
2022-08-20 16:15:08 -04:00
cisoun 366cadf605
Add font style options in user module 2022-07-15 12:05:59 +02:00
Guldoman 259de54c33
Fix opening `LogView` when reloading customizations
As `reload_customizations` was called during save operations, opening 
the `LogView` changed `core.active_view` which caused some errors to be 
thrown.
2022-06-28 04:21:43 +02:00
jgmdev 3f206db69a initial documentation for better code completion 2022-06-07 22:09:34 -04:00
Jefferson González ff641cdb06
Merge pull request #1022 from Guldoman/PR_annoy_on_reload_error
Open `LogView` on user/project module reload error
2022-06-07 20:06:56 -04:00
Jefferson González 2fc20330a3
Merge pull request #1010 from Guldoman/PR_improve_multiproject_treeview
`TreeView` improvements for multi-project
2022-06-07 18:24:54 -04:00
Guldoman 237f0c91cb
Open `LogView` on user/project module reload error 2022-06-05 04:29:24 +02:00
jgmdev ca46d8e261 style: move default colors to its own style file 2022-06-02 19:20:54 -04:00
Guldoman 9a428648a9
Add `common.is_absolute_path` 2022-06-01 04:42:50 +02:00
Jefferson González 13d062479a
Merge pull request #1005 from Guldoman/PR_improve_logs
Add `warn` log level and backtraces
2022-05-31 16:38:47 -04:00
jgmdev 214f36157a plugins: only check mod version 2022-05-31 16:29:14 -04:00
Guldoman fae9af96bf
Expose function to create custom log entries 2022-05-31 02:35:56 +02:00
Guldoman db2d30caaf
Add `warn` log level 2022-05-31 02:26:42 +02:00
Guldoman c92f6a7b7f
Always show backtrace for `error` log entries 2022-05-31 02:26:18 +02:00
jgmdev b3fea8f880 plugins: add load priority support with '--priority:###' 2022-05-05 18:17:32 -04:00
jgmdev b5fe333345 core: expose rescan_project_directories and configure_borderless_window 2022-05-02 13:55:25 -04:00
Guldoman d3c38d699c
Merge pull request #966 from adamharrison/check-plugin-load-time
Added plugin load-time log.
2022-05-02 01:59:12 +02:00
Adam Harrison 548dbf67c2 Added in log to show total time. 2022-04-30 16:23:05 -04:00
Guldoman 9de75988ba
Send `mouseleft` event when the mouse leaves the window (#928)
* Send `mouseleft` event when the mouse leaves the window

* Call `View:on_mouse_left` when the mouse leaves the `View`

Previously `View:on_mouse_left` was called only when the mouse left the
window, and it was called on every visible `View`.

Now it gets also called when the mouse "changes" `View`, and only the
last `View` the mouse was on will receive the event.
2022-04-28 21:50:34 -04:00
Adam Harrison b7db7cd533 Added plugin load-time log. 2022-04-28 21:42:53 -04:00
Guldoman ac42e6457a
Check if `USERDIR` doesn't exist in `core.delete_temp_files` 2022-04-28 01:55:07 +02:00
Adam 4934e741b3
TreeView Changes (#898)
* Change to 1 click as per RFC on discord, with 100% in favour.

* Added in the ability to specify  as a view name, so it doesn't modify the title, and also fixed a bug where if you clicked *over* the amount of times your config says, it wouldn't regsiter.

* Changed plugin to use keymap.
2022-04-26 18:29:05 -04:00
Adam 4bf4851736 Asynchronous Reads for Dirmonitor (#930)
Change dirmonitor reads to be synchronous, in a secondary thread.
2022-04-26 12:13:39 -04:00
Guldoman 9a5f8e72d0
Add `DATADIR` and `USERDIR` explanation in created user module 2022-04-18 21:14:50 +02:00