UX updates to make this all more bearable
This commit is contained in:
parent
921c07a3f8
commit
9152440420
7 changed files with 76 additions and 5 deletions
|
@ -92,6 +92,9 @@ all:
|
||||||
cp -vf ./bitmaps/side_surfspec.png ../build/bitmaps/side_surfspec.png
|
cp -vf ./bitmaps/side_surfspec.png ../build/bitmaps/side_surfspec.png
|
||||||
cp -vf ./bitmaps/side_tex.png ../build/bitmaps/side_tex.png
|
cp -vf ./bitmaps/side_tex.png ../build/bitmaps/side_tex.png
|
||||||
cp -vf ./bitmaps/side_vertices.xpm ../build/bitmaps/side_vertices.xpm
|
cp -vf ./bitmaps/side_vertices.xpm ../build/bitmaps/side_vertices.xpm
|
||||||
|
cp -vf ./bitmaps/side_selectface.png ../build/bitmaps/side_selectface.png
|
||||||
|
cp -vf ./bitmaps/side_selectwhole.png ../build/bitmaps/side_selectwhole.png
|
||||||
|
cp -vf ./bitmaps/side_resize.png ../build/bitmaps/side_resize.png
|
||||||
cp -vf ./bitmaps/splash.xcf ../build/bitmaps/splash.xcf
|
cp -vf ./bitmaps/splash.xcf ../build/bitmaps/splash.xcf
|
||||||
cp -vf ./bitmaps/splash.xpm ../build/bitmaps/splash.xpm
|
cp -vf ./bitmaps/splash.xpm ../build/bitmaps/splash.xpm
|
||||||
cp -vf ./bitmaps/texture_browser.xpm ../build/bitmaps/texture_browser.xpm
|
cp -vf ./bitmaps/texture_browser.xpm ../build/bitmaps/texture_browser.xpm
|
||||||
|
|
BIN
resources/bitmaps/side_resize.png
Normal file
BIN
resources/bitmaps/side_resize.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/bitmaps/side_selectface.png
Normal file
BIN
resources/bitmaps/side_selectface.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
resources/bitmaps/side_selectwhole.png
Normal file
BIN
resources/bitmaps/side_selectwhole.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
@ -1330,7 +1330,6 @@ void ToolChanged()
|
||||||
g_dragmode_button.update();
|
g_dragmode_button.update();
|
||||||
g_clipper_button.update();
|
g_clipper_button.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *const c_ResizeMode_status = "Drag Tool: move and resize objects";
|
const char *const c_ResizeMode_status = "Drag Tool: move and resize objects";
|
||||||
|
|
||||||
void DragMode()
|
void DragMode()
|
||||||
|
@ -1431,6 +1430,65 @@ void ClipperMode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int g_modifier_state;
|
||||||
|
|
||||||
|
void Modifier1Export(const Callback<void(bool)> &importCallback)
|
||||||
|
{
|
||||||
|
importCallback(g_modifier_state == 0);
|
||||||
|
}
|
||||||
|
void Modifier2Export(const Callback<void(bool)> &importCallback)
|
||||||
|
{
|
||||||
|
importCallback(g_modifier_state == 1);
|
||||||
|
}
|
||||||
|
void Modifier3Export(const Callback<void(bool)> &importCallback)
|
||||||
|
{
|
||||||
|
importCallback(g_modifier_state == 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
FreeCaller<void(const Callback<void(bool)> &), Modifier1Export> g_modifier1_button_caller;
|
||||||
|
Callback<void(const Callback<void(bool)> &)> g_modifier1_button_callback(g_modifier1_button_caller);
|
||||||
|
ToggleItem g_modifier1_button(g_modifier1_button_callback);
|
||||||
|
|
||||||
|
FreeCaller<void(const Callback<void(bool)> &), Modifier2Export> g_modifier2_button_caller;
|
||||||
|
Callback<void(const Callback<void(bool)> &)> g_modifier2_button_callback(g_modifier2_button_caller);
|
||||||
|
ToggleItem g_modifier2_button(g_modifier2_button_callback);
|
||||||
|
|
||||||
|
FreeCaller<void(const Callback<void(bool)> &), Modifier3Export> g_modifier3_button_caller;
|
||||||
|
Callback<void(const Callback<void(bool)> &)> g_modifier3_button_callback(g_modifier3_button_caller);
|
||||||
|
ToggleItem g_modifier3_button(g_modifier3_button_callback);
|
||||||
|
|
||||||
|
void ModifierChanged()
|
||||||
|
{
|
||||||
|
g_modifier1_button.update();
|
||||||
|
g_modifier2_button.update();
|
||||||
|
g_modifier3_button.update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Modifier1()
|
||||||
|
{
|
||||||
|
g_modifier_state = 0;
|
||||||
|
ModifierChanged();
|
||||||
|
ModeChangeNotify();
|
||||||
|
}
|
||||||
|
void Modifier2()
|
||||||
|
{
|
||||||
|
g_modifier_state = 1;
|
||||||
|
ModifierChanged();
|
||||||
|
ModeChangeNotify();
|
||||||
|
}
|
||||||
|
void Modifier3()
|
||||||
|
{
|
||||||
|
g_modifier_state = 3;
|
||||||
|
ModifierChanged();
|
||||||
|
ModeChangeNotify();
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
Get_Modifier_State(void)
|
||||||
|
{
|
||||||
|
return g_modifier_state;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Texdef_Rotate(float angle)
|
void Texdef_Rotate(float angle)
|
||||||
{
|
{
|
||||||
|
@ -2379,7 +2437,11 @@ ui::Toolbar create_main_sidebar()
|
||||||
toolbar.add(btn);
|
toolbar.add(btn);
|
||||||
};
|
};
|
||||||
|
|
||||||
toolbar_append_toggle_button(toolbar, "Resize (Q)", "side_select.png", "MouseDrag");
|
toolbar_append_toggle_button(toolbar, "Create", "side_select.png", "Modifier1");
|
||||||
|
toolbar_append_toggle_button(toolbar, "Select Face", "side_selectface.png", "Modifier3");
|
||||||
|
toolbar_append_toggle_button(toolbar, "Select-Whole", "side_selectwhole.png", "Modifier2");
|
||||||
|
space();
|
||||||
|
toolbar_append_toggle_button(toolbar, "Resize (Q)", "side_resize.png", "MouseDrag");
|
||||||
toolbar_append_toggle_button(toolbar, "Translate (W)", "side_move.png", "MouseTranslate");
|
toolbar_append_toggle_button(toolbar, "Translate (W)", "side_move.png", "MouseTranslate");
|
||||||
toolbar_append_toggle_button(toolbar, "Rotate (R)", "side_rotate.png", "MouseRotate");
|
toolbar_append_toggle_button(toolbar, "Rotate (R)", "side_rotate.png", "MouseRotate");
|
||||||
toolbar_append_toggle_button(toolbar, "Scale", "side_scale.png", "MouseScale");
|
toolbar_append_toggle_button(toolbar, "Scale", "side_scale.png", "MouseScale");
|
||||||
|
@ -3109,6 +3171,11 @@ void MainFrame_Construct()
|
||||||
GlobalToggles_insert("MouseDrag", makeCallbackF(DragMode), ToggleItem::AddCallbackCaller(g_dragmode_button),
|
GlobalToggles_insert("MouseDrag", makeCallbackF(DragMode), ToggleItem::AddCallbackCaller(g_dragmode_button),
|
||||||
Accelerator('Q'));
|
Accelerator('Q'));
|
||||||
|
|
||||||
|
|
||||||
|
GlobalToggles_insert("Modifier1", makeCallbackF(Modifier1), ToggleItem::AddCallbackCaller(g_modifier1_button));
|
||||||
|
GlobalToggles_insert("Modifier2", makeCallbackF(Modifier2), ToggleItem::AddCallbackCaller(g_modifier2_button));
|
||||||
|
GlobalToggles_insert("Modifier3", makeCallbackF(Modifier3), ToggleItem::AddCallbackCaller(g_modifier3_button));
|
||||||
|
|
||||||
GlobalCommands_insert("ColorSchemeWS", makeCallbackF(ColorScheme_WorldSpawn));
|
GlobalCommands_insert("ColorSchemeWS", makeCallbackF(ColorScheme_WorldSpawn));
|
||||||
GlobalCommands_insert("ColorSchemeOriginal", makeCallbackF(ColorScheme_Original));
|
GlobalCommands_insert("ColorSchemeOriginal", makeCallbackF(ColorScheme_Original));
|
||||||
GlobalCommands_insert("ColorSchemeQER", makeCallbackF(ColorScheme_QER));
|
GlobalCommands_insert("ColorSchemeQER", makeCallbackF(ColorScheme_QER));
|
||||||
|
|
|
@ -158,16 +158,17 @@ void GlobalWindowObservers_connectWidget(ui::Widget widget)
|
||||||
widget.connect("motion_notify_event", G_CALLBACK(modifiers_motion), &g_window_observers);
|
widget.connect("motion_notify_event", G_CALLBACK(modifiers_motion), &g_window_observers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Get_Modifier_State(void);
|
||||||
ModifierFlags modifiers_for_state(unsigned int state)
|
ModifierFlags modifiers_for_state(unsigned int state)
|
||||||
{
|
{
|
||||||
ModifierFlags modifiers = c_modifierNone;
|
ModifierFlags modifiers = c_modifierNone;
|
||||||
if (state & GDK_SHIFT_MASK) {
|
if (Get_Modifier_State() & 1) {
|
||||||
modifiers |= c_modifierShift;
|
modifiers |= c_modifierShift;
|
||||||
}
|
}
|
||||||
if (state & GDK_CONTROL_MASK) {
|
if (Get_Modifier_State() & 2) {
|
||||||
modifiers |= c_modifierControl;
|
modifiers |= c_modifierControl;
|
||||||
}
|
}
|
||||||
if (state & GDK_MOD1_MASK) {
|
if (Get_Modifier_State() & 4) {
|
||||||
modifiers |= c_modifierAlt;
|
modifiers |= c_modifierAlt;
|
||||||
}
|
}
|
||||||
return modifiers;
|
return modifiers;
|
||||||
|
|
Loading…
Reference in a new issue