Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
KMines
Commits
1cf2936c
Commit
1cf2936c
authored
Apr 14, 2000
by
Nicolas Hadacek
Browse files
some fixes
svn path=/trunk/kdegames/kmines/; revision=46620
parent
57479adf
Changes
7
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
1cf2936c
2.0.4
* hack to resize correctly when menu is hidden (due to bugs
in KTMainWindow)
* nicer (and simpler) custom level with KNumIntInput
2.0.3
* use kkeydialog for actions
* rationalize settings (much better now)
* animate autoreveal with keyboard
* enable/disable and change text for pause in menu
* configuration of mouse bindings [idea of FX Duranceau]
* hack to resize correctly when menu is hidden (due to limitation
in KTMainWindow) (still broken ...)
* nicer custom level dialog (well it is broken ...)
2.0.2
* XMLify the GUI
...
...
TODO
View file @
1cf2936c
...
...
@@ -5,5 +5,4 @@ IDEAS:
KNOWN BUGS:
* occasionnal X BadMatch error in highscore (KDialogBase bug ?)
* none !
dialogs.cpp
View file @
1cf2936c
...
...
@@ -140,27 +140,32 @@ CustomDialog::CustomDialog(Level &_lev, QWidget *parent)
km
=
new
KIntNumInput
(
lev
.
nbMines
,
plainPage
());
connect
(
km
,
SIGNAL
(
valueChanged
(
int
)),
SLOT
(
nbMinesChanged
(
int
)));
top
->
addWidget
(
km
);
nbMinesChanged
(
lev
.
n
bMines
);
updateN
bMines
(
);
}
void
CustomDialog
::
widthChanged
(
int
n
)
{
lev
.
width
=
(
uint
)
n
;
nbMinesChanged
(
lev
.
n
bMines
);
updateN
bMines
(
);
}
void
CustomDialog
::
heightChanged
(
int
n
)
{
lev
.
height
=
(
uint
)
n
;
nbMinesChanged
(
lev
.
n
bMines
);
updateN
bMines
(
);
}
void
CustomDialog
::
nbMinesChanged
(
int
n
)
{
lev
.
nbMines
=
(
uint
)
n
;
updateNbMines
();
}
void
CustomDialog
::
updateNbMines
()
{
uint
nb
=
lev
.
width
*
lev
.
height
;
km
->
setRange
(
1
,
nb
-
2
);
km
->
setLabel
(
i18n
(
"Mines (%1%)"
).
arg
(
100
*
n
/
nb
));
km
->
setLabel
(
i18n
(
"Mines (%1%)"
).
arg
(
100
*
lev
.
nbMines
/
nb
));
enableButton
(
Ok
,
lev
.
width
!=
initLev
.
width
||
lev
.
height
!=
initLev
.
height
||
lev
.
nbMines
!=
initLev
.
nbMines
);
}
...
...
dialogs.h
View file @
1cf2936c
...
...
@@ -103,7 +103,9 @@ class CustomDialog : public DialogBase
private:
KIntNumInput
*
km
;
Level
&
lev
,
&
initLev
;
Level
&
lev
,
initLev
;
void
updateNbMines
();
};
//-----------------------------------------------------------------------------
...
...
field.cpp
View file @
1cf2936c
...
...
@@ -22,7 +22,9 @@ Field::Field(QWidget *parent, const char *name)
connect
(
pb
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
resume
()));
top
->
addStretch
(
1
);
setFont
(
QFont
(
"Helvetica"
,
14
,
QFont
::
Bold
)
);
QFont
f
=
font
();
f
.
setBold
(
true
);
setFont
(
f
);
readSettings
();
}
...
...
main.cpp
View file @
1cf2936c
...
...
@@ -94,6 +94,7 @@ MainWidget::MainWidget()
createGUI
();
readSettings
();
setView
(
status
);
updateRects
();
// #### should be in KTMainWindow::setView
}
#define MENUBAR_ACTION \
...
...
@@ -107,9 +108,11 @@ void MainWidget::readSettings()
{
GameType
type
=
OptionDialog
::
readLevel
();
levelAction
[
type
]
->
setChecked
(
TRUE
);
status
->
newGame
(
type
);
bool
visible
=
OptionDialog
::
readMenuVisible
();
MENUBAR_ACTION
->
setChecked
(
visible
);
toggleMenubar
();
setKeyboardEnabled
(
OptionDialog
::
readKeyboard
()
);
}
...
...
@@ -145,6 +148,7 @@ void MainWidget::toggleMenubar()
if
(
b
)
menuBar
()
->
show
();
else
{
menuBar
()
->
hide
();
// #### sort of hack : because KTMainWindow does not manage correctly
// main widget with a fixed layout
updateRects
();
...
...
version.h
View file @
1cf2936c
#define VERSION "2.0.
2
"
#define LONG_VERSION "2.0.
2
(1
1
Apr 2000)"
#define VERSION "2.0.
4
"
#define LONG_VERSION "2.0.
4
(1
4
Apr 2000)"
#define COPYLEFT "(c) 1996-2000, Nicolas Hadacek"
#define HOMEPAGE "http://azhyd.free.fr/KDE/kmines.php3"
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