1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Making Godot Easier to Use..

-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-Auto indenter in code editor, this makes it much easier to paste external code.
-Zoom in 2D viewport now uses the mouse pointer as reference.
-Obscure hack to see where code/line of GDScript in C++ backtrace.
-Fixed a bug where keys would get stuck on X11 if pressed simultaneously
-Added Api on IP singleton to request local IPs.
-Premultiplied alpha support when importing texture, editing PNGs and as a blend mode.
This commit is contained in:
Juan Linietsky
2014-05-24 01:35:47 -03:00
parent f9ff086235
commit 1cad087969
54 changed files with 928 additions and 106 deletions

View File

@@ -608,7 +608,14 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
if (b.button_index==BUTTON_WHEEL_DOWN) {
float prev_zoom=zoom;
zoom=zoom*0.95;
{
Point2 ofs(b.x,b.y);
ofs = ofs/prev_zoom - ofs/zoom;
h_scroll->set_val( h_scroll->get_val() + ofs.x );
v_scroll->set_val( v_scroll->get_val() + ofs.y );
}
_update_scroll(0);
viewport->update();
return;
@@ -616,7 +623,15 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
if (b.button_index==BUTTON_WHEEL_UP) {
float prev_zoom=zoom;
zoom=zoom*(1.0/0.95);
{
Point2 ofs(b.x,b.y);
ofs = ofs/prev_zoom - ofs/zoom;
h_scroll->set_val( h_scroll->get_val() + ofs.x );
v_scroll->set_val( v_scroll->get_val() + ofs.y );
}
_update_scroll(0);
viewport->update();
return;