Revision: 1549
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1549&view=rev
Author: rorthomas
Date: 2010-12-16 00:43:15 +0000 (Thu, 16 Dec 2010)
Log Message:
-----------
more fixes to support latest mygui
Modified Paths:
--------------
trunk/source/main/Console.cpp
trunk/source/main/SelectorWindow.cpp
trunk/source/main/gui_friction.cpp
trunk/source/main/gui_menu.cpp
trunk/source/main/gui_mp.cpp
Modified: trunk/source/main/Console.cpp
===================================================================
--- trunk/source/main/Console.cpp 2010-12-14 18:53:42 UTC (rev 1548)
+++ trunk/source/main/Console.cpp 2010-12-16 00:43:15 UTC (rev 1549)
@@ -33,8 +33,8 @@
size.height = size.height/3;
mMainWidget->setCoord(0, -size.height, size.width, size.height);
- mCommandEdit->eventKeyButtonPressed = MyGUI::newDelegate(this,
&Console::eventButtonPressed);
- mCommandEdit->eventEditSelectAccept = MyGUI::newDelegate(this,
&Console::eventCommandAccept);
+ mCommandEdit->eventKeyButtonPressed += MyGUI::newDelegate(this,
&Console::eventButtonPressed);
+ mCommandEdit->eventEditSelectAccept += MyGUI::newDelegate(this,
&Console::eventCommandAccept);
mHistoryPosition = 0;
mHistory.push_back("");
Modified: trunk/source/main/SelectorWindow.cpp
===================================================================
--- trunk/source/main/SelectorWindow.cpp 2010-12-14 18:53:42 UTC (rev
1548)
+++ trunk/source/main/SelectorWindow.cpp 2010-12-16 00:43:15 UTC (rev
1549)
@@ -47,9 +47,9 @@
mTypeComboBox->eventComboChangePosition += MyGUI::newDelegate(this,
&SelectorWindow::eventComboChangePositionTypeComboBox);
mTypeComboBox->eventKeyButtonPressed += MyGUI::newDelegate(this,
&SelectorWindow::eventKeyButtonPressed_Main);
mModelList->eventListChangePosition += MyGUI::newDelegate(this,
&SelectorWindow::eventListChangePositionModelList);
- //mModelList->eventKeyButtonPressed = MyGUI::newDelegate(this,
&SelectorWindow::eventKeyButtonPressed_Main);
+ //mModelList->eventKeyButtonPressed += MyGUI::newDelegate(this,
&SelectorWindow::eventKeyButtonPressed_Main);
mConfigComboBox->eventComboAccept += MyGUI::newDelegate(this,
&SelectorWindow::eventComboAcceptConfigComboBox);
- //mConfigComboBox->eventKeyButtonPressed = MyGUI::newDelegate(this,
&SelectorWindow::eventKeyButtonPressed_Main);
+ //mConfigComboBox->eventKeyButtonPressed += MyGUI::newDelegate(this,
&SelectorWindow::eventKeyButtonPressed_Main);
mOkButton->eventMouseButtonClick += MyGUI::newDelegate(this,
&SelectorWindow::eventMouseButtonClickOkButton);
mCancelButton->eventMouseButtonClick += MyGUI::newDelegate(this,
&SelectorWindow::eventMouseButtonClickCancelButton);
Modified: trunk/source/main/gui_friction.cpp
===================================================================
--- trunk/source/main/gui_friction.cpp 2010-12-14 18:53:42 UTC (rev 1548)
+++ trunk/source/main/gui_friction.cpp 2010-12-16 00:43:15 UTC (rev 1549)
@@ -50,7 +50,7 @@
msgwin =
MyGUI::Gui::getInstance().createWidget<MyGUI::Window>("WindowCSX", 0, 0, 400,
300, MyGUI::Align::Center, "Overlapped");
msgwin->setCaption(_L("Friction Help"));
- msgwin->eventWindowButtonPressed = MyGUI::newDelegate(this,
&GUI_Friction::notifyHelpWindowButtonPressed);
+ msgwin->eventWindowButtonPressed += MyGUI::newDelegate(this,
&GUI_Friction::notifyHelpWindowButtonPressed);
e = msgwin->createWidget<MyGUI::Edit>("EditStretch", 0, 0, 400, 300,
MyGUI::Align::Default, "helptext");
e->setCaption("");
e->setEditWordWrap(true);
@@ -68,7 +68,7 @@
t->setFontHeight(18);
b = win->createWidget<MyGUI::Button>("Button", x, y, 70, 20,
MyGUI::Align::Default, "select_current_ground"); x+=75;
b->setCaption("select");
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
// combo box
x=20; y+=20;
@@ -77,8 +77,8 @@
t->setTextAlign(MyGUI::Align::Right);
MyGUI::ComboBoxPtr cb = win->createWidget<MyGUI::ComboBox>("ComboBox",
x, y, 115, 20, MyGUI::Align::Default, "combo_grounds");
- cb->eventComboAccept = MyGUI::newDelegate(this,
&GUI_Friction::event_combo_grounds_eventComboAccept);
- cb->eventComboChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_combo_grounds_eventComboAccept);
+ cb->eventComboAccept += MyGUI::newDelegate(this,
&GUI_Friction::event_combo_grounds_eventComboAccept);
+ cb->eventComboChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_combo_grounds_eventComboAccept);
cb->setEditStatic(true);
// ground models are not loaded here yet, so we will add them once we
show the dialog
@@ -96,15 +96,15 @@
t->setCaption(_L("Solid ground level:"));
t->setTextAlign(MyGUI::Align::Right);
e = p->createWidget<MyGUI::Edit>("Edit", lx, ly, 80, 20,
MyGUI::Align::Default, "solid_level"); lx+=85;
- e->eventEditTextChange = MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
+ e->eventEditTextChange += MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "solid_level_edited"); lx+=20;
h = p->createWidget<MyGUI::HScroll>("HScroll", lx, ly, 60, 20,
MyGUI::Align::Default, "solid_level_scroll"); lx+=65;
- h->eventScrollChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
+ h->eventScrollChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
h->setScrollRange(1000);
helpTexts["solid_level"] = std::pair<String,String>("Solid
ground level", "With this you can define how deep the solid ground is. If it is
0 then the surface will be solid. If it is 0.1 then you'll have 10 cm of fluid
on top of solid ground. If it is 100 then the solid ground will be way deep
(100m), with fluid on top.");
minMaxs["solid_level"] = std::pair<Real,Real>(0, 200);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "solid_level_help"); lx+=25;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
// solid_strength
@@ -113,15 +113,15 @@
t->setCaption(_L("Strength:"));
t->setTextAlign(MyGUI::Align::Right);
e = p->createWidget<MyGUI::Edit>("Edit", lx, ly, 80, 20,
MyGUI::Align::Default, "solid_strength"); lx+=85;
- e->eventEditTextChange = MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
+ e->eventEditTextChange += MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "solid_strength_edited"); lx+=20;
h = p->createWidget<MyGUI::HScroll>("HScroll", lx, ly, 60, 20,
MyGUI::Align::Default, "solid_strength_scroll"); lx+=65;
- h->eventScrollChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
+ h->eventScrollChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
h->setScrollRange(1000);
helpTexts["solid_strength"] =
std::pair<String,String>("Strength", "This parameter raises or diminishes
surface friction in a generic way. It is here so as to be able to do quick
calibrations of friction. Start with having this to 1.0 and after tuning the
rest of the surface variables, come back and play with this.");
minMaxs["solid_strength"] = std::pair<Real,Real>(0, 2);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "solid_strength_help"); lx+=25;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
// solid_static_friction
@@ -130,15 +130,15 @@
t->setCaption(_L("Static friction coef:"));
t->setTextAlign(MyGUI::Align::Right);
e = p->createWidget<MyGUI::Edit>("Edit", lx, ly, 80, 20,
MyGUI::Align::Default, "solid_static_friction"); lx+=85;
- e->eventEditTextChange = MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
+ e->eventEditTextChange += MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "solid_static_friction_edited"); lx+=20;
h = p->createWidget<MyGUI::HScroll>("HScroll", lx, ly, 60, 20,
MyGUI::Align::Default, "solid_static_friction_scroll"); lx+=65;
- h->eventScrollChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
+ h->eventScrollChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
h->setScrollRange(1000);
helpTexts["solid_static_friction"] =
std::pair<String,String>("Static friction coef", "Static friction keeps you in
the same place when you are stopped on a hill. In the real world this friction
is always bigger than dynamic friction (sliding friction). Start with 0.5 and
work from there. It is better to try to find some experimentally validated
values for this and the rest of surface friction variables in the net, and then
to fine tune via strength.");
minMaxs["solid_static_friction"] = std::pair<Real,Real>(0.1f,
2);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "solid_static_friction_help"); lx+=20;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
// solid_adhension_velo
@@ -147,15 +147,15 @@
t->setCaption(_L("Adhesion velocity:"));
t->setTextAlign(MyGUI::Align::Right);
e = p->createWidget<MyGUI::Edit>("Edit", lx, ly, 80, 20,
MyGUI::Align::Default, "solid_adhension_velo"); lx+=85;
- e->eventEditTextChange = MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
+ e->eventEditTextChange += MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "solid_adhension_velo_edited"); lx+=20;
h = p->createWidget<MyGUI::HScroll>("HScroll", lx, ly, 60, 20,
MyGUI::Align::Default, "solid_adhension_velo_scroll"); lx+=65;
- h->eventScrollChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
+ h->eventScrollChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
h->setScrollRange(1000);
helpTexts["solid_adhension_velo"] =
std::pair<String,String>("Adhesion velocity", "Below this velocity, static
friction rules, above it dynamic friction takes command. It should be something
small, in the range of 0.1-0.4 . This velocity threshold is also used by the
fluid physics, so you should always define it. NEVER have it at 0.");
minMaxs["solid_adhension_velo"] = std::pair<Real,Real>(0.1f,
0.5f);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "solid_adhension_velo_help"); lx+=20;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
// solid_dynamic_friction
@@ -164,15 +164,15 @@
t->setCaption(_L("Dynamic friction coef:"));
t->setTextAlign(MyGUI::Align::Right);
e = p->createWidget<MyGUI::Edit>("Edit", lx, ly, 80, 20,
MyGUI::Align::Default, "solid_dynamic_friction"); lx+=85;
- e->eventEditTextChange = MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
+ e->eventEditTextChange += MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "solid_dynamic_friction_edited"); lx+=20;
h = p->createWidget<MyGUI::HScroll>("HScroll", lx, ly, 60, 20,
MyGUI::Align::Default, "solid_dynamic_friction_scroll"); lx+=65;
- h->eventScrollChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
+ h->eventScrollChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
h->setScrollRange(1000);
helpTexts["solid_dynamic_friction"] =
std::pair<String,String>("Dynamic friction coef", "Or sliding friction coef. It
should be smaller than static friction coef. This parameter defines how much
friction you'll have when sliding. Try to find some values for it from the
net.");
minMaxs["solid_dynamic_friction"] = std::pair<Real,Real>(0.1f,
1.5f);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "solid_dynamic_friction_help"); lx+=20;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
// solid_hydrodynamic
@@ -181,15 +181,15 @@
t->setCaption(_L("Hydrodynamic friction coef:"));
t->setTextAlign(MyGUI::Align::Right);
e = p->createWidget<MyGUI::Edit>("Edit", lx, ly, 80, 20,
MyGUI::Align::Default, "solid_hydrodynamic"); lx+=85;
- e->eventEditTextChange = MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
+ e->eventEditTextChange += MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "solid_hydrodynamic_edited"); lx+=20;
h = p->createWidget<MyGUI::HScroll>("HScroll", lx, ly, 60, 20,
MyGUI::Align::Default, "solid_hydrodynamic_scroll"); lx+=65;
- h->eventScrollChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
+ h->eventScrollChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
h->setScrollRange(1000);
helpTexts["solid_hydrodynamic"] =
std::pair<String,String>("Hydrodynamic friction coef", "This friction defines
the added friction that you'll feel from a surface that has a little film of
fluid on it. It is kind of redundant with all the fluid physics below, but it
is here so as for experimentally validated values from the net to be usable. If
you decide that you'll simulate the film of fluid with the more complex fluid
physics below, then just set this to 0.");
minMaxs["solid_hydrodynamic"] = std::pair<Real,Real>(0, 1.5f);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "solid_hydrodynamic_help"); lx+=25;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
// solid_stribeck
@@ -198,15 +198,15 @@
t->setCaption(_L("Stribeck velocity:"));
t->setTextAlign(MyGUI::Align::Right);
e = p->createWidget<MyGUI::Edit>("Edit", lx, ly, 80, 20,
MyGUI::Align::Default, "solid_stribeck"); lx+=85;
- e->eventEditTextChange = MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
+ e->eventEditTextChange += MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "solid_stribeck_edited"); lx+=20;
h = p->createWidget<MyGUI::HScroll>("HScroll", lx, ly, 60, 20,
MyGUI::Align::Default, "solid_stribeck_scroll"); lx+=65;
helpTexts["solid_stribeck"] =
std::pair<String,String>("Stribeck velocity", "You'll either find stribeck
velocity in the net, or the inverse (1/stribeck velocity) of it described as
'stribeck coef'. It defines the shape of the dynamic friction curve. Lets leave
it at that. Just find some nice values for it from the net.");
minMaxs["solid_stribeck"] = std::pair<Real,Real>(0, 1000);
- h->eventScrollChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
+ h->eventScrollChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
h->setScrollRange(1000);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "solid_stribeck_help"); lx+=25;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
// solid_alpha
@@ -215,15 +215,15 @@
t->setCaption(_L("alpha:"));
t->setTextAlign(MyGUI::Align::Right);
e = p->createWidget<MyGUI::Edit>("Edit", lx, ly, 80, 20,
MyGUI::Align::Default, "solid_alpha"); lx+=85;
- e->eventEditTextChange = MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
+ e->eventEditTextChange += MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "solid_alpha_edited"); lx+=20;
h = p->createWidget<MyGUI::HScroll>("HScroll", lx, ly, 60, 20,
MyGUI::Align::Default, "solid_alpha_scroll"); lx+=65;
- h->eventScrollChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
+ h->eventScrollChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
h->setScrollRange(1000);
helpTexts["solid_alpha"] = std::pair<String,String>("Alpha",
"Its usual value is 2. But you can try others.");
minMaxs["solid_alpha"] = std::pair<Real,Real>(0, 200);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "solid_alpha_help"); lx+=25;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
// combo_fx_type
@@ -241,7 +241,7 @@
helpTexts["combo_fx"] = std::pair<String,String>("FX Type",
"The type of special effects that RoR will use to give the appearance of a
surface. It doesn't affect the physics at all");
minMaxs["combo_fx"] = std::pair<Real,Real>(0, 0);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "combo_fx_help"); lx+=25;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
// fx_color
@@ -254,7 +254,7 @@
t->setTextAlign(MyGUI::Align::Left);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "fx_color_text_edited"); lx+=20;
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "fx_color_help"); lx+=25;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
helpTexts["fx_color"] = std::pair<String,String>("FX Colour",
"The color of RoR's special effects");
minMaxs["fx_color"] = std::pair<Real,Real>(0, 0);
@@ -281,15 +281,15 @@
t->setCaption(_L("Flow behavior index:"));
t->setTextAlign(MyGUI::Align::Right);
e = p->createWidget<MyGUI::Edit>("Edit", lx, ly, 80, 20,
MyGUI::Align::Default, "fluid_flowbeh"); lx+=85;
- e->eventEditTextChange = MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
+ e->eventEditTextChange += MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "fluid_flowbeh_edited"); lx+=20;
h = p->createWidget<MyGUI::HScroll>("HScroll", lx, ly, 60, 20,
MyGUI::Align::Default, "fluid_flowbeh_scroll"); lx+=65;
- h->eventScrollChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
+ h->eventScrollChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
h->setScrollRange(1000);
helpTexts["fluid_flowbeh"] = std::pair<String,String>("Flow
behavior index", "If it is 1.0 then the fluid will behave like water. The lower
you get from 1.0, the more like mud the fluid will behave, meaning that for
small velocities the fluid will resist motion and for large velocities the
fluid will not resist so much. The higher you get from 1.0 the more like sand
the fluid will behave. The bigger the velocity, the bigger the resistance of
the fluid (try to hit sand hard it'll feel like stone).");
minMaxs["fluid_flowbeh"] = std::pair<Real,Real>(-2, 2);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "fluid_flowbeh_help"); lx+=25;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
// fluid_flowcon
@@ -298,15 +298,15 @@
t->setCaption(_L("Flow consistency:"));
t->setTextAlign(MyGUI::Align::Right);
e = p->createWidget<MyGUI::Edit>("Edit", lx, ly, 80, 20,
MyGUI::Align::Default, "fluid_flowcon"); lx+=85;
- e->eventEditTextChange = MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
+ e->eventEditTextChange += MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "fluid_flowcon_edited"); lx+=20;
h = p->createWidget<MyGUI::HScroll>("HScroll", lx, ly, 60, 20,
MyGUI::Align::Default, "fluid_flowcon_scroll"); lx+=65;
- h->eventScrollChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
+ h->eventScrollChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
h->setScrollRange(1000);
helpTexts["fluid_flowcon"] = std::pair<String,String>("Flow
consistency", "Think of it as default fluid resistance. Behavior index above
changes it at real time. Useful values in practice are quite large.");
minMaxs["fluid_flowcon"] = std::pair<Real,Real>(10, 100000);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "fluid_flowcon_help"); lx+=25;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
// fluid_density
@@ -315,15 +315,15 @@
t->setCaption(_L("Fluid density:"));
t->setTextAlign(MyGUI::Align::Right);
e = p->createWidget<MyGUI::Edit>("Edit", lx, ly, 80, 20,
MyGUI::Align::Default, "fluid_density"); lx+=85;
- e->eventEditTextChange = MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
+ e->eventEditTextChange += MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "fluid_density_edited"); lx+=20;
h = p->createWidget<MyGUI::HScroll>("HScroll", lx, ly, 60, 20,
MyGUI::Align::Default, "fluid_density_scroll"); lx+=65;
- h->eventScrollChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
+ h->eventScrollChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
h->setScrollRange(1000);
helpTexts["fluid_density"] = std::pair<String,String>("Fluid
density", "In mud (or sand) the resistance of the fluid described by the
parameters above will stop you and so keep you from sinking. But for substances
like water it isn't the drag that stops you from sinking. Its buoyancy. This
parameter is here so as to keep you from sinking when you wish to simulate
fluids with low drag (resistance). For fluids like mud or sand you can put it
at 0, but it is best to keep it at some minimum value. For fluids with behavior
index >=1 it will behave like you are in water. For fluids with behavior index
<1 it'll behave like you are in mud.");
minMaxs["fluid_density"] = std::pair<Real,Real>(10, 100000);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "fluid_density_help"); lx+=25;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
// fluid_drag_anisotropy
@@ -332,15 +332,15 @@
t->setCaption(_L("Drag anisotropy:"));
t->setTextAlign(MyGUI::Align::Right);
e = p->createWidget<MyGUI::Edit>("Edit", lx, ly, 80, 20,
MyGUI::Align::Default, "fluid_drag_anisotropy"); lx+=85;
- e->eventEditTextChange = MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
+ e->eventEditTextChange += MyGUI::newDelegate(this,
&GUI_Friction::event_edit_TextChange);
t = p->createWidget<MyGUI::StaticText>("StaticText", lx, ly,
20, 20, MyGUI::Align::Default, "fluid_drag_anisotropy_edited"); lx+=20;
h = p->createWidget<MyGUI::HScroll>("HScroll", lx, ly, 60, 20,
MyGUI::Align::Default, "fluid_drag_anisotropy_scroll"); lx+=65;
- h->eventScrollChangePosition = MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
+ h->eventScrollChangePosition += MyGUI::newDelegate(this,
&GUI_Friction::event_scroll_value);
h->setScrollRange(1000);
helpTexts["fluid_drag_anisotropy"] =
std::pair<String,String>("Drag anisotropy", "This parameter is for making it
easier(cheating) to get out from mud. To get stuck in real mud isn't fun at
all, so this makes the mud push up. Ranges in this parameter are from 0 to 1 .
If you set it at 1 then you'll get real mud. For values from 0 to 1, the
behavior goes from real mud to easy mud depending on this parameter and the
value of Adhesion velocity. For velocity 0 real mud it is. For velocity >=
adhesion velocity easy mud it is.");
minMaxs["fluid_drag_anisotropy"] = std::pair<Real,Real>(0, 1);
b = p->createWidget<MyGUI::Button>("Button", lx, ly, 20, 20,
MyGUI::Align::Default, "fluid_drag_anisotropy_help"); lx+=25;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("?");
lx=0; ly+=20;
@@ -351,7 +351,7 @@
x=10; y+=40;
b = win->createWidget<MyGUI::Button>("Button", x, y, 350, 30,
MyGUI::Align::Default, "apply_changes"); x+=25;
- b->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
+ b->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Friction::event_btn_MouseButtonClick);
b->setCaption("Apply Changes");
/*
@@ -360,7 +360,7 @@
t->setCaption(_L("Ground Debug"));
*/
- win->eventWindowButtonPressed = MyGUI::newDelegate(this,
&GUI_Friction::notifyWindowButtonPressed);
+ win->eventWindowButtonPressed += MyGUI::newDelegate(this,
&GUI_Friction::notifyWindowButtonPressed);
win->setVisible(false);
}
Modified: trunk/source/main/gui_menu.cpp
===================================================================
--- trunk/source/main/gui_menu.cpp 2010-12-14 18:53:42 UTC (rev 1548)
+++ trunk/source/main/gui_menu.cpp 2010-12-16 00:43:15 UTC (rev 1549)
@@ -96,7 +96,7 @@
pop->addItem("Camera Control", MyGUI::MenuItemType::Normal,
"cameratool");
pop->addItem("Friction Settings", MyGUI::MenuItemType::Normal,
"frictiongui");
- mainmenu->eventMenuCtrlAccept = MyGUI::newDelegate(this,
&GUI_MainMenu::onMenuBtn);
+ mainmenu->eventMenuCtrlAccept += MyGUI::newDelegate(this,
&GUI_MainMenu::onMenuBtn);
Modified: trunk/source/main/gui_mp.cpp
===================================================================
--- trunk/source/main/gui_mp.cpp 2010-12-14 18:53:42 UTC (rev 1548)
+++ trunk/source/main/gui_mp.cpp 2010-12-16 00:43:15 UTC (rev 1549)
@@ -93,7 +93,7 @@
row->playername->setCaption("Player " +
StringConverter::toString(i));
row->playername->setFontName("VeraMoBd");
row->playername->setUserString("tooltip", "user name");
- row->playername->eventToolTip = MyGUI::newDelegate(this,
&GUI_Multiplayer::openToolTip);
+ row->playername->eventToolTip += MyGUI::newDelegate(this,
&GUI_Multiplayer::openToolTip);
row->playername->setNeedToolTip(true);
row->playername->setVisible(false);
row->playername->setFontHeight(lineheight);
@@ -102,48 +102,48 @@
x -= 18;
row->flagimg =
mpPanel->createWidget<MyGUI::StaticImage>("StaticImage", x, y + 3, 16, 11,
MyGUI::Align::Default, "Main");
row->flagimg->setUserString("tooltip", "user country");
- row->flagimg->eventToolTip = MyGUI::newDelegate(this,
&GUI_Multiplayer::openToolTip);
+ row->flagimg->eventToolTip += MyGUI::newDelegate(this,
&GUI_Multiplayer::openToolTip);
row->flagimg->setNeedToolTip(true);
row->flagimg->setVisible(false);
x -= 18;
row->statimg =
mpPanel->createWidget<MyGUI::StaticImage>("StaticImage", x, y, 16, 16,
MyGUI::Align::Default, "Main");
row->statimg->setUserString("tooltip", "user authentication
level");
- row->statimg->eventToolTip = MyGUI::newDelegate(this,
&GUI_Multiplayer::openToolTip);
+ row->statimg->eventToolTip += MyGUI::newDelegate(this,
&GUI_Multiplayer::openToolTip);
row->statimg->setNeedToolTip(true);
row->statimg->setVisible(false);
x -= 18;
row->userTruckOKImg =
mpPanel->createWidget<MyGUI::StaticImage>("StaticImage", x, y, 16, 16,
MyGUI::Align::Default, "Main");
row->userTruckOKImg->setUserString("tooltip", "truck loading
state");
- row->userTruckOKImg->eventToolTip = MyGUI::newDelegate(this,
&GUI_Multiplayer::openToolTip);
+ row->userTruckOKImg->eventToolTip += MyGUI::newDelegate(this,
&GUI_Multiplayer::openToolTip);
row->userTruckOKImg->setNeedToolTip(true);
row->userTruckOKImg->setVisible(false);
- row->userTruckOKImg->eventMouseButtonClick =
MyGUI::newDelegate(this, &GUI_Multiplayer::clickInfoIcon);
+ row->userTruckOKImg->eventMouseButtonClick +=
MyGUI::newDelegate(this, &GUI_Multiplayer::clickInfoIcon);
x -= 18;
row->userTruckOKRemoteImg =
mpPanel->createWidget<MyGUI::StaticImage>("StaticImage", x, y, 16, 16,
MyGUI::Align::Default, "Main");
row->userTruckOKRemoteImg->setUserString("tooltip", "remote
truck loading state");
- row->userTruckOKRemoteImg->eventToolTip =
MyGUI::newDelegate(this, &GUI_Multiplayer::openToolTip);
+ row->userTruckOKRemoteImg->eventToolTip +=
MyGUI::newDelegate(this, &GUI_Multiplayer::openToolTip);
row->userTruckOKRemoteImg->setNeedToolTip(true);
row->userTruckOKRemoteImg->setVisible(false);
- row->userTruckOKRemoteImg->eventMouseButtonClick =
MyGUI::newDelegate(this, &GUI_Multiplayer::clickInfoIcon);
+ row->userTruckOKRemoteImg->eventMouseButtonClick +=
MyGUI::newDelegate(this, &GUI_Multiplayer::clickInfoIcon);
x -= 18;
row->usergoimg =
mpPanel->createWidget<MyGUI::StaticImage>("StaticImage", x, y, 16, 16,
MyGUI::Align::Default, "Main");
row->usergoimg->setUserString("num",
StringConverter::toString(i));
row->usergoimg->setUserString("tooltip", "go to user");
row->usergoimg->setImageTexture("user_go.png");
- row->usergoimg->eventToolTip = MyGUI::newDelegate(this,
&GUI_Multiplayer::openToolTip);
+ row->usergoimg->eventToolTip += MyGUI::newDelegate(this,
&GUI_Multiplayer::openToolTip);
row->usergoimg->setNeedToolTip(true);
row->usergoimg->setVisible(false);
- row->usergoimg->eventMouseButtonClick =
MyGUI::newDelegate(this, &GUI_Multiplayer::clickUserGoIcon);
+ row->usergoimg->eventMouseButtonClick +=
MyGUI::newDelegate(this, &GUI_Multiplayer::clickUserGoIcon);
/*
img =
MyGUI::Gui::getInstance().createWidget<MyGUI::StaticImage>("StaticImage", x-36,
y, 16, 16, MyGUI::Align::Default, "Overlapped");
img->setImageTexture("information.png");
- img->eventMouseButtonClick = MyGUI::newDelegate(this,
&GUI_Multiplayer::clickInfoIcon);
- img->eventToolTip = MyGUI::newDelegate(this,
&GUI_Multiplayer::openToolTip);
+ img->eventMouseButtonClick += MyGUI::newDelegate(this,
&GUI_Multiplayer::clickInfoIcon);
+ img->eventToolTip += MyGUI::newDelegate(this,
&GUI_Multiplayer::openToolTip);
img->setNeedToolTip(true);
img->setUserString("info", StringConverter::toString(i));
img->setUserString("tooltip", "information about the user");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel