[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r2600 - in trunk: data/data data/images data/images/core/mi
From: |
jave27 |
Subject: |
[Pingus-CVS] r2600 - in trunk: data/data data/images data/images/core/misc src/editor src/gui |
Date: |
Tue, 17 Jan 2006 03:29:50 +0100 |
Author: jave27
Date: 2006-01-17 03:29:27 +0100 (Tue, 17 Jan 2006)
New Revision: 2600
Added:
trunk/data/images/core/misc/checkbox_clicked.png
Modified:
trunk/data/data/core.xml
trunk/data/images/Makefile.am
trunk/src/editor/editor_panel.cxx
trunk/src/gui/checkbox.cxx
trunk/src/gui/checkbox.hxx
Log:
Changed the checkbox images and moved it around a bit.
Modified: trunk/data/data/core.xml
===================================================================
--- trunk/data/data/core.xml 2006-01-17 01:32:05 UTC (rev 2599)
+++ trunk/data/data/core.xml 2006-01-17 02:29:27 UTC (rev 2600)
@@ -220,6 +220,9 @@
</section>
<section name="misc">
+ <sprite name="checkbox_clicked">
+ <image file="../images/core/misc/checkbox_clicked.png"/>
+ </sprite>
<sprite name="next">
<image file="../images/core/misc/next.png"/>
</sprite>
Modified: trunk/data/images/Makefile.am
===================================================================
--- trunk/data/images/Makefile.am 2006-01-17 01:32:05 UTC (rev 2599)
+++ trunk/data/images/Makefile.am 2006-01-17 02:29:27 UTC (rev 2600)
@@ -85,6 +85,7 @@
core/menu/up_arrow.png \
core/menu/worldscreenbg.jpg \
core/misc/404.png \
+core/misc/checkbox_clicked.png \
core/misc/chalk_pingu1.png \
core/misc/chalk_pingu2.png \
core/misc/chalk_pingu3.png \
Added: trunk/data/images/core/misc/checkbox_clicked.png
===================================================================
(Binary files differ)
Property changes on: trunk/data/images/core/misc/checkbox_clicked.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/editor/editor_panel.cxx
===================================================================
--- trunk/src/editor/editor_panel.cxx 2006-01-17 01:32:05 UTC (rev 2599)
+++ trunk/src/editor/editor_panel.cxx 2006-01-17 02:29:27 UTC (rev 2600)
@@ -66,7 +66,7 @@
add((PanelButton*)(new PanelButtonGroundpiece(this)));
// Create Checkboxes
- snap_to_checkbox = new GUI::Checkbox(Vector(400, 0), "Snap To Grid: ",
this);
+ snap_to_checkbox = new GUI::Checkbox(Vector(370, 5), "Snap To Grid: ",
this);
get_screen()->get_gui_manager()->add(snap_to_checkbox);
// Create Comboboxes
Modified: trunk/src/gui/checkbox.cxx
===================================================================
--- trunk/src/gui/checkbox.cxx 2006-01-17 01:32:05 UTC (rev 2599)
+++ trunk/src/gui/checkbox.cxx 2006-01-17 02:29:27 UTC (rev 2600)
@@ -30,10 +30,11 @@
namespace GUI {
Checkbox::Checkbox(Vector p, std::string label_, CheckboxListener* l) :
- box(Resource::load_sprite("core/start/ok")),
- checkmark(Resource::load_sprite("core/start/ok_clicked")),
+ checkmark(Resource::load_sprite("core/misc/checkbox_clicked")),
is_checked(false),
pos(p),
+ width(20),
+ height(20),
listener(l),
label(label_)
{
@@ -42,18 +43,19 @@
void
Checkbox::draw(DrawingContext& gc)
{
- gc.draw(box, pos);
+ gc.draw_rect(pos.x, pos.y, pos.x + width, pos.y + height,
+ CL_Color::black);
if (is_checked)
gc.draw(checkmark, pos);
- gc.print_right(Fonts::pingus_small, (int)pos.x, (int)pos.y, label);
+ gc.print_right(Fonts::smallfont, (int)pos.x, (int)pos.y, label);
}
bool
Checkbox::is_at(int x, int y)
{
- return (x > pos.x && x < pos.x + box.get_width() &&
- y > pos.y && y < pos.y + box.get_height());
+ return (x > pos.x && x < pos.x + width &&
+ y > pos.y && y < pos.y + height);
}
void
Modified: trunk/src/gui/checkbox.hxx
===================================================================
--- trunk/src/gui/checkbox.hxx 2006-01-17 01:32:05 UTC (rev 2599)
+++ trunk/src/gui/checkbox.hxx 2006-01-17 02:29:27 UTC (rev 2600)
@@ -39,6 +39,9 @@
bool is_checked;
Vector pos;
+
+ float width;
+ float height;
CheckboxListener* listener;
std::string label;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r2600 - in trunk: data/data data/images data/images/core/misc src/editor src/gui,
jave27 <=