[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth data/themes/editor.cfg src/hotkeys.hpp ...
From: |
Jon Daniel |
Subject: |
[Wesnoth-cvs-commits] wesnoth data/themes/editor.cfg src/hotkeys.hpp ... |
Date: |
Sat, 05 Mar 2005 14:03:56 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Jon Daniel <address@hidden> 05/03/05 19:03:56
Modified files:
data/themes : editor.cfg
src : hotkeys.hpp hotkeys.cpp
src/editor : editor.hpp editor.cpp
Log message:
Added refresh image cache hotkey and menu entry to the editor
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/themes/editor.cfg.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/hotkeys.hpp.diff?tr1=1.55&tr2=1.56&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/hotkeys.cpp.diff?tr1=1.66&tr2=1.67&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/editor/editor.hpp.diff?tr1=1.41&tr2=1.42&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/editor/editor.cpp.diff?tr1=1.95&tr2=1.96&r1=text&r2=text
Patches:
Index: wesnoth/data/themes/editor.cfg
diff -u wesnoth/data/themes/editor.cfg:1.25 wesnoth/data/themes/editor.cfg:1.26
--- wesnoth/data/themes/editor.cfg:1.25 Fri Feb 11 23:45:07 2005
+++ wesnoth/data/themes/editor.cfg Sat Mar 5 19:03:55 2005
@@ -203,6 +203,14 @@
shift=no
[/hotkey]
+[hotkey]
+command="editrefresh"
+key="e"
+ctrl=yes
+alt=no
+shift=no
+[/hotkey]
+
[resolution]
width=800
height=600
@@ -225,7 +233,7 @@
[menu]
title=_"Edit"
image=lite
-
items=undo,redo,editcut,editcopy,editselectall,editfillselection,editresize,editflip
+
items=undo,redo,editcut,editcopy,editselectall,editfillselection,editresize,editflip,editrefresh
rect=107,1,207,22
[/menu]
Index: wesnoth/src/editor/editor.cpp
diff -u wesnoth/src/editor/editor.cpp:1.95 wesnoth/src/editor/editor.cpp:1.96
--- wesnoth/src/editor/editor.cpp:1.95 Sat Mar 5 10:54:25 2005
+++ wesnoth/src/editor/editor.cpp Sat Mar 5 19:03:56 2005
@@ -526,6 +526,10 @@
void map_editor::edit_draw() {
left_button_func_changed(DRAW);
}
+void map_editor::edit_refresh() {
+ image::flush_cache();
+ redraw_everything();
+}
std::string map_editor::load_map(const std::string filename) {
bool load_successful = true;
@@ -610,6 +614,7 @@
case hotkey::HOTKEY_EDIT_FLIP:
case hotkey::HOTKEY_EDIT_SELECT_ALL:
case hotkey::HOTKEY_EDIT_DRAW:
+ case hotkey::HOTKEY_EDIT_REFRESH:
return true;
default:
return false;
Index: wesnoth/src/editor/editor.hpp
diff -u wesnoth/src/editor/editor.hpp:1.41 wesnoth/src/editor/editor.hpp:1.42
--- wesnoth/src/editor/editor.hpp:1.41 Sun Oct 31 18:48:07 2004
+++ wesnoth/src/editor/editor.hpp Sat Mar 5 19:03:56 2005
@@ -115,6 +115,7 @@
/// this operations has been invoked before or not.
virtual void edit_select_all();
virtual void edit_draw();
+ virtual void edit_refresh();
void perform_flood_fill();
void perform_paste();
Index: wesnoth/src/hotkeys.cpp
diff -u wesnoth/src/hotkeys.cpp:1.66 wesnoth/src/hotkeys.cpp:1.67
--- wesnoth/src/hotkeys.cpp:1.66 Sun Jan 9 00:02:52 2005
+++ wesnoth/src/hotkeys.cpp Sat Mar 5 19:03:56 2005
@@ -1,4 +1,4 @@
-/* $Id: hotkeys.cpp,v 1.66 2005/01/09 00:02:52 silene Exp $ */
+/* $Id: hotkeys.cpp,v 1.67 2005/03/05 19:03:56 j_daniel Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -91,6 +91,7 @@
{ hotkey::HOTKEY_EDIT_FLIP, "editflip", N_("Flip Map"),true },
{ hotkey::HOTKEY_EDIT_SELECT_ALL, "editselectall", N_("Select
All"),true },
{ hotkey::HOTKEY_EDIT_DRAW, "editdraw", N_("Draw Terrain"),true },
+ { hotkey::HOTKEY_EDIT_REFRESH, "editrefresh", N_("Refresh Image
Cache"), true },
{ hotkey::HOTKEY_DELAY_SHROUD, "delayshroud", N_("Delay Shroud
Updates"), false },
{ hotkey::HOTKEY_UPDATE_SHROUD, "updateshroud", N_("Update Shroud
Now"), false },
@@ -621,6 +622,10 @@
if(executor)
executor->edit_draw();
break;
+ case HOTKEY_EDIT_REFRESH:
+ if(executor)
+ executor->edit_refresh();
+ break;
default:
std::cerr << "command_executor: unknown command number
" << command << ", ignoring.\n";
break;
Index: wesnoth/src/hotkeys.hpp
diff -u wesnoth/src/hotkeys.hpp:1.55 wesnoth/src/hotkeys.hpp:1.56
--- wesnoth/src/hotkeys.hpp:1.55 Sun Feb 6 10:40:12 2005
+++ wesnoth/src/hotkeys.hpp Sat Mar 5 19:03:56 2005
@@ -1,4 +1,4 @@
-/* $Id: hotkeys.hpp,v 1.55 2005/02/06 10:40:12 isaaccp Exp $ */
+/* $Id: hotkeys.hpp,v 1.56 2005/03/05 19:03:56 j_daniel Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -46,6 +46,7 @@
HOTKEY_EDIT_FILL_SELECTION, HOTKEY_EDIT_CUT, HOTKEY_EDIT_COPY,
HOTKEY_EDIT_PASTE, HOTKEY_EDIT_REVERT, HOTKEY_EDIT_RESIZE,
HOTKEY_EDIT_FLIP, HOTKEY_EDIT_SELECT_ALL, HOTKEY_EDIT_DRAW,
+ HOTKEY_EDIT_REFRESH,
HOTKEY_USER_CMD,
HOTKEY_NULL
};
@@ -173,6 +174,7 @@
virtual void edit_flip() {}
virtual void edit_select_all() {}
virtual void edit_draw() {}
+ virtual void edit_refresh() {}
//Gets the action's image (if any). Displayed left of the action text
in menus.
virtual std::string get_action_image(hotkey::HOTKEY_COMMAND command)
const { return ""; }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth data/themes/editor.cfg src/hotkeys.hpp ...,
Jon Daniel <=