Jump to content

Search the Community

Showing results for tags 'ui'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • Showcase
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 19 results

  1. Basic example UI component

    Hi, I have been working on C# component for UI. Just finished translating the Unigine::Widgets::Window example from Uniginescript to C# in the OpenGameMenu() function. So I thought to share my result and thought. The widget system has some good things to it and I easily see it becoming a great system. - I can’t wait to see wat I’m able to do with the floating UI’s (next step) That being said it needs some TLC. - More C# examples (in the documentation) and some corrections in the docs. - Alignment and overlapping could use a upgrade. - A actual component set or UI designer So here you are able to find my component GameUI.csv0.1 to get started quickly. Features - @ developers comments - It is able to add, remap default key and mouse bindings. - It handles the mouse state. - Able to close the app. - And gives an example of a lot of widgets, resizing, Widget Calllbacks. Known issues. - Not able to add checkbox to menubox PS: I’m a beginner so don’t take everything to seriously. And coding advise is welcome
  2. Garbage Collected Delegate

    Hi, We're getting an error on a garbage collected delegate in our UI. The UI is dynamically created by our UI manager on startup and we hold a copy of all the objects within the UI manager to stop them being garbage collected. In this case, it's on a WidgetSprite that we've added callbacks for mouse enter and leave and click to. If after about a minute, you move the mouse over the object, you will get the error: A callback was made on a garbage collected delegate of type 'UnigineSharp_double_x64!Unigine.Widget+Callback0::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called. As we are keeping copies of all of the objects, we should be keeping the objects alive and prevent them from being garbage collected. Is there something obvious we're doing wrong, or is there a recommended way of handling UI's within C#. Thanks, Robert
  3. Multiple visible ObjectGui click not received

    Hi, when multiple ObjectGui Objects are visible in my viewport the click event will not be executed anymore or very sporadic when I click on a widget which has a callback function. When only one ObjectGui is visible it works fine. Is this a bug or did I miss something. Thank you for your help. Sebastian
  4. 3D overlay render for UI controls

    Is it possible to create overlay render for object after scene been rendered? Not using depth test from previous geometry like on this image:
  5. [SOLVED] Widget: update sun position

    Hi, using the tutorials from the docs I have added a slider to the GuiSample in the VR Template. The tutorial goes on to adding a sun controlling method, but I cannot get it to work. I have added following code to the private section of GuiSample.h: WidgetSliderPtr slider; void slider_changed(); This to GuiSample::init in the GuiSample.cpp: slider = WidgetSlider::create(gui, 0, 360, 90); slider->setButtonHeight(200); slider->setPosition(250, 250); slider->setButtonWidth(200); gui->addChild(slider->getWidget(), Gui::ALIGN_OVERLAP); slider->setCallback0(Gui::CHANGED, MakeCallback(this, &GuiSample::slider_changed)); But have problems with the method changing the sun. void GuiSample::slider_changed() { ; } I tried following the tutorial, but the code crashes on the sun initialization everytime (last line), I get an exception // creating a world light and setting up its parameters thesun = LightWorld::create(Math::vec4(1.0f, 1.0f, 1.0f, 1.0f)); thesun->setName("Sun"); thesun->setDisableAngle(90.0f); thesun->setIntensity(1.0f); thesun->setScattering(LightWorld::SCATTERING_SUN); thesun->setWorldRotation(Math::quat(0.0f, 1.0f, 0.0f, 170.0f)); // passing node ownership to the editor thesun->release(); editor->addNode(thesun->getNode()); and I think that maybe this code just does not work with the component system. Could you please help me with the method changing sun position? And my second question: the slider appears and I can use it, but it is not active along its whole length - meaning, I can drag it only when I point to its right side. But when I drag it and let go, and want to manipulate it once again, lets say drag it back to its minimal position, it is active only on its left side ( so the slider moves, but the space where it can be grabbed seems to be constant; on the screenshots I have marked it with the mouse cursor). Last but not least: how can I change the size of the gui plane? Thanks!
  6. Create custom Widget element

    I have no idea, how to implement custom Widget element. In Qt i can do something like this: #include <QWidget> #include <QToolButton> #include <QLineEdit> #include <QSpacerItem> class CustomEditor : public QWidget { public: CustomEditor(QWidget *_parent = nullptr): QWidget(_parent) { m_btn = new QToolButton(this); m_btn->setText("Btn"); m_edit = new QLineEdit(this); QHBoxLayout *lt = new QHBoxLayout(this); setLayout(lt); lt->addWidget(m_edit); lt->addWidget(m_btn); } private: QToolButton *m_btn; QLineEdit *m_edit; }; And then use CustomEditor with layout manager or set for QTreeWidget, QTableWidget, QListWidget. But in Unigine i can't derive CustomEditor from Widget, in this case i must implement all of virtual functions. How i can implement complex ui element?
  7. UI infinite loop on incorrect input

    Hello, I wanted to replace a "Step" value in mesh clutter and press [backspace] twice to replace 50 by 1. The value temporarily displayed ".000" sending the program in an infinite loop. The program should probably ignore temporarily invalid values instead of crashing on me ;) Thanks, Stephane
  8. Real-Time Material/Mesh Swap

    Hi there, I'm wondering if there are any internal Unigine projects, or a scripting example that shows how you can enable real-time material or mesh swapping for an ArchViz scene, allowing users to change fabrics or pieces of furniture at runtime? Thanks!
  9. I've created a fully working UnigineScript plugin for Unigine and when I built it, I tested it against what I call the 'Editor SDK' which was through the Browser > Tools > Editor. Everything works in that particular binary. I've since given the plugin to another member of the team and when he runs it through his local project it crashes Unigine. I'm sure it has something to do with paths, but I don't understand the difference between how the file path works in the launchable editor vs. when you build a project. Furthermore, why are these treated differently?
  10. And you can lock the scale of one of the sides of the window, or change the size to the maximum value? For example in a chat in horizontal window does not change size, but on the vertical of the possible.
  11. I have a template interface elements (blank), I want to use it a few times <vbox name="canvas" export="1" /> <hbox name="blank" export="1"> <editline width="100"></editline> <button><text>OK</text></button> </hbox> WidgetVBox canvas; WidgetHBox blank; canvas.addChild( blank, GUI_ALIGN_EXPAND ); canvas.addChild( blank, GUI_ALIGN_EXPAND ); canvas.addChild( blank, GUI_ALIGN_EXPAND ); canvas.addChild( blank, GUI_ALIGN_EXPAND ); canvas.addChild( blank, GUI_ALIGN_EXPAND ); How to do it, tell me an option?
  12. [SOLVED] Widgets - .UI - background="0"

    Hey Unigine, if I'm adding Editlines or edittext into my GUI .H-File and want to remove the background with -> background="0" It doesn't work: <editline export="0" background="0" width="500">YourMessage</editline> If I export the Widget and call function .setBackground(0) it works. At all: I thought the -> background="0" command could be wrong but with a button it works with no problems: <button background="0" width="100"><text>Send</text></button> PS: I'm using latest SDK. Greetings Lars
  13. Здравствуйте. Не знаю баг это или нет, но работает как-то подозрительно. Например у нас есть интерфейс на котором десятки таких кнопок, и теперь если этот интерфейс перекрыть другим окном без подобных кнопок, информационное какое-нибудь, то при клике на это информационное окно (например для перетаскивания) все равно попадаем в интерфейс. Это отлично видно во вложенном видео на вашем же примере. ===================== translation from google ===================== Hello I do not know this is a bug or not, but it works somehow suspicious. For example we have an interface in which dozens of buttons, and now if the interface block another window without these buttons, some information, then when you click on this window (example for drag and drop) will still get into the interface. This is clearly seen in the attached video to your same example. Thank you. WidgetVBox.zip
  14. Hi. How do I file a interfeys.ui the call callback to set more than one parameter? Example: // inventory.ui <button> <text>Buy</text> <callback type="clicked" string="abc" string="50">Game::buy</callback> </button> // game.h void buy (string name, string cost) { // } Thank.
  15. Привет! Может кто создавал подобное. Я хочу в интерфейсе (загруженный через *.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!
  16. [SOLVED] Supports HTML?

    Здравствуйте! Если ли возможность работы с HTML тегами или может быть планируется этот функционал в будущем, для форматирования стиля текста и картинок в UI. Спасибо ===================== translation from google ===================== Hello! If you can work with HTML tags or can be scheduled in the future, this functional style to format the text and images in the UI. Thanks.
  17. Hi all, given the following ui file: <?xml version="1.0" encoding="utf-8"?> <ui version="1.0"> <vbox name="PlayModeUI::panel" export="1"> <sprite name="PlayModeUI::base_gauge" export="1" pos_x="72" pos_y="0" color="#ffffff" texture="navantia3d/gui/play_gauge_base.png" align="overlap,background,fixed"/> <icon pos_x="0" pos_y="55" texture="navantia3d/gui/play_shutdown_console.png" align="overlap"/> <icon pos_x="216" pos_y="13" texture="navantia3d/gui/play_field_1.png" align="overlap,background,fixed"/> <icon pos_x="216" pos_y="56" texture="navantia3d/gui/play_field_2.png" align="overlap,background,fixed"/> <icon pos_x="216" pos_y="97" texture="navantia3d/gui/play_field_3.png" align="overlap,background,fixed"/> <icon pos_x="216" pos_y="138" texture="navantia3d/gui/play_field_4.png" align="overlap,background,fixed"/> <hbox name="PlayModeUI::heading_panel" export="1" pos_x="255" pos_y="22" background="1"> <!-- if align="overlap" content isn't shown--> <sprite name="PlayModeUI::s80_top_mini" export="1" texture="navantia3d/gui/play_s80_top_mini.png" align="left"/> <label name="PlayModeUI::heading_value" export="1" align="center"> <text face="ae3d/fonts/tungab.ttf" size="14">-000</text> </label> <label name="PlayModeUI::heading_units" export="1" align="right"> <text face="ae3d/fonts/tungab.ttf" size="12">º</text> </label> </hbox> </vbox> </ui> and the the code to load it: /* */ void init(){ // Get the default GUI used by the engine. Gui gui = engine.getGui(); // Load all widgets from user interface file. ui = engine.gui.addUserInterface(gui,"navantia3d/gui/play.ui"); // Add the menu window to be rendered in the default GUI. Only root widgets // should be added (their children will automatically become visible). gui.addChild(panel,GUI_ALIGN_TOP | GUI_ALIGN_LEFT | GUI_ALIGN_OVERLAP); panel.arrange(); } If align="overlap" attribute is set to PlayModeUI::heading_panel:the result is: If I remove the attribute, thae panl shows its content (but in the wrong place obviously) Using UnigineScript I get the same result. Best regards, Iván.
  18. Hello Community, i have a little problem, the most is said in the topic-title, but here a little longer explanations: First i want to load a defined gui: engine.gui.addUserInterface ( engine.getGui(), "myGui.ui" ); After this, i do: Gui gui = engine.getGui(); Now my gui is visible. And now my problems begins: I have a Button called "Add a Tab", with this i want to change the myGui.ui, and add a new Tab dynamic to the .ui, of course i want to remove a tab again too, this needs to be dynamlicy, so i could add more then one tab, and remove more then one tab. The second thing is, when i added a dynamic tab, i want to input some buttons into the tab too. (Maybe this both things needs to be added together, i dont know?) I've searched the API and https://developer.unigine.com/docs but i didnt find anything. Is there any point to help me? Maybe someone have a example to me, how to do this? Greetings
  • Create New...