Coder Social home page Coder Social logo

Comments (6)

TN-1 avatar TN-1 commented on May 27, 2024 1

1: Correct, It was. Strange though, Because this code was working before the update.
2: If I set the size in the constructor, everything goes back to normal.
3: Handy hint, Thanks!

from geonbit.ui.

RonenNess avatar RonenNess commented on May 27, 2024

Thank you for the report, I'll take a look at this when I can.

Hopefully its not another obvious error on my part :)

I think I wasn't clear last time, when I said it was a "design flaw", I meant there was a flaw in the way I implemented tabs, not in the way you used them. Your code was fine :)

from geonbit.ui.

RonenNess avatar RonenNess commented on May 27, 2024

Alright couple of things:

  1. I can't reproduce without IconI code, as it works with regular Icons. I suspect the problem is in IconI.
  2. Perhaps you set the Icon's size to 0,0 in which case it takes full size of parent? Please debug and validate this, see if the icon size property is 0,0.
  3. Instead of doing stuff like new Vector2(Convert.ToInt32(ScreenManager.ScreenArea.Width * .3), Convert.ToInt32(ScreenManager.ScreenArea.Height)), you can set size to new Vector2(0.3f, 0f) (size of 0 = full parent size, size between 0-1 = percent of parent).

Let me know if this was the problem.
Thanks

from geonbit.ui.

RonenNess avatar RonenNess commented on May 27, 2024

1: Correct, It was. Strange though, Because this code was working before the update.

Ah now I see what happened! In the last update I changed DefaultSize from being a getter to be a static property, which means in previous version it was inherited and now its not.

So in previous version when you created a class that inherit from Icon and didn't set size, it got the Icon's default size and all was well. Now it just gets 0, unless you define a static DefaultSize property in the inheriting class.

This is no good, its very confusing for people who want to create their own entities based on existing ones, like you did. I should fix it.

Thank you for the useful report, I will close this ticket when I push the fix. ๐Ÿ‘

from geonbit.ui.

TN-1 avatar TN-1 commented on May 27, 2024

Glad to be of assistance :)

from geonbit.ui.

RonenNess avatar RonenNess commented on May 27, 2024

Fixed in dev (will get in next version), thanks again for reporting! :)

from geonbit.ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.