summaryrefslogtreecommitdiff
path: root/src/screen
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-08-08 15:08:39 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-08-08 15:08:39 +0000
commit54d61c622ba721b4ea57852e0ba6c87acfa66a2b (patch)
tree5240311b5ab0aca967089b60df22034457fe515c /src/screen
parent8a49909114b3590d48d808b664db8b804bfe2ff7 (diff)
- schopnost autodetekce jazyka systému → v případě neznámého jazyka se zvolí default (angličtina)
- pamatovat posledně hranou arénu → vybrat ji a dostatečně zvýraznit - pauza klevsa [P] - seznam hráčů pod klávesou TAB – skóre, ping git-svn-id: http://opensvn.csie.org/tuxanci_ng@193 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/screen')
-rw-r--r--src/screen/screen_choiceArena.c14
-rw-r--r--src/screen/screen_choiceArena.h1
-rw-r--r--src/screen/screen_setting.c8
-rw-r--r--src/screen/screen_world.c17
4 files changed, 36 insertions, 4 deletions
diff --git a/src/screen/screen_choiceArena.c b/src/screen/screen_choiceArena.c
index f1a13b3..dc88d84 100644
--- a/src/screen/screen_choiceArena.c
+++ b/src/screen/screen_choiceArena.c
@@ -104,6 +104,16 @@ int getChoiceArenaId()
return choiceArenaId;
}
+void setChoiceArenaId(int n)
+{
+ widget_buttonimage_t *widget_buttonimage;
+
+ choiceArenaId = n;
+
+ widget_buttonimage = (widget_buttonimage_t *)listWidgetButtonimage->list[choiceArenaId];
+ widget_buttonimage->active = TRUE;
+}
+
static void eventWidget(void *p)
{
widget_button_t *button;
@@ -147,12 +157,12 @@ void initScreenChoiceArena()
widget_buttonimage = newWidgetButtonimage(image,
x, y, eventWidgetButtonImage);
-
+/*
if( i == choiceArenaId )
{
widget_buttonimage->active = 1;
}
-
+*/
addList( listWidgetButtonimage, widget_buttonimage);
}
diff --git a/src/screen/screen_choiceArena.h b/src/screen/screen_choiceArena.h
index 73a8197..22989ce 100644
--- a/src/screen/screen_choiceArena.h
+++ b/src/screen/screen_choiceArena.h
@@ -11,6 +11,7 @@
extern void drawScreenChoiceArena();
extern void eventScreenChoiceArena();
extern int getChoiceArenaId();
+extern void setChoiceArenaId(int n);
extern void initScreenChoiceArena();
extern void quitScreenChoiceArena();
diff --git a/src/screen/screen_setting.c b/src/screen/screen_setting.c
index ade0d96..20e097f 100644
--- a/src/screen/screen_setting.c
+++ b/src/screen/screen_setting.c
@@ -9,6 +9,7 @@
#include "textFile.h"
#include "director.h"
#include "homeDirector.h"
+#include "arenaFile.h"
#include "configFile.h"
#include "language.h"
@@ -24,6 +25,8 @@
#include "screen_mainMenu.h"
#include "screen_setting.h"
#include "screen_settingKeys.h"
+#include "screen_settingKeys.h"
+#include "screen_choiceArena.h"
#include "widget_label.h"
#include "widget_button.h"
@@ -277,6 +280,9 @@ static void initSettingFile()
check_sound->status = isYesOrNO(val);
#endif
+ loadValueFromConfigFile(configFile, "ARENA", val, STR_SIZE, "FAGN");
+ setChoiceArenaId( getArenaIdFormNetName(val) );
+
saveTextFile(configFile);
}
@@ -315,6 +321,8 @@ static void saveAndDestroyConfigFile()
setValueInConfigFile(configFile, "SOUND", getYesOrNo(check_sound->status) );
#endif
+ setValueInConfigFile(configFile, "ARENA", getArenaNetName(getChoiceArenaId()) );
+
saveTextFile(configFile);
destroyTextFile(configFile);
}
diff --git a/src/screen/screen_world.c b/src/screen/screen_world.c
index 518128f..1c3d433 100644
--- a/src/screen/screen_world.c
+++ b/src/screen/screen_world.c
@@ -25,6 +25,8 @@
#include "panel.h"
#include "radar.h"
#include "chat.h"
+#include "pauza.h"
+#include "term.h"
#ifndef NO_SOUND
#include "music.h"
@@ -186,6 +188,8 @@ void drawWorld()
}
drawChat();
+ drawPauza();
+ drawTerm();
}
static void netAction(tux_t *tux, int action)
@@ -454,8 +458,11 @@ void eventWorld()
eventNetMultiplayer();
- eventArena(arena);
- //eventModule();
+ if( isPauzeActive() == FALSE )
+ {
+ eventArena(arena);
+ //eventModule();
+ }
thisTux = getControlTux(TUX_CONTROL_KEYBOARD_RIGHT);
@@ -476,6 +483,8 @@ void eventWorld()
eventEnd();
eventChat();
+ eventPauza();
+ eventTerm();
eventEsc();
}
@@ -488,6 +497,8 @@ void startWorld()
initListID();
initRadar();
+ initPauza();
+ initTerm();
initModule();
setGameType();
initChat();
@@ -550,6 +561,8 @@ void stoptWorld()
}
quitRadar();
+ quitPauza();
+ quitTerm();
#ifndef NO_SOUND
stopMusic();