// Work out the delta
Vector3 mid;
Select_GetMid(mid);
- Vector3 delta = vector3_subtracted(vector3_snapped(Camera_getOrigin(camwnd), GetGridSize()), mid);
+ Vector3 delta = vector3_subtracted(vector3_snapped(Camera_getOrigin(camwnd), GetSnapGridSize()), mid);
// Move to camera
GlobalSelectionSystem().translateSelected(delta);
{
// build the URL
StringOutputStream URL(256);
- URL << "http://www.qeradiant.com/index.php?data=dlupdate&query_dlup=1";
+ URL << "http://www.icculus.org/netradiant/?cmd=update&data=dlupdate&query_dlup=1";
#ifdef WIN32
URL << "&OS_dlup=1";
-#else
+#elif defined(__APPLE__)
URL << "&OS_dlup=2";
+#else
+ URL << "&OS_dlup=3";
#endif
URL << "&Version_dlup=" RADIANT_VERSION;
g_GamesDialog.AddPacksURL(URL);
void OpenBugReportURL()
{
- OpenURL("http://www.qeradiant.com/?data=bugreport");
+ OpenURL("http://www.icculus.org/netradiant/?cmd=bugs");
}
class CloneSelected : public scene::Graph::Walker
{
+ bool doMakeUnique;
public:
+ CloneSelected(bool d): doMakeUnique(d) { }
bool pre(const scene::Path& path, scene::Instance& instance) const
{
if(path.size() == 1)
&& selectable->isSelected())
{
NodeSmartReference clone(Node_Clone(path.top()));
- Map_gatherNamespaced(clone);
+ if(doMakeUnique)
+ Map_gatherNamespaced(clone);
Node_getTraversable(path.parent().get())->insert(clone);
}
}
}
};
-void Scene_Clone_Selected(scene::Graph& graph)
+void Scene_Clone_Selected(scene::Graph& graph, bool doMakeUnique)
{
- graph.traverse(CloneSelected());
+ graph.traverse(CloneSelected(doMakeUnique));
Map_mergeClonedNames();
}
{
UndoableCommand undo("cloneSelected");
- Scene_Clone_Selected(GlobalSceneGraph());
+ Scene_Clone_Selected(GlobalSceneGraph(), false);
+
+ //NudgeSelection(eNudgeRight, GetGridSize(), GlobalXYWnd_getCurrentViewType());
+ //NudgeSelection(eNudgeDown, GetGridSize(), GlobalXYWnd_getCurrentViewType());
+ }
+}
+
+void Selection_Clone_MakeUnique()
+{
+ if(GlobalSelectionSystem().Mode() == SelectionSystem::ePrimitive)
+ {
+ UndoableCommand undo("cloneSelectedMakeUnique");
+
+ Scene_Clone_Selected(GlobalSceneGraph(), true);
//NudgeSelection(eNudgeRight, GetGridSize(), GlobalXYWnd_getCurrentViewType());
//NudgeSelection(eNudgeDown, GetGridSize(), GlobalXYWnd_getCurrentViewType());
create_menu_item_with_mnemonic(menu, "P_aste To Camera", "PasteToCamera");
menu_separator(menu);
create_menu_item_with_mnemonic(menu, "_Duplicate", "CloneSelection");
+ create_menu_item_with_mnemonic(menu, "Duplicate, make uni_que", "CloneSelectionAndMakeUnique");
create_menu_item_with_mnemonic(menu, "D_elete", "DeleteSelection");
menu_separator(menu);
create_menu_item_with_mnemonic(menu, "Pa_rent", "ParentSelection");
{
StringOutputStream status(64);
const char* lock = (GridStatus_getTextureLockEnabled()) ? "ON" : "OFF";
- status << "G:" << GridStatus_getGridSize()
+ status << (GetSnapGridSize() > 0 ? "G:" : "g:") << GridStatus_getGridSize()
<< " R:" << GridStatus_getRotateIncrement()
<< " C:" << GridStatus_getFarClipDistance()
<< " L:" << lock;
namespace
{
- GLFont g_font(0, 0);
+ GLFont g_font(0, 0, 0, 0);
}
void GlobalGL_sharedContextCreated()
GlobalShaderCache().realise();
Textures_Realise();
-#if defined(WIN32)
+#ifdef WIN32
+ /* win32 is dodgy here, just use courier new then */
g_font = glfont_create("courier new 8");
-#elif defined(__linux__)
- g_font = glfont_create("fixed 8");
#else
- g_font = glfont_create("courier 8");
+ /* use default font here (Sans 10 is gtk default) */
+ GtkSettings *settings = gtk_settings_get_default();
+ gchar *fontname;
+ g_object_get(settings, "gtk-font-name", &fontname, NULL);
+ g_font = glfont_create(fontname);
#endif
+
GlobalOpenGL().m_font = g_font.getDisplayList();
GlobalOpenGL().m_fontHeight = g_font.getPixelHeight();
+ GlobalOpenGL().m_fontAscent = g_font.getPixelAscent();
+ GlobalOpenGL().m_fontDescent = g_font.getPixelDescent();
}
void GlobalGL_sharedContextDestroyed()
GlobalCommands_insert("Paste", FreeCaller<Paste>(), Accelerator('V', (GdkModifierType)GDK_CONTROL_MASK));
GlobalCommands_insert("PasteToCamera", FreeCaller<PasteToCamera>(), Accelerator('V', (GdkModifierType)GDK_MOD1_MASK));
GlobalCommands_insert("CloneSelection", FreeCaller<Selection_Clone>(), Accelerator(GDK_space));
+ GlobalCommands_insert("CloneSelectionAndMakeUnique", FreeCaller<Selection_Clone_MakeUnique>(), Accelerator(GDK_space, (GdkModifierType)GDK_SHIFT_MASK));
GlobalCommands_insert("DeleteSelection", FreeCaller<deleteSelection>(), Accelerator(GDK_BackSpace));
GlobalCommands_insert("ParentSelection", FreeCaller<Scene_parentSelected>());
GlobalCommands_insert("UnSelectSelection", FreeCaller<Selection_Deselect>(), Accelerator(GDK_Escape));