Share settings page helpers, add GUI cursor/scale API

- move create_trackbar_setting/update_trackbar_label/create_checkbox from
  settings_audio/display/graphics pages to core:settings_common module
- GUI scale trackbar shows the really applied scale, e.g. '3 (effective 2)'
- add gui.get_scale(), gui.get_max_scale(), gui.get_cursor_pos() (UI units);
  document that input.get_mouse_pos() returns window pixels
- InventoryView default color is defined once (InventoryView::DEFAULT_COLOR)
  instead of duplicated literals; 'color' attribute still overrides it
This commit is contained in:
loki5512344 2026-10-03 13:12:30 +00:00
parent 851c1a0e27
commit 33e132a231
15 changed files with 173 additions and 123 deletions

View file

@ -29,7 +29,8 @@ input.set_enabled(bindname: string, flag: boolean)
## Курсор мыши
```lua
-- Возвращает позицию курсора на экране.
-- Возвращает позицию курсора на экране в пикселях окна.
-- Для позиции в единицах UI (с учётом масштаба) используйте gui.get_cursor_pos().
input.get_mouse_pos() -> {number, number}
-- Возращает дельту позиции курсора.