Jump to content

Search the Community

Showing results for tags 'WidgetSprite'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 5 results

  1. When a WidgetSprite is rotated which has its size set manually by using setWidth() and setHeight() it gives unexpected result. If the size is set to (0, 0) then the rotation works as expected. Below is the sample code: WidgetSprite sprite; int init() { Gui gui = engine.getGui(); sprite = new WidgetSprite(gui,"samples/widgets/textures/background.png"); sprite.setPosition(400, 300); // Uncomment to see the problem. //sprite.setWidth(128); //sprite.setHeight(128); gui.addChild(sprite, GUI_ALIGN_OVERLAP); return 1; } float fAngle = 1.0f; int update() { sprite.setTransform(rotateZ(fAngle)); fAngle += 0.1; return 1; } int shutdown() { delete sprite; return 1; }
  2. Hello. I have two ObjectGui on the scene. Both of them have WidgetSprite with callbacks: GUI_ENTER, GUI_LEAVE, GUI_PRESSED and GUI_RELEASED. So the problem: callbacks are firing when they should not. Sometimes when i click on one sprite, i see click on both sprites. Sometimes i just click somewhere in the world and one of sprites become clicked too. It is clearly seen in attached simple demo. I expect sprites to work like independent buttons with 3 states (normal, mouse over, pressed). sprite_callbacks.rar
  3. Hi all. I have widgetSprite. I added the layer. Using WidgetSprite::setLayerTransform I rotate it. sprite_env_but.setLayerTransform(1, rotateZ(30.0f*sl_environment.getValue())); But it takes a pivot point in the upper left corner. How to rotate around its center? Thanks.
  4. Привет! Может кто создавал подобное. Я хочу в интерфейсе (загруженный через *.ui файл) создавать динамические GUI элементы. Пример: Есть диалоговое окно, на котором будет вопрос WidgetLabel, а ниже несколько вариантов ответов (WidgetButton или WidgetSprite) варианты с WidgetListBox и WidgetMenuBox не надо. Спасибо! ===================== translation from google ===================== Hello! Who can create similar. I want to interface (loaded via *. Ui file) to create dynamic GUI elements. Example: There is a dialog box that will question WidgetLabel, but below are a few answers (WidgetButton or WidgetSprite) options with WidgetListBox and WidgetMenuBox not. Thanks!
  5. Below is the code for repro: Gui gui; WidgetSprite sprite; Image img1; int init() { gui = engine.getGui(); sprite = new WidgetSprite( gui ); gui.addChild( sprite ); img1 = new Image( "sprite_00.png" ); sprite.setImage( img1 ); sprite.setImage( img1 ); // IMPORTANT: This line is no mistake. return 1; } int shutdown() { return 1; } int update() { return 1; } Start the app in DirectX 9 mode ( not sure about others ) and then change the resolution using Unigine system menu. Notice sprite's color change.
×
×
  • Create New...