[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/src Makefile.am,1.80.2.38,1.80.2.39 j
From: |
VENNIN Joel <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/src Makefile.am,1.80.2.38,1.80.2.39 joltest.cc,1.1.2.11,1.1.2.12 |
Date: |
Fri, 18 Oct 2002 18:58:31 -0400 |
Update of /cvsroot/adonthell/adonthell/src
In directory subversions:/tmp/cvs-serv19249
Modified Files:
Tag: Branch_road_to_0-4
Makefile.am joltest.cc
Log Message:
Change lot of thing in the gui stuff...
I have added button in the theme management.
Now the new gui is ready for utf8, so now we must use utf8
Index: Makefile.am
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Makefile.am,v
retrieving revision 1.80.2.38
retrieving revision 1.80.2.39
diff -C2 -r1.80.2.38 -r1.80.2.39
*** Makefile.am 12 Sep 2002 20:18:16 -0000 1.80.2.38
--- Makefile.am 18 Oct 2002 22:58:28 -0000 1.80.2.39
***************
*** 108,112 ****
schedtest_SOURCES = schedtest.cc
! joltest_LDADD = gui/libgui.a gfx/libgfx.a input/libinput.a python/libpython.a
libbase.a $(libbase_LDADD) $(libgui_LDADD) $(libpython_LDADD)
alextest_LDADD = lmap/libmap.a gfx/libgfx.a input/libinput.a
python/libpython.a libbase.a $(libbase_LDADD) $(libpython_LDADD)
--- 108,113 ----
schedtest_SOURCES = schedtest.cc
!
! joltest_LDADD = gui/libgui.a gfx/libgfx.a input/libinput.a python/libpython.a
libbase.a $(libbase_LDADD) $(libgui_LDADD) $(libpython_LDADD) -lstdc++
alextest_LDADD = lmap/libmap.a gfx/libgfx.a input/libinput.a
python/libpython.a libbase.a $(libbase_LDADD) $(libpython_LDADD)
Index: joltest.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/Attic/joltest.cc,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -C2 -r1.1.2.11 -r1.1.2.12
*** joltest.cc 2 Jul 2002 07:20:29 -0000 1.1.2.11
--- joltest.cc 18 Oct 2002 22:58:28 -0000 1.1.2.12
***************
*** 23,177 ****
{
! gfx::screen::init ();
! gfx::screen::set_video_mode (640, 480, 16);
! gfx::screen::clear ();
!
! if (argc != 2)
! {
! std::cout << "Please need TTF font as argument\n";
! exit (1);
! }
!
! /**
! * Font
! */
! gui::font font;
! if (!font.load (argv[1]))
! {
! std::cout << "Error in loading font ...\n";
! exit (1);
! }
! font.set_size (12);
! font.build ();
!
!
! gui::theme theme;
! theme.load ("adontest/original.theme");
!
! gui::manager manager;
!
! /**
! CREATE BUTTON
! */
! gui::border_template * bd_press = new gui::border_template;
! bd_press->set_name ("pressed");
! bd_press->set (border_template::B_TOP, "widgets/button_pressed_top.pnm");
! bd_press->set (border_template::B_RIGHT,
"widgets/button_pressed_right.pnm");
! bd_press->set (border_template::B_LEFT,
"widgets/button_pressed_left.pnm");
! bd_press->set (border_template::B_BOTTOM,
"widgets/button_pressed_bot.pnm");
! bd_press->set (border_template::C_TL, "widgets/button_pressed_tl.pnm");
! bd_press->set (border_template::C_TR, "widgets/button_pressed_tr.pnm");
! bd_press->set (border_template::C_BL, "widgets/button_pressed_bl.pnm");
! bd_press->set (border_template::C_BR, "widgets/button_pressed_br.pnm");
! bd_press->build();
!
! gui::border_template * bd_released = new gui::border_template;
! bd_released->set_name ("released");
! bd_released->set (border_template::B_TOP, "widgets/button_top.pnm");
! bd_released->set (border_template::B_RIGHT, "widgets/button_right.pnm");
! bd_released->set (border_template::B_LEFT, "widgets/button_left.pnm");
! bd_released->set (border_template::B_BOTTOM, "widgets/button_bot.pnm");
! bd_released->set (border_template::C_TL, "widgets/button_tl.pnm");
! bd_released->set (border_template::C_TR, "widgets/button_tr.pnm");
! bd_released->set (border_template::C_BL, "widgets/button_bl.pnm");
! bd_released->set (border_template::C_BR, "widgets/button_br.pnm");
! bd_released->build();
!
- gui::background_template * ba_tmp = new gui::background_template();
- ba_tmp->set_color (192, 165, 57);
- button_template bt_tmp;
- bt_tmp.set_released (bd_released);
- bt_tmp.set_pressed (bd_press);
- bt_tmp.set_background (ba_tmp);
-
- gui::window * wnd = new gui::window;
-
-
- wnd->set_visible (true);
- wnd->set_position (20, 40);
- wnd->set_size (350, 200);
- wnd->on_delete.connect (new callback_slot (makeFunctor (manager,
&manager::shutdown)));
- wnd->set_border_ui (theme.get_border("normal"));
-
-
- gui::box * box = new gui::box;
- box->set_border_width (10);
- box->set_spacing (3);
- box->set_visible (true);
- box->set_size (200, 60);
- box->set_position (50, 50);
- box->set_geometry (box::VERTICAL);
- box->set_border_ui (theme.get_border("mini"));
-
- gui::widget * wid;
-
- wid = new gui::widget;
- wid->set_size (30, 50);
- wid->set_visible (true);
- wid->realize ();
- box->add_start (wid, true, true, 0);
-
-
- /*wid = new widget;
- wid->set_size (30, 20);
- wid->set_visible (true);
- wid->realize ();
- box->add_start (wid, true, true, 0);
- */
- gui::button * but;
- but = new gui::button;
- but->set_size (30, 20);
- but->set_visible (true);
- but->realize ();
- but->set_button_ui ( &bt_tmp);
- but->set_text ("Quit ", &font);
- box->add_start (but, true, true, 0);
-
- wid = new gui::widget;
- wid->set_size (10, 50);
- wid->set_visible (true);
- wid->realize ();
- box->add_end (wid, true, true, 15) ;
-
- box->realize ();
-
! wnd->add (box);
! wnd->set_resizeable (true);
! wnd->realize ();
!
! manager.add (wnd);
!
!
! while (manager.update () )
! {
! input::manager::update();
!
! gametime::update ();
!
! gfx::screen::display.fillrect (0, 0, 640, 480, 127, 127, 127);
!
!
! manager.draw ();
!
! gfx::screen::show ();
!
! gfx::screen::clear ();
! }
!
! input::manager::cleanup();
!
! /**
! * SAVE A THEME
! */
! /*
! theme theme;
theme.set_name ("silverleaf");
--- 23,195 ----
{
! gfx::screen::init ();
! gfx::screen::set_video_mode (640, 480, 16);
! gfx::screen::clear ();
!
! if (argc != 2)
! {
! std::cout << "Please need TTF font as argument\n";
! exit (1);
! }
!
! /***********************************************/
! /*********************FONT ********************/
! /***********************************************/
! gui::font font;
! if (!font.load (argv[1]))
! {
! std::cout << "Error in loading font ...\n";
! exit (1);
! }
!
! font.set_size (20);
! font.build ();
!
! FILE * fd = fopen ("/home/jol/toto.utf8", "r");
! char t[255];
! fgets(t, 255, fd);
! fclose (fd);
!
!
! /***********************************************/
! /********************* THEME *******************/
! /***********************************************/
! gui::theme theme;
! theme.load ("adontest/original.theme");
!
! /**
! CREATE BUTTON THEME
! */
! gui::border_template * bd_press = new gui::border_template;
! bd_press->set_name ("pressed");
! bd_press->set (border_template::B_TOP, "widgets/button_pressed_top.pnm");
! bd_press->set (border_template::B_RIGHT,
"widgets/button_pressed_right.pnm");
! bd_press->set (border_template::B_LEFT, "widgets/button_pressed_left.pnm");
! bd_press->set (border_template::B_BOTTOM, "widgets/button_pressed_bot.pnm");
! bd_press->set (border_template::C_TL, "widgets/button_pressed_tl.pnm");
! bd_press->set (border_template::C_TR, "widgets/button_pressed_tr.pnm");
! bd_press->set (border_template::C_BL, "widgets/button_pressed_bl.pnm");
! bd_press->set (border_template::C_BR, "widgets/button_pressed_br.pnm");
! bd_press->build();
!
! gui::border_template * bd_released = new gui::border_template;
! bd_released->set_name ("released");
! bd_released->set (border_template::B_TOP, "widgets/button_top.pnm");
! bd_released->set (border_template::B_RIGHT, "widgets/button_right.pnm");
! bd_released->set (border_template::B_LEFT, "widgets/button_left.pnm");
! bd_released->set (border_template::B_BOTTOM, "widgets/button_bot.pnm");
! bd_released->set (border_template::C_TL, "widgets/button_tl.pnm");
! bd_released->set (border_template::C_TR, "widgets/button_tr.pnm");
! bd_released->set (border_template::C_BL, "widgets/button_bl.pnm");
! bd_released->set (border_template::C_BR, "widgets/button_br.pnm");
! bd_released->build();
!
+ /* create the background associated at the button */
+ gui::background_template * ba_tmp = new gui::background_template();
+ ba_tmp->set_color (192, 165, 57);
+
+ button_template bt_tmp;
+ bt_tmp.set_released (bd_released);
+ bt_tmp.set_pressed (bd_press);
+ bt_tmp.set_background (ba_tmp);
+ bt_tmp.set_name ("standart");
+
+
+ /***********************************************/
+ /********************* MANAGER******************/
+ /***********************************************/
+ gui::manager manager;
+
+
+ /***********************************************/
+ /********************* INTERFACE ***************/
+ /***********************************************/
+
+ /* define the window */
+ gui::window * wnd = new gui::window;
+ wnd->set_visible (true);
+ wnd->set_position (20, 40);
+ wnd->set_size (350, 200);
+ wnd->on_delete.connect (new callback_slot (makeFunctor (manager,
&manager::shutdown)));
+ wnd->set_border_ui (theme.get_border("normal"));
+
+ /* create a box */
+ gui::box * box = new gui::box;
+ box->set_border_width (10);
+ box->set_spacing (3);
+ box->set_visible (true);
+ box->set_size (200, 60);
+ box->set_position (0, 0);
+ box->set_geometry (box::VERTICAL);
+ box->set_border_ui (theme.get_border("mini"));
+
+
+ /* create some widget and add them at the box */
+ gui::widget * wid;
+ wid = new gui::widget;
+ wid->set_size (30, 50);
+ wid->set_visible (true);
+ wid->realize ();
+ box->add_start (wid, true, true, 0);
+
+ wid = new widget;
+ wid->set_size (30, 20);
+ wid->set_visible (true);
+ wid->realize ();
+ box->add_start (wid, true, true, 0);
+
+
+ /* create a button */
+ gui::button * but;
+ but = new gui::button;
+ but->set_size (30, 20);
+ but->set_visible (true);
+ but->set_button_ui ( &bt_tmp);
+ but->set_text ("Quit ", &font);
+ but->realize ();
+ box->add_start (but, false, false);
+
+ /* build the box */
+ box->realize ();
+
+ /* add the box and realize the window */
+ wnd->add (box);
+ wnd->set_resizeable (true);
+ wnd->realize ();
+
+ /* add the window to the window manager */
+ manager.add (wnd);
+
+ while (manager.update () )
+ {
+ input::manager::update();
+
+ gametime::update ();
+
+ gfx::screen::display.fillrect (0, 0, 640, 480, 127, 127, 127);
+
+ manager.draw ();
+
+ gfx::screen::show ();
+
+ gfx::screen::clear ();
+ }
+
+ input::manager::cleanup();
+
+
! /**
! * SAVE A THEME
! */
! /*
! theme theme;
theme.set_name ("silverleaf");
***************
*** 211,231 ****
theme.display_info ();
! */
! /**
! * load a theme
! **/
! /*
! theme theme;
!
! theme.load ("adontest/original.theme");
! theme.display_info ();
!
! std::cout << "\n\nLoad another theme\n\n";
!
! theme.load ("adontest/silverleaf.theme");
! theme.display_info ();
! */
! return 0;
--- 229,249 ----
theme.display_info ();
! */
! /**
! * load a theme
! **/
! /*
! theme theme;
!
! theme.load ("adontest/original.theme");
! theme.display_info ();
!
! std::cout << "\n\nLoad another theme\n\n";
!
! theme.load ("adontest/silverleaf.theme");
! theme.display_info ();
! */
! return 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/src Makefile.am,1.80.2.38,1.80.2.39 joltest.cc,1.1.2.11,1.1.2.12,
VENNIN Joel <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: adonthell/src/gui object_template.cc,NONE,1.1.2.1 object_template.h,NONE,1.1.2.1 Makefile.am,1.1.2.3,1.1.2.4 bin.cc,1.1.2.2,1.1.2.3 bin.h,1.1.2.2,1.1.2.3 border_template.cc,1.1.2.1,1.1.2.2 border_template.h,1.1.2.1,1.1.2.2 box.cc,1.1.2.2,1.1.2.3 button.cc,1.1.2.1,1.1.2.2 button_template.cc,1.1.2.1,1.1.2.2 button_template.h,1.1.2.1,1.1.2.2 container.cc,1.1.2.2,1.1.2.3 container.h,1.1.2.2,1.1.2.3 font.cc,1.1.2.1,1.1.2.2 font.h,1.1.2.1,1.1.2.2 theme.cc,1.1.2.1,1.1.2.2 theme.h,1.1.2.1,1.1.2.2 widget.cc,1.1.2.2,1.1.2.3 widget.h,1.1.2.2,1.1.2.3 window.cc,1.1.2.2,1.1.2.3
- Next by Date:
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit cfg_data.cc,NONE,1.1 cfg_data.h,NONE,1.1 cfg_project.cc,NONE,1.1 cfg_project.h,NONE,1.1 Makefile.am,1.48,1.49 cfg_io.cc,1.1,1.2 cfg_io.h,1.1,1.2
- Previous by thread:
[Adonthell-commits] CVS: adonthell/src/gui object_template.cc,NONE,1.1.2.1 object_template.h,NONE,1.1.2.1 Makefile.am,1.1.2.3,1.1.2.4 bin.cc,1.1.2.2,1.1.2.3 bin.h,1.1.2.2,1.1.2.3 border_template.cc,1.1.2.1,1.1.2.2 border_template.h,1.1.2.1,1.1.2.2 box.cc,1.1.2.2,1.1.2.3 button.cc,1.1.2.1,1.1.2.2 button_template.cc,1.1.2.1,1.1.2.2 button_template.h,1.1.2.1,1.1.2.2 container.cc,1.1.2.2,1.1.2.3 container.h,1.1.2.2,1.1.2.3 font.cc,1.1.2.1,1.1.2.2 font.h,1.1.2.1,1.1.2.2 theme.cc,1.1.2.1,1.1.2.2 theme.h,1.1.2.1,1.1.2.2 widget.cc,1.1.2.2,1.1.2.3 widget.h,1.1.2.2,1.1.2.3 window.cc,1.1.2.2,1.1.2.3
- Next by thread:
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit cfg_data.cc,NONE,1.1 cfg_data.h,NONE,1.1 cfg_project.cc,NONE,1.1 cfg_project.h,NONE,1.1 Makefile.am,1.48,1.49 cfg_io.cc,1.1,1.2 cfg_io.h,1.1,1.2
- Index(es):