156 Commits

Author SHA1 Message Date
Le Philousophe 7203d1078f GUI: Let drawDialog not reset the clipping rectangle
This will allow for optimized redrawing of select parts of the dialog.
2026-04-26 21:06:07 +10:00
Le Philousophe dee1a77335 GUI: Handle safe area in console 2025-07-13 17:26:37 +02:00
tunnelsociety fbc9242afc GUI: Improve selection behaviour outside console area
Selecting outside the console text area would result in a strange
selection startpoint and/or endpoint. Now the selection feels more
natural.
2024-12-24 13:19:37 +02:00
tunnelsociety 6e286e4628 GUI: Prevent select and scroll beyond bounds in console
Select only within existing text; a buffer overread was possible.
2024-12-24 13:19:37 +02:00
Darkhood148 1acc434bf5 GUI: Improve algorithm of drag-selection process in gui/console.cpp
Redrawing only the affected lines instead of the whole dialog box
2024-02-11 16:35:52 +01:00
Darkhood148 cc214d0f4d GUI: Implement auto scrolling when drag-selecting text 2024-02-11 16:35:52 +01:00
Darkhood148 2f552e423c GUI: Add feature to copy text from console 2024-02-11 16:35:52 +01:00
Eugene Sandulenko ead7a2bba1 GUI: Remove leftover debug message 2023-11-21 14:39:33 +01:00
sluicebox 519902cf06 GUI: Fix Console newlines passed to debug
Fixes Console output in debug (stdout/scummvm.log) when lines
are built with multiple calls to ConsoleDialog::debugPrintf.

See: a7d4d0f232
2023-11-21 07:12:58 +01:00
Eugene Sandulenko 2f891d372b GUI: Wrap console output around console width 2023-11-15 23:46:31 +01:00
sluicebox 7930e28246 GUI: Handle Copy and Paste events in ConsoleDialog
ConsoleDialog had a hard-coded handler for Copy and Paste
shortcuts. These shortcuts are now handled by the keymapper
and produce Copy and Paste events.

Fixes CTRL+C and CTRL+V in the console on Windows builds.
2023-11-14 09:35:42 +02:00
Ralph Caraveo f720fba1aa GUI: Adds clear and cls alias for gui console debugger 2023-10-08 08:36:31 +02:00
Miro Kropacek b5dc9dd949 GUI: Fix sliding up of the console
#4953 optimized redrawing of the top dialog in commit f824f8a. This
however broke console's sliding up as the code in question depended on
the fact that it was internally equivalent to a full redraw.
2023-05-11 23:53:17 +02:00
Eugene Sandulenko b97b2b0fe3 GUI: Add possibility to specify Debugger prompt 2023-02-04 14:58:54 +01:00
Athanasios Antoniou d9088bbffa GUI: Improve behavior of console history
GUI: Improve behavior of console history

Do not persist empty strings, prevent scolling upwards to _historyIndex entry when full, and save to history file in proper order
2022-04-26 21:48:41 +03:00
antoniou79 d655a3be1c GUI: Rever fix for not adding empty user input in Console history
This reverts commit 27c95858ba.
2022-04-13 12:32:09 +03:00
antoniou79 27c95858ba GUI: Prevent adding empty user input in Console history 2022-04-13 10:39:51 +03:00
Thierry Crozat 3d3cd083bf GUI: Fix scrolling history in the Console widget
When starting to scroll, the current line is added to the history
so that if we scroll up and then down we get it back. This was
initially implemented correctly, but borken later on in 51dceaf165
when the history was changed to use Common::String.
2022-04-12 22:29:13 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Martin Gerhardy 4b13314e23 GUI: persist the debug console history 2021-09-01 16:30:02 +02:00
sluicebox f3278c7062 GUI: Fix debug console scrollbar scaling
Fixes bug #12783
2021-08-07 17:15:05 -05:00
Martin Gerhardy a7d4d0f232 GUI: added debug output for console prints
this is useful for situations where the game crashes or is quit, but you still need to
output of the debug commands for investigating the issue
2021-02-17 12:51:46 +00:00
aryanrawlani28 49c36c2b45 GUI: U32: Begin converting texts in clipboards to u32strings
With this commit the base class variables and the parts where getClipboard and setClipboard are used is changed accordingly.
2020-08-30 14:43:41 +02:00
Bastien Bouclet 6e1abf064a GUI: Use nullptr instead of 0 or NULL where appropriate 2020-01-19 15:08:37 +01:00
D G Turner 30c366ee5d GUI: Add Missing Switch Default Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-03 06:03:46 +01:00
Cameron Cawley 014bef9eab BACKENDS: Add a default clipboard implementation 2019-09-21 22:16:01 +03:00
Bastien Bouclet a5d93d933a GUI: Use a truetype font for the debug console 2019-05-05 08:52:12 +02:00
Bastien Bouclet bdc0db97d5 GUI: Add copy and paste support to the graphical console 2018-05-07 22:42:00 +02:00
Bastien Bouclet 4d29ce21d0 GUI: Unify clip and non-clip draw calls 2018-04-19 19:18:39 +02:00
Bastien Bouclet 4d0bb753e4 GUI: Remove the ThemeItem draw queues
Drawing nows happens directly when the Dialog or Widget draw methods are
called. This makes it easy to debug why a particular low level draw
method was called, by inspecting the call stack.

This replaces the notion of "buffering" by two independant ways to
control what is drawn and where:
- The active layer is used to select whether the foreground or
  background part of the dialogs are rendered by the draw calls.
- The active surface is used to select if the draw calls affect the back
  buffer or the screen.

The foreground layer of the active dialog is drawn directly to the
screen. Its background layer is drawn to the back buffer. This way
widgets can restore the back buffer in order to update without having to
redraw the dialog's background.

Dialogs lower in the dialog stack are drawn entirely to the back buffer.
2018-03-12 11:46:04 +01:00
Bastien Bouclet 5878c618c9 GUI: Remove Dialog::markAsDirty to expose full GUI redraws 2018-01-27 18:12:34 +01:00
Bastien Bouclet 0496ede62f GUI: Implement dirty-checking for widget redraws 2018-01-27 18:12:34 +01:00
Paul Gilbert 0b9b3e336a GUI: Remove code that closes debugger if # or ~ keys are pressed 2017-09-05 19:36:47 -04:00
Bastien Bouclet f5b335af10 GUI: Mark some fall-through cases as intentional
Comments explain how the num lock handling works before the
fall-through cases.
2017-08-06 17:55:33 +02:00
Johannes Schickel f5dfe6725a GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Joel Teichroeb 51dceaf165 GUI: Use Common::String for console history, to ensure buffer safety.
Previously, if the user enters a command that is more than 256
characters, it will overflow the history buffer.

By using a Common::String, this is not possible.
2013-11-14 15:23:01 +00:00
Johannes Schickel 7f2b2e99f8 GUI: Change scrollbar repeat handling from a timer proc to handleTickle.
This should be less heavy on timer usage and makes sure no race conditions
will occur.
2011-10-28 12:08:15 +02:00
Torbjörn Andersson 642e0baacb GUI: Silence GCC warning
Rename local variable 'buffer' to keep it from clashing with the
buffer() method.
2011-09-19 20:10:46 +02:00
Littleboy 9796890cce GUI: Replace ConsoleDialog use of vsnprintf by Common::String::vformat() 2011-09-19 09:23:00 -04:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion 9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
David Turner de0f878d1e GUI: Fixed build failure in console due to missing header.
svn-id: r54268
2010-11-16 11:07:48 +00:00
Max Horn 427dc1ae93 GUI: Move major widgets to new directory gui/widgets
Also renamed the source/header files, now they are more closely
aligned to how we rename most other source files

svn-id: r54264
2010-11-16 10:11:57 +00:00
Max Horn 2af2704421 GUI: Rename ConsolDialog methods (v)printf, putchar
svn-id: r54006
2010-11-01 16:03:02 +00:00
Eugene Sandulenko 7f7a6cdafd Revert "GUI: Use vprintf in Console class. Patch by littleboy"
svn-id: r53585
2010-10-18 20:19:58 +00:00
Eugene Sandulenko 05b3f2a071 GUI: Use vprintf in Console class. Patch by littleboy
svn-id: r53577
2010-10-18 19:07:24 +00:00
Max Horn 0b48a71c99 Remove PalmOS port
svn-id: r50964
2010-07-17 18:41:38 +00:00
Martin Kiewitz 0a58cdb6e9 common console: also show prompt, if the engine wrote onto gui console since last call - fixes sci breakpoints
svn-id: r50449
2010-06-28 16:09:54 +00:00
Yotam Barnoy ef330ed9b4 Patch for bug 2943361 by littleboy, adding full kb modifier support to all engines + GUI and proper keypad handling
svn-id: r48101
2010-02-21 04:04:13 +00:00
Johannes Schickel 516d44e65c Fix behavior of delete key, when the cursor is at the end of the input line.
svn-id: r47802
2010-02-01 18:23:23 +00:00