Update of /cvsroot/timewarp/source/twgui
In directory sc8-pr-cvs1:/tmp/cvs-serv1507/source/twgui
Modified Files:
gametest.cpp gametest.h
Log Message:
adapted cause filename format of twgui is slightly changed
Index: gametest.cpp
===================================================================
RCS file: /cvsroot/timewarp/source/twgui/gametest.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** gametest.cpp 28 Oct 2003 00:00:38 -0000 1.11
--- gametest.cpp 23 Nov 2003 10:01:54 -0000 1.12
***************
*** 301,304 ****
--- 301,309 ----
+ void TWgui::handle_zoom_in()
+ {
+ view->camera.z /= 1 + 0.002 * frame_time;
+ }
+
void TWgui::init(Log *_log)
{
***************
*** 340,367 ****
! screenswitch = new SwitchButton(meleemenu, "VIEWSCREEN", -1, -1, mapkey(KEY_R, KEY_LCONTROL));
! healthbarswitch = new SwitchButton(meleemenu, "HEALTHBARS", -1, -1, mapkey(KEY_H, KEY_ALT));
! wedgeindicatorswitch = new SwitchButton(meleemenu, "WEDGEINDIC", -1, -1, mapkey(KEY_W, KEY_ALT));
! captainpanelswitch = new SwitchButton(meleemenu, "CPTPANEL", -1, -1, mapkey(KEY_C, KEY_ALT));
! chatlogswitch = new SwitchButton(meleemenu, "CHATLOG", -1, -1, mapkey(KEY_C, KEY_ALT));
! zoomin = new Button(meleemenu, "ZOOMIN", -1, -1, KEY_EQUALS, 1);
! zoomout = new Button(meleemenu, "ZOOMOUT", -1, -1, KEY_MINUS, 1);
! abort = new Button(meleemenu, "ABORT", -1, -1, mapkey(KEY_A, KEY_LCONTROL));
! extraplanet = new Button(meleemenu, "EXTRAPLANET", -1, -1, mapkey(KEY_P, KEY_LCONTROL));
! snapshot = new Button(meleemenu, "SNAPSHOT", -1, -1, mapkey(KEY_S, KEY_LCONTROL));
! callhelp = new Button(meleemenu, "CALLHELP", -1, -1, mapkey(KEY_H, KEY_LCONTROL));
! viewmode = new Button(meleemenu, "VIEWMODE", -1, -1, mapkey(KEY_V, KEY_LCONTROL));
strcpy(texted, "hello");
! text_edit = new TextEditBox(meleemenu, "TEXT", -1, -1, usefont, texted, 512); // text I/O ... experimental !!
--- 345,373 ----
! screenswitch = new SwitchButton(meleemenu, "VIEWSCREEN/", -1, -1, mapkey(KEY_R, KEY_LCONTROL));
! healthbarswitch = new SwitchButton(meleemenu, "HEALTHBARS/", -1, -1, mapkey(KEY_H, KEY_ALT));
! wedgeindicatorswitch = new SwitchButton(meleemenu, "WEDGEINDIC/", -1, -1, mapkey(KEY_W, KEY_ALT));
! captainpanelswitch = new SwitchButton(meleemenu, "CPTPANEL/", -1, -1, mapkey(KEY_C, KEY_ALT));
! chatlogswitch = new SwitchButton(meleemenu, "CHATLOG/", -1, -1, mapkey(KEY_C, KEY_ALT));
! zoomin = new Button(meleemenu, "ZOOMIN/", -1, -1, KEY_EQUALS, 1);
! zoomin->bind(new ZoomEvent(this));
! zoomout = new Button(meleemenu, "ZOOMOUT/", -1, -1, KEY_MINUS, 1);
! abort = new Button(meleemenu, "ABORT/", -1, -1, mapkey(KEY_A, KEY_LCONTROL));
! extraplanet = new Button(meleemenu, "EXTRAPLANET/", -1, -1, mapkey(KEY_P, KEY_LCONTROL));
! snapshot = new Button(meleemenu, "SNAPSHOT/", -1, -1, mapkey(KEY_S, KEY_LCONTROL));
! callhelp = new Button(meleemenu, "CALLHELP/", -1, -1, mapkey(KEY_H, KEY_LCONTROL));
! viewmode = new Button(meleemenu, "VIEWMODE/", -1, -1, mapkey(KEY_V, KEY_LCONTROL));
strcpy(texted, "hello");
! text_edit = new TextEditBox(meleemenu, "TEXT/", -1, -1, usefont, texted, 512); // text I/O ... experimental !!
***************
*** 370,378 ****
alertmenu->center(400, 300); // center around this position, in relative coordinates
! alert_yes = new Button(alertmenu, "YES", -1, -1, KEY_Y);
! alert_no = new Button(alertmenu, "NO", -1, -1, KEY_N);
! alert_text = new TextButton(alertmenu, "TEXT", -1, -1, usefont);
alertmenu->hide();
--- 376,384 ----
alertmenu->center(400, 300); // center around this position, in relative coordinates
! alert_yes = new Button(alertmenu, "YES/", -1, -1, KEY_Y);
! alert_no = new Button(alertmenu, "NO/", -1, -1, KEY_N);
! alert_text = new TextButton(alertmenu, "TEXT/", -1, -1, usefont);
alertmenu->hide();
***************
*** 487,490 ****
--- 493,497 ----
winman->calculate();
+ /*
if (zoomin->flag.left_mouse_hold)
{
***************
*** 494,497 ****
--- 501,506 ----
view->camera.z /= 1 + 0.002 * frame_time;
}
+ */
+
if (zoomout->flag.left_mouse_hold)
{
Index: gametest.h
===================================================================
RCS file: /cvsroot/timewarp/source/twgui/gametest.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** gametest.h 26 Oct 2003 10:43:18 -0000 1.5
--- gametest.h 23 Nov 2003 10:01:54 -0000 1.6
***************
*** 9,13 ****
#include "../games/gflmelee.h"
!
--- 9,13 ----
#include "../games/gflmelee.h"
! #include "../twgui/area.h"
***************
*** 67,70 ****
--- 67,78 ----
void animate_stuff(Frame *frame);
+
+ void handle_zoom_in();
+ class ZoomEvent : public ButtonEvent {
+ public:
+ TWgui *g;
+ ZoomEvent(TWgui *ag) {g = ag;};
+ virtual void handle_lhold(){g->handle_zoom_in();};
+ } *zoom_event;
};
|