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

Button improvements #60

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Button improvements #60

wants to merge 6 commits into from

Conversation

DezLife
Copy link
Contributor

@DezLife DezLife commented May 14, 2024

Added functionality for opening external links in the UI and implemented URL checks

  • Implemented the ability to open external URLs in the user interface via buttons.
    • This allows users to directly interact with and access external resources from within the application interface.
  • Added a check for URLs to ensure only links starting with http:// or https:// are opened.
    • This security measure prevents the potential opening of local files from the UI, enhancing the safety of the application.
  • Applied new styles to buttons, including color settings for different states (normal, highlighted, pressed) and smooth color transition.
    • Enhances user experience by providing visual feedback through color changes, reflecting the button's state.
  • Compatibility assurance with existing UI components.
    • These enhancements have been designed and tested to ensure that they integrate seamlessly without disrupting the existing UI components, maintaining the integrity and performance of the existing user interface.

Warning

I also suggest adding a confirmation dialog before navigating to external websites and a notification about the possibility that it might be a phishing site. These precautionary measures will provide additional protection to users and alert them to potential risks when navigating to external links. Similar warnings can also be implemented for the URL (server.url) button in the server window to ensure the security of using this feature.

the JSON representation

{
  "type":"UnityEngine.UI.Button",
  "url":"https://facepunch.com/",
  "normalColor": "1.0 1.0 1.0 1.0",
  "highlightColor": "1.0 1.0 1.0 1.0",
  "pressedColor": "0.78 0.78 0.78 1",
  "fadeDuration": 0.1,
},

Importance of These Innovations

  • Filling a Critical Need
    • The addition of external link capabilities directly addresses a significant gap in our UI that has been noted by both users and developers who create plugins. Providing a mechanism for safely opening external URLs from within the game's UI was a highly requested feature that enhances the utility and user experience.

Testing and Validation

  • Updated Test UI
    • A test UI has been updated to include and showcase the new changes, allowing for thorough testing and review before final integration.
    • This updated test environment is essential for verifying the functionality and usability of the new features, ensuring they meet our standards and user expectations before they are deployed to production.

Thanks @Kulltero for your help

DezLife added 3 commits May 14, 2024 15:38
Button improvements
Added url button
Rename handleColor to normalColor
@DezLife
Copy link
Contributor Author

DezLife commented May 15, 2024

@ElChupos

I kindly ask you to pay attention to this and give some kind of answer. It's really scary that for the most part it's abandoned. A lot of people are trying to contribute to this.

This is really useful functionality. The developer has to force users to copy the link from Input and then go to the browser. I don't think it will take much of your time to consider this.

@Mercury-devs
Copy link

Oh, yes!
I fully support this idea, it is a simple and extremely necessary solution for servers, administrators will thank you very much for this!

I hope this will appear in the near future!

@VooDooC
Copy link

VooDooC commented May 15, 2024

Its a good idea, i think it should have been done a long time ago

Fixed color
@ninco90
Copy link

ninco90 commented May 22, 2024

Please implement this. It will be great to take users to our Discord, statistics page, rules page, donation store, tutorials, social networks... And not have to pass the URLs through notes.

To add some security and prevent very long urls from being entered with certain content in base64 or similar, I would recommend limiting the maximum number of characters that can be used in the url. Maybe 150 characters.

@TurEduard
Copy link

@DezLife, @ninco90, @VooDooC, @Mercury-devs. Friends. For the developers to hear us and add this to the game, we need to draw more attention to this issue. Need more comments and likes. Let's invite friends, acquaintances, players who also support this idea and vote or comment on this pull

@DezLife
Copy link
Contributor Author

DezLife commented May 30, 2024

You could use a dialog box like the one in my screenshot to confirm the link. @ElChupos @Jake-Rich

@AlexTrooper
Copy link

Its really needed!

@cashr17
Copy link

cashr17 commented May 31, 2024

good idea,
Its really needed!

@devdaw6
Copy link

devdaw6 commented May 31, 2024

We have been waiting for this feature for a long time

@setfps
Copy link

setfps commented May 31, 2024

oh! Voldemar! Its a super - puper idea! we need this!

@DevS616
Copy link

DevS616 commented May 31, 2024

That's what's really missing! I really hope that the developers will implement it! ❤️

@lagzya-dev
Copy link

Let`s go!

@ItsTangerine
Copy link

Awesome idea, would be cool to have such function approved. ☝️

@kreker0001
Copy link

Good idea!

@PRESSFWD
Copy link

best idea

@codefling-0xf
Copy link

Definitely a necessary feature, it will contribute to a more pleasant user experience.

@greyghost1979
Copy link

best idea ever !!!

@monstr1k
Copy link

monstr1k commented Jun 1, 2024

That's really what's missing!

@mbedda
Copy link

mbedda commented Jun 1, 2024

Would be a great addition.

@megargan
Copy link

megargan commented Jun 5, 2024

This change will help many projects develop their community. Great change

@DezLife
Copy link
Contributor Author

DezLife commented Jul 7, 2024

@ElChupos @Jake-Rich ?

DezLife added 2 commits August 2, 2024 22:39

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added new time formats and support for custom formatting in Countdown
@YaMang0w0
Copy link

great add!

@DezLife
Copy link
Contributor Author

DezLife commented Oct 9, 2024

great add!

@ElChupos Said it wouldn't be done. We won't be able to follow the link from the game (

@YaMang0w0
Copy link

great add!

@ElChupos Said it wouldn't be done. We won't be able to follow the link from the game (

This is very sad news :(

@SturdyStubs
Copy link

Sad this won't be implemented, I think its crucial for communities to grow and CUI has been needing some love.

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.

None yet