189 Commits

Author SHA1 Message Date
ysj1173886760
549511c4b5 GRAPHICS: MACGUI: add rgb parameter for appendText, which makes mactext draws text with color, fix the logic when appending text 2021-04-25 02:24:15 +02:00
ysj1173886760
0a9ffd5f06 GRAPHICS: MACGUI: remove unnecessary codes 2021-04-25 02:24:15 +02:00
ysj1173886760
ee8d9dea03 GRAPHICS: MACGUI: set fgcolor as default format color when we are in win95 mode 2021-04-25 02:24:15 +02:00
ysj1173886760
a98097e8d2 GRAPHICS: MACGUI: set fgcolor as default color, fix the behaviour for appendText when _str is empty 2021-04-25 02:24:15 +02:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
ysj1173886760
2ab965e53e GRAPHICS: MACGUI: fix the bug dumping when initializing Wage Engine 2021-04-01 16:08:56 +02:00
ysj1173886760
c5481d9c02 GRAPHICS: MACGUI: modify the logic of drawInput and appendText, in order to fix the bug of cursor dislocation and incorrectly drawing the input 2021-04-01 16:08:56 +02:00
ysj1173886760
63f5de7069 GRAPHICS: MACGUI: init _textShadow at mactext constructor 2021-04-01 16:08:56 +02:00
ysj1173886760
0fdf29ca19 GRAPHICS: MACGUI: fix the bug when splitting a new line 2021-04-01 16:08:56 +02:00
ysj1173886760
8e8219d0ea GRAPHICS: MACGUI: fix the bug when splitting a new line 2021-03-27 13:05:31 +01:00
ysj1173886760
85ecee5cde GRAPHICS: MACGUI: fix the bug of splitString which incorrectly deal with \n and incorrect order of draw rectangles in draw function 2021-03-27 13:05:31 +01:00
ysj1173886760
312788b228 GRAPHICS: MACGUI: fix the bug dumping when initializing Wage Engine 2021-03-27 13:05:31 +01:00
ysj1173886760
2b6754e187 GRAPHICS: MACGUI: fix the bug of dealing with long word in MacText
it now can deal with the word with many font
it now can deal with multi paragraph and had it`s own wrapping
empty string and sequence of \n is tested
2021-03-20 15:15:56 +01:00
Eugene Sandulenko
3dc6137b6f GRAPHICS: MACGUI: Fix crash for first cursor undrawing 2021-03-03 16:20:51 +01:00
Cameron Cawley
c877097b49 ALL: Remove use of "" in Common::U32String constructors 2020-11-16 16:56:58 +00:00
Vladimir Serbinenko
3fc822e55c
COMMON: introduce substr for U32String (#2585)
It's safer than direct array manipulation. Replace current uses
of subsetting with substr.
2020-11-01 22:53:03 +01:00
Eugene Sandulenko
8c52f6db12 GRAPHICS: MACGUI: Reset MacWindget dirty flag on blit.
This reduces amount of unnecessary redraws.
2020-08-24 20:53:37 +02:00
Nathanael Gentry
2512ca2d5b GRAPHICS: MACGUI: Fix hex format decoding 2020-08-20 13:17:01 -04:00
Nathanael Gentry
7b82dcd8ac GRAPHICS: MACGUI: Add colour to text render debug 2020-08-19 16:32:45 -04:00
Eugene Sandulenko
659e3c72b8 GRAPHICS: MACGUI: Further work on 32bpp blitting 2020-08-14 23:54:16 +02:00
Eugene Sandulenko
8432933c04 GRAPHICS: MACGUI: Fixed moving cursor back to previous line in MacText 2020-08-09 00:20:55 +02:00
Eugene Sandulenko
5b30501f18 GRAPHICS: MACGUI: Make cursor up/down movement more logical in MacText 2020-08-09 00:20:55 +02:00
Eugene Sandulenko
16d7359498 GRAPHICS: MACGUI: Make cursor height variable in MacText 2020-08-09 00:20:55 +02:00
Eugene Sandulenko
e8aa105779 GRAPHICS: MACGUI: Make sure we always undraw cursor 2020-08-08 11:24:34 +02:00
Eugene Sandulenko
ffed05f498 GRAPHICS: MACGUI: Clear surface before full refresh 2020-08-08 11:04:42 +02:00
djsrv
61cfbdc469 GRAPHICS: MACGUI: Add more colors as properties
Finding the closets color in the current palette is necessary for
transparency in bitmap borders to work.
2020-08-07 16:47:19 -04:00
Eugene Sandulenko
09c12a820a GRAPHICS: MACGUI: Make sure MacText is updated on cursor change 2020-08-07 10:07:32 +02:00
Nathanael Gentry
4c996feb5d GRAPHICS: MACGUI: MacText: Fix selection condition
Outside the while loop we only check pos > 0 once.
2020-07-31 01:08:56 -04:00
Nathanael Gentry
1ef07ff5dd GRAPHICS: MACGUI: MacText: Fix selection offsets
There is an additional "character" at the end of each line that we weren't
counting, which is what caused selection setting to get off.
2020-07-31 01:08:45 -04:00
Nathanael Gentry
d9e2420e90 GRAPHICS: MACGUI: Fix warnings 2020-07-30 13:54:11 -04:00
Nathanael Gentry
4907aae05e GRAPHICS: MACGUI: MacText: Add selection index getter 2020-07-30 13:54:11 -04:00
Scott Percival
4bfffc43a7
DIRECTOR: Move widgets from cast members to channels (#2372)
This change is required to support copies of the same cast member running in different channels.

* DIRECTOR: Move widget ownership from cast member to channel

* DIRECTOR: Cache cast dimensions from createWidget

* DIRECTOR: Add null checks for createWidget

* GRAPHICS: MACGUI: Clear active/hover WM references if the widget is destroyed

* DIRECTOR: LINGO: Re-add null check for kTheEditableText

* DIRECTOR: Avoid destroying widgets if the channel isn't dirty

* DIRECTOR: Fix dirty test

* DIRECTOR: Fix text field writeback

* DIRECTOR: Fix null cast check

* DIRECTOR: Add bbox as argument to createWidget

* DIRECTOR: Add setCast method to Channel

* DIRECTOR: Fix use-after-free in Channel::getMask

* DIRECTOR: Fix bounding box for Button sprites

* DIRECTOR: Cache widget dimensions in cast member

* DIRECTOR: Remove widget from channel if nextSprite is empty

* GRAPHICS: MACGUI: Fix MacText::splitString for empty string case

* DIRECTOR: Add null checks for movie and score in processEvents
2020-07-26 04:32:29 +00:00
Eugene Sandulenko
fff4cc4fe1 GRAPHICS: MACGUI: Properly draw re-activated MacText 2020-07-19 15:43:45 +02:00
Eugene Sandulenko
575d79b1d4 GRAPHICS: MACGUI: Do not draw selection on non-active MacText 2020-07-19 15:43:45 +02:00
Eugene Sandulenko
af7c9ab14f GRAPHICS: MACGUI: Implement API for setting selection in MacText 2020-07-19 15:43:45 +02:00
Eugene Sandulenko
fe3ddd12a2 GRAPHICS: MACGUI: Initial code for marking whole text 2020-07-18 00:46:16 +02:00
Nathanael Gentry
a292aab351 GRAPHICS: MACGUI: Add missing window manager assignment 2020-07-16 18:36:24 -04:00
Nathanael Gentry
296b42b2c0 GRAPHICS: MACGUI: Don't redundantly clear text surface
This fixes the issue in Director where text redrawing would overwrite the button
indication. Now, the changed-area clearance in MacText::render is the only
clearance of the text surface that occurs.

The contentIsDirty setting is removed from MacButton because this flag is
already reset in MacText::draw.
2020-07-16 00:27:37 -04:00
Nathanael Gentry
03ddc4dd4d GRAPHICS: MACGUI: Standardize destructors for widget subclasses 2020-07-07 16:41:53 -04:00
Eugene Sandulenko
f11b5b33dc GRAPHICS: MACGUI: Keep cursor position after paragraph reshuffling 2020-06-30 01:04:08 +02:00
Nathanael Gentry
d22fea1924 GRAPHICS: MACGUI: MacText: Render chunks with individual palinfo 2020-06-25 13:47:56 -04:00
Nathanael Gentry
335f6f2e3d GRAPHICS: MACGUI: Keep window manager pointer in all widgets 2020-06-23 23:26:49 -04:00
D G Turner
6a2c0e5091 GRAPHICS: MACGUI: Fix Signed vs. Unsigned Compiler Warning 2020-06-23 19:53:32 +01:00
Eugene Sandulenko
38337e12b9 GRAPHICS: MACGUI: Properly process deleting character at end of the line 2020-06-19 14:04:28 +02:00
Eugene Sandulenko
6e568ba765 GRAPHICS: MACGUI: Catch 'delete' button in MacText. No code for processing yet 2020-06-18 10:44:47 +02:00
Eugene Sandulenko
a6cfbb787e GRAPHICS: MACGUI: Fix crash when deleting last character in MacText 2020-06-18 00:00:20 +02:00
Nathanael Gentry
41871d0909 GRAPHICS: MACGUI: Fix logic errors in empty array handling 2020-06-17 13:47:44 -04:00
Nathanael Gentry
9e69ea280e GRAPHICS: MACGUI: Fix text border computation 2020-06-14 10:12:57 -04:00
Nathanael Gentry
c5021628e2 GRAPHICS: MACGUI: Make text merge a little nicer 2020-06-12 18:22:17 -04:00
Nathanael Gentry
45937130dd GRAPHICS: MACGUI: Begin reorganizing text classes
MacEditableText has been merged into MacText. The Director engine, which relies
upon MacEditableText, is also updated here.
2020-06-12 15:27:37 -04:00