[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth data/themes/default.cfg src/events.cpp ...
From: |
Yann Dirson |
Subject: |
[Wesnoth-cvs-commits] wesnoth data/themes/default.cfg src/events.cpp ... |
Date: |
Fri, 29 Oct 2004 15:58:59 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Yann Dirson <address@hidden> 04/10/29 19:53:22
Modified files:
data/themes : default.cfg
src : events.cpp preferences.cpp preferences.hpp
Log message:
allow 320x240 resolution with USE_TINY_GUI; provide a dummy 320x240
theme as a work basis, copy of 800x600
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/themes/default.cfg.diff?tr1=1.65&tr2=1.66&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/events.cpp.diff?tr1=1.23&tr2=1.24&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/preferences.cpp.diff?tr1=1.116&tr2=1.117&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/preferences.hpp.diff?tr1=1.41&tr2=1.42&r1=text&r2=text
Patches:
Index: wesnoth/data/themes/default.cfg
diff -u wesnoth/data/themes/default.cfg:1.65
wesnoth/data/themes/default.cfg:1.66
--- wesnoth/data/themes/default.cfg:1.65 Sun Sep 19 14:02:56 2004
+++ wesnoth/data/themes/default.cfg Fri Oct 29 19:53:22 2004
@@ -683,4 +683,342 @@
[/status]
[/resolution]
+[resolution]
+width=320
+height=240
+
+ [main_map]
+ rect=0,26,882,768
+ xanchor=left
+ yanchor=top
+ [/main_map]
+
+ [menu]
+ title= _ "Menu"
+ image=lite
+
items=objectives,statistics,unitlist,statustable,save,load,preferences,chatlog,help,quit
+ rect=3,1,103,22
+ xanchor=fixed
+ yanchor=fixed
+ [/menu]
+
+ [menu]
+ title= _ "Actions"
+ image=lite
+
items=undo,redo,cycle,speak,recruit,recall,showenemymoves,bestenemymoves,delayshroud,updateshroud,endturn
+ rect=105,1,205,22
+ xanchor=fixed
+ yanchor=fixed
+ [/menu]
+
+ [menu]
+ is_context_menu=true
+
items=undo,redo,describeunit,renameunit,createunit,changeside,labelterrain,speak,continue,recruit,recall,delayshroud,updateshroud,cycle,endturn
+ [/menu]
+
+ # top panel
+ [panel]
+ image=misc/top-bg.png
+ rect=0,0,1024,26
+ xanchor=top
+ yanchor=fixed
+ [/panel]
+
+ # rightside panel
+ [panel]
+ image=misc/rightside.png
+ rect=882,25,1024,309
+ xanchor=right
+ yanchor=fixed
+ [/panel]
+ [mini_map]
+ rect=892,32,1017,175
+ xanchor=right
+ yanchor=fixed
+ [/mini_map]
+ [panel]
+ image=misc/rightside-bg.png
+ rect=882,309,1024,730
+ xanchor=right
+ yanchor=top
+ [/panel]
+ [panel]
+ image=misc/rightside-bottom.png
+ rect=882,730,0,768
+ xanchor=right
+ yanchor=bottom
+ [/panel]
+
+ [menu]
+ title= _ "End Turn"
+ items=endturn
+ rect=900,737
+ xanchor=right
+ yanchor=bottom
+ [/menu]
+
+ [panel]
+ image=misc/status-bg.png
+ rect=270,2,365,21
+ xanchor=proportional
+ yanchor=fixed
+ [/panel]
+ [panel]
+ image=misc/status-bg.png
+ rect=370,2,465,21
+ xanchor=proportional
+ yanchor=fixed
+ [/panel]
+ [panel]
+ image=misc/status-bg.png
+ rect=470,2,555,21
+ xanchor=proportional
+ yanchor=fixed
+ [/panel]
+ [panel]
+ image=misc/status-bg.png
+ rect=560,2,645,21
+ xanchor=proportional
+ yanchor=fixed
+ [/panel]
+ [panel]
+ image=misc/status-bg.png
+ rect=650,2,750,21
+ xanchor=proportional
+ yanchor=fixed
+ [/panel]
+ [panel]
+ image=misc/status-bg.png
+ rect=755,2,844,21
+ xanchor=proportional
+ yanchor=fixed
+ [/panel]
+
+ # HP/XP
+ [label]
+ font_size=10
+ text= _ "HP"
+ rect=967,234,1022,246
+ xanchor=right
+ yanchor=fixed
+ [/label]
+ [label]
+ font_size=10
+ text= _ "XP"
+ rect=967,260,1022,272
+ xanchor=right
+ yanchor=fixed
+ [/label]
+
+ # gold icon
+ [label]
+ icon=misc/gold.png
+ text= _ "gold"
+ rect=375,3,391,19
+ xanchor=proportional
+ yanchor=fixed
+ [/label]
+ # villages icon
+ [label]
+ icon=misc/villages.png
+ text= _ "villages"
+ rect=475,3,491,19
+ xanchor=proportional
+ yanchor=fixed
+ [/label]
+ # units icon
+ [label]
+ icon=misc/units.png
+ text= _ "units"
+ rect=565,3,581,19
+ xanchor=proportional
+ yanchor=fixed
+ [/label]
+ # upkeep icon
+ [label]
+ icon=misc/upkeep.png
+ text= _ "upkeep"
+ rect=655,3,687,19
+ xanchor=proportional
+ yanchor=fixed
+ [/label]
+ # income icon
+ [label]
+ icon=misc/income.png
+ text= _ "income"
+ rect=760,3,792,19
+ xanchor=proportional
+ yanchor=fixed
+ [/label]
+
+ [status]
+ # the time of day image
+ [time_of_day]
+ rect=892,184,1017,223
+ xanchor=right
+ yanchor=fixed
+ [/time_of_day]
+
+ [observers]
+ font_size=12
+ rect=1004,3,1020,19
+ xanchor=proportional
+ yanchor=fixed
+ [/observers]
+
+ #put the side playing indicator next to the turn indicator
+ [side_playing]
+ rect=273,4,288,20
+ xanchor=proportional
+ yanchor=fixed
+ [/side_playing]
+
+ # the game status
+ [turn]
+ font_size=12
+ rect=292,4,360,20
+ xanchor=proportional
+ yanchor=fixed
+ prefix=
+ prefix_literal=""
+ [/turn]
+ [gold]
+ font_size=12
+ rect=395,4,460,20
+ xanchor=proportional
+ yanchor=fixed
+ prefix=
+ prefix_literal=""
+ [/gold]
+ [villages]
+ font_size=12
+ rect=495,4,550,20
+ xanchor=proportional
+ yanchor=fixed
+ prefix=
+ prefix_literal=""
+ [/villages]
+ [num_units]
+ font_size=12
+ rect=585,4,640,20
+ xanchor=proportional
+ yanchor=fixed
+ prefix=
+ prefix_literal=""
+ [/num_units]
+ [upkeep]
+ font_size=12
+ rect=690,4,745,20
+ xanchor=proportional
+ yanchor=fixed
+ prefix=
+ prefix_literal=""
+ [/upkeep]
+ [income]
+ font_size=12
+ rect=795,4,840,20
+ xanchor=proportional
+ yanchor=fixed
+ prefix=
+ prefix_literal=""
+ [/income]
+ [comment]
+ [terrain]
+ font_size=12
+ rect=770,4,890,20
+ xanchor=proportional
+ yanchor=fixed
+ [/terrain]
+ [/comment]
+ [position]
+ font_size=12
+ rect=855,4,1000,20
+ xanchor=proportional
+ yanchor=fixed
+ [/position]
+
+ #unit stats here
+ [unit_image]
+ rect=891,235,963,307
+ xanchor=right
+ yanchor=fixed
+ [/unit_image]
+ [unit_description]
+ font_size=14
+ rect=891,312,1022,330
+ xanchor=right
+ yanchor=fixed
+ [/unit_description]
+ [unit_type]
+ font_size=12
+ rect=891,330,1022,346
+ xanchor=right
+ yanchor=fixed
+ [/unit_type]
+ [unit_level]
+ font_size=12
+ rect=891,346,1022,362
+ prefix= _ "statuspanel^level"
+ prefix_literal=" "
+ xanchor=right
+ yanchor=fixed
+ [/unit_level]
+ [unit_alignment]
+ font_size=12
+ rect=891,362,1022,378
+ xanchor=right
+ yanchor=fixed
+ [/unit_alignment]
+ [unit_traits]
+ font_size=12
+ rect=891,378,1022,394
+ xanchor=right
+ yanchor=fixed
+ [/unit_traits]
+ [unit_abilities]
+ font_size=12
+ rect=891,394,1022,410
+ xanchor=right
+ yanchor=fixed
+ [/unit_abilities]
+ [unit_status]
+ font_size=12
+ rect=968,289,1020,305
+ xanchor=right
+ yanchor=fixed
+ [/unit_status]
+ [unit_moves]
+ font_size=12
+ rect=891,410,1022,426
+ prefix= _ "statuspanel^movement"
+ prefix_literal=": "
+ xanchor=right
+ yanchor=fixed
+ [/unit_moves]
+ [unit_hp]
+ font_size=12
+ rect=967,246,1022,260
+ #prefix=hp
+ #prefix_literal=" "
+ xanchor=right
+ yanchor=fixed
+ [/unit_hp]
+ [unit_xp]
+ font_size=12
+ rect=967,272,1022,286
+ #prefix=xp
+ #prefix_literal=" "
+ xanchor=right
+ yanchor=fixed
+ [/unit_xp]
+ [unit_weapons]
+ font_size=12
+ #rect=900,452,1020,620
+ rect=891,426,1022,594
+ xanchor=right
+ yanchor=fixed
+ [/unit_weapons]
+ [/status]
+[/resolution]
+
[/theme]
Index: wesnoth/src/events.cpp
diff -u wesnoth/src/events.cpp:1.23 wesnoth/src/events.cpp:1.24
--- wesnoth/src/events.cpp:1.23 Mon Aug 23 06:40:59 2004
+++ wesnoth/src/events.cpp Fri Oct 29 19:53:22 2004
@@ -237,7 +237,7 @@
case SDL_VIDEORESIZE: {
const SDL_ResizeEvent* const resize =
reinterpret_cast<SDL_ResizeEvent*>(&event);
- if(resize->w < 800 || resize->h < 600) {
+ if(resize->w < min_allowed_width || resize->h <
min_allowed_height) {
resize_dimensions.first = 0;
resize_dimensions.second = 0;
} else {
Index: wesnoth/src/preferences.cpp
diff -u wesnoth/src/preferences.cpp:1.116 wesnoth/src/preferences.cpp:1.117
--- wesnoth/src/preferences.cpp:1.116 Thu Oct 28 19:53:31 2004
+++ wesnoth/src/preferences.cpp Fri Oct 29 19:53:22 2004
@@ -1,4 +1,4 @@
-/* $Id: preferences.cpp,v 1.116 2004/10/28 19:53:31 gruikya Exp $ */
+/* $Id: preferences.cpp,v 1.117 2004/10/29 19:53:22 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -158,8 +158,8 @@
const string_map::const_iterator y = prefs.values.find('y' + postfix);
if(x != prefs.values.end() && y != prefs.values.end() &&
x->second.empty() == false && y->second.empty() == false) {
- std::pair<int,int> res (maximum(atoi(x->second.c_str()),800),
- maximum(atoi(y->second.c_str()),600));
+ std::pair<int,int> res
(maximum(atoi(x->second.c_str()),min_allowed_width),
+
maximum(atoi(y->second.c_str()),min_allowed_height));
//make sure resolutions are always divisible by 4
//res.first &= ~3;
@@ -991,7 +991,7 @@
std::vector<std::pair<int,int> > resolutions;
for(int i = 0; modes[i] != NULL; ++i) {
- if(modes[i]->w >= 800 && modes[i]->h >= 600) {
+ if(modes[i]->w >= min_allowed_width && modes[i]->h >=
min_allowed_height) {
resolutions.push_back(std::pair<int,int>(modes[i]->w,modes[i]->h));
}
}
Index: wesnoth/src/preferences.hpp
diff -u wesnoth/src/preferences.hpp:1.41 wesnoth/src/preferences.hpp:1.42
--- wesnoth/src/preferences.hpp:1.41 Sat Oct 2 15:53:58 2004
+++ wesnoth/src/preferences.hpp Fri Oct 29 19:53:22 2004
@@ -1,4 +1,4 @@
-/* $Id: preferences.hpp,v 1.41 2004/10/02 15:53:58 Sirp Exp $ */
+/* $Id: preferences.hpp,v 1.42 2004/10/29 19:53:22 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -20,6 +20,15 @@
#include <utility>
#include <set>
+// only there temporary
+#ifdef USE_TINY_GUI
+const int min_allowed_width = 320;
+const int min_allowed_height = 240;
+#else
+const int min_allowed_width = 800;
+const int min_allowed_height = 600;
+#endif
+
namespace preferences {
struct manager
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth data/themes/default.cfg src/events.cpp ...,
Yann Dirson <=