Opened 16 years ago

Closed 16 years ago

Last modified 8 months ago

#8238 closed patch

Help Dialog

Reported by: SF/itsr0y Owned by: fingolfin
Priority: normal Component: GUI
Keywords: Cc:
Game:

Description

I saw that adding a help dialog was in the todo list,
so I made one for scumm games. I don't know if I have
every single key in there, but all of the main ones are
(except for puttdemo - I don't have that game). The
dialog appears when you press the "Help" button in the
save/load dialog.

Few things that I can't check / do:
1. The tilde (~) does not appear when you try to print it.
2. The window is kind of big - I don't know how it will
look on handheld devices.
3. I have no idea what the bindings are on other
systems, so all that are in there now are for Windows
and English language games.
4. It checks to see what game is being run by the
scumm->gameId. If this is not a good idea (multiple
games with different keys using the same gameId), then
it will have to be changed.
5. The diaog isn't bound to any key (it's in the
Save/Load dialog). It may be a good idea to bind it to
something (although I don't know to what bind it to.
F1 is used in COMI and possibly other games. Maybe 'h'
or 'alt-h'?)

I've attached a diff to modify scumm/dialogs.h & .cpp,
and I will also upload the required files scumm/help.h
& .cpp. You'll have to add them to the project.

Ticket imported from: #745843. Ticket imported from: patches/343.

Attachments (8)

helpDialog.diff (5.4 KB) - added by SF/itsr0y 16 years ago.
Patch for scumm/dialogs.h &.cpp
help.cpp (8.2 KB) - added by SF/itsr0y 16 years ago.
scumm/help.cpp
help.h (1.1 KB) - added by SF/itsr0y 16 years ago.
scumm/help.h
helpDialog.2.diff (9.5 KB) - added by SF/itsr0y 16 years ago.
Revised patch 2003-06-01
help.2.cpp (8.1 KB) - added by SF/itsr0y 16 years ago.
Revised scumm/help.cpp 2003-06-01
helpDialog.3.diff (19.1 KB) - added by SF/itsr0y 16 years ago.
Revised patch 2003-06-02
help.3.cpp (8.2 KB) - added by SF/itsr0y 16 years ago.
Revised scumm/help.cpp 2003-06-02
helpDialog.4.diff (9.5 KB) - added by SF/itsr0y 16 years ago.
Added DISABLE_HELP 2003-06-03

Download all attachments as: .zip

Change History (22)

Changed 16 years ago by SF/itsr0y

Attachment: helpDialog.diff added

Patch for scumm/dialogs.h &.cpp

Changed 16 years ago by SF/itsr0y

Attachment: help.cpp added

scumm/help.cpp

Changed 16 years ago by SF/itsr0y

Attachment: help.h added

scumm/help.h

comment:1 Changed 16 years ago by SF/itsr0y

Oops, I forgot to mention - this is patched against the CVS
at the time of post (2003-05-29 19:35).

comment:2 Changed 16 years ago by SF/florob

OK, it's a nice patch, but there are some things I would do other.
1. I would let it print Ctrl Alt 0-9 insstead of Ctrl Alt # for the graphical
scalers like you do with the save/load function.
2. I don't know why, but it doesn't compile. (Makefile?)
3. Try to use ASCII to print the Tilde (I don't know if that works with
ADD_BIND, but if it doesn't right know it should in the future for this
reason)

comment:3 Changed 16 years ago by SF/itsr0y

1. The only reason I used "#" instead of "0-9" is because it
fits, and "0-9" doesn't. To put "0-9", I'd have to either
increase the space that key bindings take up (which would
make all of the other slots look worse), or take out the
space between "Ctrl" and "Alt", so it basically reads like this:
CtrlAlt 0-9 Set graphics filter
I'd prefer not to make the key binding space any bigger. Do
you think it looks OK without the space?

2. What error are you getting? I'm using MSVC so I don't
use a makefile.

3. Still doesn't work with the ASCII.

One other thing I was thinking, OpenGL mode has a few
different bindings (CTRL ALT 1-3). How do I make a macro to
check for this (such as #if defined(OPENGL))?

comment:4 Changed 16 years ago by SF/florob

"No rule to make >scumm/help.cpp< required by >scumm/dialogs.o<"
is the ERROR (free translation from the german one). I don't know
anything about makefiles so I don't even know if thats the problem.
Anyone else should look at this. Perhaps I can help you with the Tilde
if you would tell me what is displayed instead. Did you use %c instead
of the word Tilde and added 126 as parameter?

comment:5 Changed 16 years ago by SF/itsr0y

Hmm. I don't know for sure, but I think if you edit
scumm/modules.mk and add the line
scumm/help.o \
under "SCUMM_OBJS = \" it may work. Maybe someone else can
help with this.

For the Tilde thing, nothing appears at all. I'm just using
a StaticTextWidget, so it's not like printf with the %c.

Changed 16 years ago by SF/itsr0y

Attachment: helpDialog.2.diff added

Revised patch 2003-06-01

comment:6 Changed 16 years ago by SF/itsr0y

I updated the patch and help.cpp:
- Added the tilde (~) character to newgui.cpp so now it prints.
- Added the relevent help.* files to the appropriate build
files (should solve problem you were having)
- Some cleanups in help.cpp (CtrlAlt that we discusses, as
well as using the ~)

Changed 16 years ago by SF/itsr0y

Attachment: help.2.cpp added

Revised scumm/help.cpp 2003-06-01

comment:7 Changed 16 years ago by SF/florob

Now it works quite fine, but isn't there a possibility to make the space
between the bindings and the descriptions bigger. there is enough
space at the right side of the descriptions I think.

comment:8 Changed 16 years ago by SF/itsr0y

Ok, I uploaded a new patch & help.cpp.
- Made window a little wider, allowing a space in between
'Ctrl' and 'Alt' and also allowed me to put Alt x and Ctrl q
on the same line.
- Added COMI F1 button
- Few other cleanups

Changed 16 years ago by SF/itsr0y

Attachment: helpDialog.3.diff added

Revised patch 2003-06-02

Changed 16 years ago by SF/itsr0y

Attachment: help.3.cpp added

Revised scumm/help.cpp 2003-06-02

comment:9 Changed 16 years ago by SF/florob

Seems as if it could be added to CVS now, if no PDA user says
something against it.

comment:10 Changed 16 years ago by SF/itsr0y

Ok, well, I added a compile flag, DISABLE_HELP, which, if
enabled for scumm, gets rid of the help stuff I did, so
hopefully that should be fine for PDA users.
I also fixed I mistake I made (I originally put *_helpDialog
in Dialog instead of SaveLoadDialog).

Changed 16 years ago by SF/itsr0y

Attachment: helpDialog.4.diff added

Added DISABLE_HELP 2003-06-03

comment:11 Changed 16 years ago by SF/florob

Souns great but perhaps this is not needet. we really should
find a PDA user with a PDA with low resolution and let it test
him.

comment:12 Changed 16 years ago by fingolfin

Put into CVS, with some small modifications.

comment:13 Changed 16 years ago by fingolfin

Owner: set to fingolfin
Status: newclosed

comment:14 Changed 8 months ago by digitall

Component: GUI
Note: See TracTickets for help on using tickets.