Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text_Ticker #293

Merged
merged 2 commits into from
Oct 24, 2024
Merged

Text_Ticker #293

merged 2 commits into from
Oct 24, 2024

Conversation

Protofunk
Copy link
Contributor

I have added a script that scrolls the text field when its contents are too wide for the available space.

Changes exist in LayerUI.prefab

I have added a script that scrolls the text field when its contents are too wide for the available space.
@bozmir
Copy link
Contributor

bozmir commented Oct 21, 2024

Even met Tom samen naar gekeken maar lijkt wel een beetje veel werk om dit goed mergebaar te krijgen. Misschien toch een frisse pull van main doen en even de prefab herstellen in nieuwe vorm

# Conflicts:
#	Assets/Prefabs/UI/Layers/LayerUI.prefab
@mvriel
Copy link
Contributor

mvriel commented Oct 22, 2024

Fixed it 😇

Copy link
Contributor

@bozmir bozmir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 verbeterpuntjes maar niet noodzakelijk

{
public class TextTicker : MonoBehaviour
{
public RectTransform childRect; // Assign the child RectTransform in the inspector
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moet deze public zijn en kan je niet private childrect gebruiken met een getcomponentinchildren, liefst zoveel mogelijk automatisch

public void OnWidthChange() // Call this method when a width change occurs
{
Invoke("UpdateWidths",0.1f);
Invoke("CheckAndStartScrolling",0.1f);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

je zou evt een timer method kunnen schrijven met coroutine om te voorkomen dat als method namen veranderen in de toekomst er geen literals zijn die vergeten worden, maar voor nu prima

@bozmir bozmir merged commit f89609a into main Oct 24, 2024
2 checks passed
@mvriel mvriel deleted the feature/textfieldticker branch October 24, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants