etc
This commit is contained in:
@@ -142,10 +142,7 @@ namespace JUI {
|
||||
void AnchorPoint(const Vector2 &point);
|
||||
|
||||
///
|
||||
Tween* TweenAnchorPoint(const Vector2& goal, TweenInfo info = {})
|
||||
{
|
||||
|
||||
}
|
||||
Tween* TweenAnchorPoint(const Vector2& goal, TweenInfo info = {});
|
||||
|
||||
#pragma region Padding
|
||||
/// Returns the padding factor on the left of this widget.
|
||||
|
@@ -40,14 +40,17 @@ namespace JUI {
|
||||
|
||||
void MoveCursorRight();
|
||||
|
||||
unsigned int CursorMaxPosition() const;
|
||||
/// Returns the maximum position of the cursor, which is determined by the input buffer's length.
|
||||
[[nodiscard]] unsigned int CursorMaxPosition() const;
|
||||
|
||||
void SetCursorPosition(unsigned int pos);
|
||||
|
||||
/// Fires the input event, clears the input buffer, and sets the state to be ready for further input.
|
||||
void SendInput(bool clear_input);
|
||||
|
||||
/// Copy the contents of the input form, or the selection if active, into the the system's clipboard.
|
||||
void Copy();
|
||||
|
||||
/// Paste the contents of the system's clipboard
|
||||
void Paste();
|
||||
|
||||
void Cut();
|
||||
|
9
main.cpp
9
main.cpp
@@ -350,14 +350,7 @@ void inspect_widget(JUI::Widget* w, int depth = 1) {
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
for (float i = 0; i < 1; i += 0.01f)
|
||||
{
|
||||
std::cout << JUI::EasingFunctions::EaseInSine(i) << std::endl;
|
||||
}
|
||||
|
||||
int main() {
|
||||
using namespace ReWindow;
|
||||
// TODO: Find out new jlog api for silencing specific loggers.
|
||||
|
||||
|
@@ -584,4 +584,12 @@ Tween* Widget::TweenMarginBottom(const JUI::UDim& goal, JUI::TweenInfo info) {
|
||||
Tween* t = new Tween(updateTillGoalReached, info);
|
||||
tweens.push_back(t);
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
||||
Tween *Widget::TweenAnchorPoint(const Vector2 &goal, TweenInfo info) {
|
||||
Vector2 start = this->AnchorPoint();
|
||||
TweenTickFunc updateTillGoalReached = [this, start, goal] (float elapsed, float progress) mutable {
|
||||
Vector2 step = start.Lerp(goal, progress);
|
||||
AnchorPoint(start);
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user