Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Games
KSnakeDuel
Commits
dd0024ba
Commit
dd0024ba
authored
Feb 16, 2002
by
Benjamin Meyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes to use the kstdgame action
svn path=/trunk/kdegames/ktron/; revision=136904
parent
12c6ceaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
Makefile.am
Makefile.am
+2
-2
ktron.cpp
ktron.cpp
+8
-8
No files found.
Makefile.am
View file @
dd0024ba
bin_PROGRAMS
=
ktron
INCLUDES
=
$(all_includes)
INCLUDES
=
-I
$(top_srcdir)
/libkdegames
$(all_includes)
LDFLAGS
=
$(all_libraries)
$(KDE_RPATH)
LDADD
=
$(LIB_KSYCOCA)
$(LIB_KFILE)
LDADD
=
$(LIB_KSYCOCA)
$(LIB_KFILE)
$(top_builddir)
/libkdegames/libkdegames.la
SUBDIRS
=
...
...
ktron.cpp
View file @
dd0024ba
...
...
@@ -37,6 +37,7 @@
#include <kmessagebox.h>
#include <kaction.h>
#include <kstdaction.h>
#include <kstdgameaction.h>
#include <kapplication.h>
#include <kstatusbar.h>
...
...
@@ -83,12 +84,12 @@ KTron::KTron(const char *name)
action
=
new
KAction
(
i18n
(
"&Pause/Continue"
),
Key_P
,
tron
,
SLOT
(
togglePause
()),
actionCollection
(),
"game_pause"
);
action
->
plugAccel
(
accel
);
action
=
new
KAction
(
i18n
(
"&New Game"
),
KStdAccel
::
open
New
(
),
tron
,
SLOT
(
newGame
()),
actionCollection
(),
"game_new"
);
action
->
plugAccel
(
accel
);
action
=
new
KAction
(
i18n
(
"&Quit"
),
KStdAccel
::
quit
(),
this
,
SLOT
(
quit
()),
actionCollection
()
,
"game_quit"
);
action
->
plugAccel
(
accel
);
KStdGameAction
::
game
New
(
tron
,
SLOT
(
newGame
()
),
actionCollection
()
);
//action=new KAction(i18n("&New Game"), KStdAccel::openNew(), tron, SLOT(newGame()),
// actionCollection(), "game_new"
);
//
action
->plugAccel(accel);
KStdGameAction
::
quit
(
this
,
SLOT
(
slotQuit
()
),
actionCollection
());
//
action->plugAccel(accel);
/* options-menu */
new
KToggleAction
(
i18n
(
"Player &1"
),
0
,
this
,
SLOT
(
toggleComPl1
()),
...
...
@@ -214,7 +215,6 @@ KTron::KTron(const char *name)
selectAction
->
setCurrentItem
(
velocity
-
1
);
tron
->
setVelocity
(
velocity
);
selectAction
=
(
KSelectAction
*
)
actionCollection
()
->
action
(
"select_style"
);
TronStyle
newStyle
=
(
TronStyle
)
config
->
readNumEntry
(
"Style"
,(
int
)
OLine
);
// if the configfile is from a older than from KTron 0.5 than switch to
...
...
@@ -255,7 +255,7 @@ KTron::KTron(const char *name)
tron
->
enableWinnerColor
(
config
->
readBoolEntry
(
"ChangeWinnerColor"
,
true
));
tron
->
setAcceleratorBlocked
(
config
->
readBoolEntry
(
"AcceleratorBlocked"
,
false
));
tron
->
setOppositeDirCrashes
(
config
->
readBoolEntry
(
"OppositeDirCrashes"
,
tru
e
));
tron
->
setOppositeDirCrashes
(
config
->
readBoolEntry
(
"OppositeDirCrashes"
,
fals
e
));
tron
->
restoreColors
(
config
);
readBackground
(
config
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment