ui: panning in code view

* Implemented horizontal panning for code snippets by dragging the mouse left and right.
This commit is contained in:
malte_langkabel
2015-10-15 16:28:55 +02:00
parent e1683d047a
commit b0245f9d7b
4 changed files with 35 additions and 1 deletions
+5
View File
@@ -73,3 +73,8 @@ size_t utility::digits(size_t n)
return digits;
}
int utility::roundToInt(float n)
{
return (n > 0.0f) ? (n + 0.5f) : (n - 0.5f);
}
+2
View File
@@ -39,6 +39,8 @@ namespace utility
bool intersectionPoint(Vec2f a1, Vec2f b1, Vec2f a2, Vec2f b2, Vec2f* i);
size_t digits(size_t n);
int roundToInt(float n);
}
template<typename T>