Jump to content

Search the Community

Showing results for tags 'gui'.

  • 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...

  1. Custom effects on GUI

    Is it possible to use materials or particle effects or something like that on gui elements? For example, apply a material when an event occurs.
  2. Attach to HMD

    I'm attempting to simulate an AR monocle, in a VR environment. I understand that GUI cannot be rendered in VR normally, so I am using a world space ObjectGUI. The problem I am having is this: I can't seem to be able to get the ObjectGUI to stick to the user's field of view. I also need to render the GUI to only one eye, but I haven't looked into that yet. I've tried: • Setting the ObjectGUI as a child of the camera. • Moving the ObjectGUI to camera position on update, using a C# script: ui.WorldPosition = cam.WorldPosition + offset; • Moving the ObjectGUI to camera position, alternative method: camera.GetDirectionFromScreen(out var p0, out var p1, 0.5f, 0.5f, 16f / 9); var dir = (p1 - p0).Normalized; ui.WorldPosition = p0 + dir * distance; • There is mention of an "Attach to HMD" property, here: https://developer.unigine.com/en/docs/2.13/start/vr/?rlang=cpp&words=hmd#attach_to_hmd However, there is no such file in my project, and I couldn't find a way to get it. All my attempts ended up moving the ObjectGUI in front of the camera object before accounting for the HMD position (at the player's feet). I've read in the documentation that "camera is not a node". Does this mean I can't get the VR camera's transform information? Surely there must be a way. Any help would be appreciated.
  3. Gui vs GuiObject

    Hi, Using V2.12.0.2 C# Components i am not able to get the same results from GuiObject as from adding object to Gui.Get() What am i doing wrong? Clean test project is attached. PS: What where the 2 folders you needed to debug project? unigine_UI_Test_Project.zip
  4. Hi, I'm trying to create two-windowed application by using AppWall Plugin in c++ side. Both windows contain only GUI elements (i implement my methods in System logic). 1 - I get GuiPtr for each monitor. Interpreter *interpreter = (Interpreter*)Engine::get()->getSystemInterpreter(); Reflection PLUGIN_reflection(interpreter, Variable("engine.wall")); //make sure that you have AppWall loaded here Variable res = PLUGIN_reflection.callExternFunction("getGui", Variable(0), Variable(0)); gui_lecture = res.getGui(interpreter); res = PLUGIN_reflection.callExternFunction("getGui", Variable(1), Variable(0)); gui_editor = res.getGui(interpreter); 2 - I place widgets in appropriate GUI This GUI overlaps standard GUI elements, such as ESC-menu, mouse cursor, console, etc, so i can't act with it. What i'm doing wrong? Thank you.
  5. Hiding Nodes

    Hi, I would like to be able to set a node (and its childern ) visible/hide it with a click of a gui button (VR Tempalte, GuiSample). I have two buttons; one for hiding/one for setting it visible again: void GuiSample::icon_furniture_hide() { NodePtr node = Editor::get()->getNodeByName("furniture"); } void GuiSample::icon_furniture_show() { NodePtr node = Editor::get()->getNodeByName("furniture"); } Can I use the getNodeByName method here? Colud you please help me on finishing these methods? Thanks!
  6. setFontVSpacing & toolTip

    Я хочу увеличить высоту кнопок WidgetButton за счет добавления отступов сверху и снизу. Наиболее подходящим методом для меня показалась установка свойств setFontVSpacing и setFontVOffset. _btn->setFontVSpacing(10); _btn->setFontVOffset(5); В целом вид кнопки меня устраивает, но вот после установки setFontVSpacing, появляются проблемы с toolTip, рамки которого немного уезжают, что показано на изображение.
  7. 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
  8. Implementation NoesisGUI GUI sample

    Hi, At the last time I make a few tests about implementing NoesisGUI GUI framework into Unigine (just display layer and mouse movement and left button down). This is just prototype, needs refactoring (especially see header file) and maybe some optimize. It's not documented anywhere, so I would like to share with it: AppWorldLogic.h: #include <NoesisGUI.h> #include "D3D11RenderDevice.h" #include <windows.h> #define WIN32_LEAN_AND_MEAN #include <d3d11.h> #include <UnigineApp.h> #include <UnigineTextures.h> #include <UnigineGame.h> #include <UnigineMaterial.h> #include <UnigineMaterials.h> #include <UnigineLogic.h> #include "UnigineWidgets.h" #include "UnigineGui.h" #include "UnigineTextures.h" using namespace Noesis; using namespace Unigine; class AppWorldLogic : public Unigine::WorldLogic { public: Noesis::Core::Ptr<RenderDevice> device; Noesis::Core::Ptr<VGContext> context; ID3D11Device* pDevice; ID3D11DeviceContext* pContext; ID3D11RenderTargetView* pTexNoesisRTV; Noesis::IRenderer* renderer; ID3D11RenderTargetView* ppOldRtv = nullptr; ID3D11DepthStencilView* ppOldDsv = nullptr; Noesis::Core::Ptr<Noesis::IView> g_XamlView; Noesis::Core::Ptr<FrameworkElement> xaml; Unigine::TexturePtr pTexNoesisPtr; Game *game; WidgetSpritePtr hud; TexturePtr my_texture; WidgetLabelPtr widget_label; void createLabel(); void createHUDWidgetSprite(); int SetWidgetSpriteTexture(Unigine::WidgetSpritePtr sprite); bool is_click = false; AppWorldLogic(); virtual ~AppWorldLogic(); virtual int init(); virtual int update(); virtual int render(); virtual int flush(); virtual int shutdown(); virtual int destroy(); virtual int save(const Unigine::StreamPtr &stream); virtual int restore(const Unigine::StreamPtr &stream); }; AppWorldLogic.cpp: #include <NoesisGUI.h> #include "D3D11RenderDevice.h" #include "AppWorldLogic.h" #include <UnigineApp.h> #include <UnigineTextures.h> #include <UnigineGame.h> #include <UnigineMaterial.h> #include <UnigineMaterials.h> using namespace Noesis; // Error handler are invoked for fatal errors. You must never return from here void NoesisErrorHandler(const NsChar* filename, NsSize line, const NsChar* desc, NsBool fatal) { Log::message("Blad noesis %s \n", desc); } int AppWorldLogic::init() { // Write here code to be called on world initialization: initialize resources for your world scene during the world start. Noesis::GUI::Init(NoesisErrorHandler); Noesis::GUI::SetResourceProvider("."); xaml = Noesis::GUI::LoadXaml<FrameworkElement>("PasswordBox.xaml"); g_XamlView = Noesis::GUI::CreateView(xaml.GetPtr()); g_XamlView->SetSize(1600, 900); g_XamlView->SetAntialiasingMode(Noesis::Gui::AntialiasingMode_MSAA); game = Game::get(); Materials *materials = Materials::get(); MaterialPtr m = materials->findMaterial("noesis_mat"); int num = m->findTexture("albedo"); pDevice = static_cast<ID3D11Device*>(Unigine::App::get()->getD3D11Device()); pContext = nullptr; pDevice->GetImmediateContext(&pContext); // Initializes renderer. This could be done in a render thread device = *new Noesis::Render::D3D11RenderDevice(pContext); context = Noesis::GUI::CreateVGContext(device.GetPtr(), Noesis::VGOptions()); g_XamlView->GetRenderer()->Init(context.GetPtr()); renderer = g_XamlView->GetRenderer(); pTexNoesisPtr = Unigine::Texture::create(); pTexNoesisPtr->create2D(1600, 900, Unigine::Texture::FORMAT_RGBA8, Unigine::Texture::USAGE_RENDER); createHUDWidgetSprite(); createLabel(); SetWidgetSpriteTexture(hud); return 1; } void AppWorldLogic::createLabel() { GuiPtr gui = Unigine::Gui::get(); widget_label = WidgetLabel::create(gui, "Label text"); widget_label->setToolTip("This is a label"); widget_label->arrange(); widget_label->setPosition(10, 10); gui->addChild(widget_label->getWidget(), Unigine::Gui::ALIGN_OVERLAP | Unigine::Gui::ALIGN_FIXED); } int AppWorldLogic::SetWidgetSpriteTexture(Unigine::WidgetSpritePtr sprite) { my_texture = Unigine::Texture::create(); const int width = int(800); const int height = int(600); int flags = Unigine::Texture::FILTER_LINEAR | Unigine::Texture::USAGE_RENDER; my_texture->create2D(width, height, Unigine::Texture::FORMAT_RGBA8, flags); sprite->setRender(pTexNoesisPtr); return 1; } void AppWorldLogic::createHUDWidgetSprite() { GuiPtr gui = Unigine::Gui::get(); hud = WidgetSprite::create(gui); hud->setPosition(0, 0); hud->setWidth(1600); hud->setHeight(900); hud->setLayerBlendFunc(0, Unigine::Gui::BLEND_ONE, Unigine::Gui::BLEND_ONE_MINUS_SRC_ALPHA); gui->addChild(hud->getWidget(), Unigine::Gui::ALIGN_OVERLAP); } // start of the main loop int AppWorldLogic::update() { // Write here code to be called before updating each render frame: specify all graphics-related functions you want to be called every frame while your application executes. int mouseX = App::get()->getMouseX(); int mouseY = App::get()->getMouseY(); g_XamlView->MouseMove(mouseX, mouseY); if (App::get()->getMouseButtonState(App::BUTTON_LEFT)) { if (!is_click) { g_XamlView->MouseButtonDown(mouseX, mouseY, MouseButton_Left); } } ControlsPtr controls = Game::get()->getPlayer()->getControls(); return 1; } int AppWorldLogic::render() { // The engine calls this function before rendering each render frame: correct behavior after the state of the node has been updated. float ifps = game->getIFps(); if (pContext != nullptr) { ppOldRtv = nullptr; ppOldDsv = nullptr; pContext->OMGetRenderTargets(1, &ppOldRtv, &ppOldDsv); ID3D11RenderTargetView* pTexNoesisRTV = static_cast<ID3D11RenderTargetView*>(pTexNoesisPtr->getD3D11RenderTargetView()); pContext->OMSetRenderTargets(1, &pTexNoesisRTV, nullptr); // Updates view passing global time g_XamlView->Update(ifps); // Performs rendering operations. Note that the renderer associated to a view is intended // to be used in the render thread. In this simple application it is the main thread renderer = g_XamlView->GetRenderer(); // Applies changes to the render tree renderer->UpdateRenderTree(); // Renders offscreen textures. This step must be done before binding the main render target if (renderer->NeedsOffscreen()) { renderer->RenderOffscreen(); } renderer->Render(); pContext->OMSetRenderTargets(1, &ppOldRtv, ppOldDsv); } return 1; } Also you will need for e.g. D3D11RenderDevice.h and D3D11RenderDevice.cpp files that come with NoesisGUI (I can't share it here because of license agreement). For work it needs an object with "noesis_mat" material at scene. Also it needs PasswordBox.xaml file from sample delivered with NoesisGUI in data folder. It will display a Noesis GUI at the screen /xor at object in scene.
  9. Implementation CoherentGT GUI sample

    Hi, At the last time I make a few tests about implementing Coherent GT GUI framework into Unigine (just display layer). This is just prototype, needs refactoring (especially see header file) and maybe some optimize. It's not documented anywhere, so I would like to share with it: AppWorldLogic.h: #include <RenoirBackends/dx11backend/Dx11Backend.h> #include "ResourceFileHandler.h" #include <Coherent/UIGT/UISystem.h> #include <Coherent/UIGT/View.h> #include <Coherent/UIGT/IDiskCache.h> #include <Coherent/UIGT/ResourceHandler.h> #include <Coherent/UIGT/LicenseGT.h> #include <Coherent/UIGT/UISystemListener.h> #include <Coherent/UIGT/ViewInfo.h> #include <UnigineLogic.h> #include <UnigineStreams.h> #include "UnigineEngine.h" #include "UnigineGui.h" #include "UnigineWidgets.h" #include "UnigineEditor.h" #include "UnigineTextures.h" #include "UnigineApp.h" #include "UnigineMaterials.h" #include <windows.h> #if !defined(WIN32_LEAN_AND_MEAN) #define WIN32_LEAN_AND_MEAN #endif #if !defined(NOMINMAX) #define NOMINMAX #endif #if defined(COHERENT_PLATFORM_DURANGO) #include <d3d11_x.h> #else #include <d3d11.h> #endif #include <d3d11_1.h> #include "RenoirBackends/Common/Types.h" #include "RenoirBackends/Common/ComHelpers.h" #include <cassert> #if defined(COHERENT_SUPPORT_VS2013) #ifdef COHERENT_EXPORT #define COHERENT_RENDERERBACKEND_API __declspec(dllexport) #else #define COHERENT_RENDERERBACKEND_API __declspec(dllimport) #endif #endif using namespace Unigine; class AppWorldLogic : public Unigine::WorldLogic { int createdHUD = false; Coherent::UIGT::UISystem* system; Coherent::UIGT::View* view; Coherent::UIGT::ViewRenderer* viewRenderer; Coherent::UIGT::UISystemRenderer* systemRenderer; Coherent::UIGT::NativeRenderTarget rt; FileResourceHandler fileHandler; ID3D11Device* device; renoir::Dx11Backend* backend; WidgetSpritePtr hud; Engine* engine; Editor* editor; WidgetLabelPtr widget_label; TexturePtr my_texture; TexturePtr my_texture_ds; ID3D11DepthStencilView* DSV; ID3D11RenderTargetView* TextureRTV; NodePtr cube; public: AppWorldLogic(); virtual ~AppWorldLogic(); virtual int init(); virtual int update(); virtual int render(); virtual int flush(); virtual int shutdown(); virtual int destroy(); virtual int save(const Unigine::StreamPtr &stream); virtual int restore(const Unigine::StreamPtr &stream); void createHUDWidgetSprite(); void createLabel(); void createDSTexture(); int SetWidgetSpriteTexture(Unigine::WidgetSpritePtr sprite); }; AppWorldLogic.cpp: void AppWorldLogic::createHUDWidgetSprite() { GuiPtr gui = Gui::get(); hud = WidgetSprite::create(gui); hud->setPosition(0, 0); hud->setWidth(1600); hud->setHeight(900); hud->setLayerBlendFunc(0, Gui::BLEND_ONE, Gui::BLEND_ONE_MINUS_SRC_ALPHA); gui->addChild(hud->getWidget(), Gui::ALIGN_OVERLAP); } void AppWorldLogic::createLabel() { // getting a pointer to the system GUI GuiPtr gui = Gui::get(); // creating a label widget and setting up its caption widget_label = WidgetLabel::create(gui, "Label text"); // setting a tooltip widget_label->setToolTip("This is a label"); // rearranging label size widget_label->arrange(); // setting label position widget_label->setPosition(10, 10); // adding created label widget to the system GUI gui->addChild(widget_label->getWidget(), Gui::ALIGN_OVERLAP | Gui::ALIGN_FIXED); } void AppWorldLogic::createDSTexture() { my_texture_ds = Texture::create(); const int width = int(view->GetWidth()); const int height = int(view->GetHeight()); int flags = Unigine::Texture::FILTER_LINEAR | Unigine::Texture::USAGE_RENDER; my_texture_ds->create2D(width, height, Unigine::Texture::FORMAT_RGBA8, flags); } int AppWorldLogic::SetWidgetSpriteTexture(Unigine::WidgetSpritePtr sprite) { my_texture = Texture::create(); const int width = int(view->GetWidth()); const int height = int(view->GetHeight()); int flags = Unigine::Texture::FILTER_LINEAR | Unigine::Texture::USAGE_RENDER; my_texture->create2D(width, height, Unigine::Texture::FORMAT_RGBA8, flags); sprite->setRender(my_texture); return 1; } int AppWorldLogic::init() { // Write here code to be called on world initialization: initialize resources for your world scene during the world start. /// Configure the System settings in a Coherent::UIGT::SystemSettings variable. /// Only set a debugger port for debugging purposes everything else is /// by default. //! [System] Coherent::UIGT::SystemSettings settings; settings.DebuggerPort = 19999; system = InitializeUIGTSystem(COHERENT_UI_GT_LICENSE, settings, Coherent::LoggingGT::Info); //! [System] /// Configure the View settings in a Coherent::UIGT::ViewInfo variable. /// Create the FileResourceHandler if you want to work with "coui" resources. /// Set the full path to the html document you want to load. /// Create the View using the System->CreateView. //! [View] const char* resourcePath = "coui://uiresources/minRes/MainUI.html"; Coherent::UIGT::ViewInfo info; info.Width = 1600; info.Height = 900; info.IsTransparent = true; info.ResourceHandlerInstance = &fileHandler; /// Required for resources loaded via the coui:// protocol to work view = system->CreateView(info, resourcePath); //! [View] createHUDWidgetSprite(); createLabel(); SetWidgetSpriteTexture(hud); createDSTexture(); /// Create and initialize the rendering backend for DirectX11 /// You can use your own backend if it inherits from the RendererBackend interface. ////! [Backend] device = static_cast<ID3D11Device*>(Unigine::App::get()->getD3D11Device()); backend = new renoir::Dx11Backend(device, false); backend->InitializeStaticResources(); ////! [Backend] /// Create the System Renderer using the system->CreateRenderer method and the backend. //! [SystemRenderer] systemRenderer = system->CreateRenderer(backend, backend); //! [SystemRenderer] ///// Create the View Renderer using the systemRenderer->CreateViewRenderer method and ///// the textures from the DirectX initialization. ////! [ViewRenderer] DSV = static_cast<ID3D11DepthStencilView*>(my_texture->getD3D11DepthStencilView()); TextureRTV = static_cast<ID3D11RenderTargetView*>(my_texture->getD3D11RenderTargetView()); rt.Texture = TextureRTV; rt.DepthStencilTexture = DSV; viewRenderer = systemRenderer->CreateViewRenderer(view, rt, view->GetWidth(), view->GetHeight(), 1); ////! [ViewRenderer] Materials *materials = Materials::get(); MaterialPtr m = materials->findMaterial("mesh_base"); int num = m->findTexture("albedo"); m->setTexture(num, my_texture); return 1; } // start of the main loop int AppWorldLogic::update() { // Write here code to be called before updating each render frame: specify all graphics-related functions you want to be called every frame while your application executes. ////! [Loop] ///// Advances the timers of the UI. Should be called each frame. system->Advance(); ///// Layouts the content of the page. You should call this method each frame ///// after calling Advance on the UI system unsigned frameId = view->Layout(); ///// Paints the View in the user supplied texture when using hardware ///// rendering. viewRenderer->Paint(frameId); return 1; } int AppWorldLogic::render() { // The engine calls this function before rendering each render frame: correct behavior after the state of the node has been updated. return 1; } int AppWorldLogic::flush() { // Write here code to be called before updating each physics frame: control physics in your application and put non-rendering calculations. // The engine calls flush() with the fixed rate (60 times per second by default) regardless of the FPS value. // WARNING: do not create, delete or change transformations of nodes here, because rendering is already in progress. return 1; } // end of the main loop int AppWorldLogic::shutdown() { // Write here code to be called on world shutdown: delete resources that were created during world script execution to avoid memory leaks. return 1; } int AppWorldLogic::destroy() { // Write here code to be called when the video mode is changed or the application is restarted (i.e. video_restart is called). It is used to reinitialize the graphics context. ///// The order of resource destruction is really important! ////! [Destruction] viewRenderer->Destroy(); viewRenderer = nullptr; view->Destroy(); view = nullptr; systemRenderer->Destroy(); systemRenderer = nullptr; system->Uninitialize(); system = nullptr; ////! [Destruction] return 1; } Also you will need a ResourceFileHandler.h file that come and for e.g. dx11backend project from CoherentGT (I can't share it here because of license agreement). For work it needs an object witrh "mesh_base" material at scene. Also it needs minRes files from sample delivered with CoherentGT in data folder. It will display a Coherent GUI at the screen and at object in scene.
  10. Hi all, I removed a post earlier, looking for help with GUI WidgetSpriteVideo GUIobjects, but I've since been experimenting and found it's not quite what i'm looking for. I have been following the WidgetSpriteVideo documentation page in C#, however i can't seem to wrap my head around applying shaders other than to world space objects. I've realized i need to use a screen space Gui object rather than world space. The application is to render a webcam view in over the top of Unigine(in Vr so i will need to separate the two cameras per eye for depth) and use a green screen to mask out areas of the webcam to allow the digital scene to come through( IE the user can see their hands in front of them, with Unigine in the background.) My main requirements are: 1. Bring in the video feed from the camera (in OGV format) and stream it to the GUI. 2. Use a chroma-key/shader to mask off and create transparency in the webcam feed. 3. Do this for two separate cameras and have them render to each eye individually.(or technically hide each one from their opposing eye) If anyone can point me towards the documentation to assist with this, or other references or libraries and plugins, I would be very appreciative.
  11. Hi, I am trying to use a WidgetSpriteViewport, but I am finding the results to be very abnormal. WidgetSpriteViewport's camera are using main camera's Modelview and .Projection function . But I have found it's different effect that in different position and functions ,as show blow: First, put it in front of the .update() function ,the result is object is shaking .Please see the file name is First . Second ,put it in end of the .update() function ,the result is object is shaking a little bit and it seems like lost material .Please see the file name is second . As mentioned above ,the situation happened that only use mat4 to change position ,and the object speed very fast (test is 1000 Meters per second).however it is not happen at lower speed . The main camera works fine, but when I set it to the WidgetSpriteViewport, it becomes very abnormal . The camera's position and look direction is changing every update. Thanks
  12. Hi all, After moving to new Ungine 2.2, I've realized Ungine fails at initialization trying to load gui resources in a folder different from core (by specifying <item name="gui_path" type="string">my_app/gui/</item> in config file) if these resources are packed in a .ung file. I've checked the .ung file by extracting the content and verifying the files are present and without any case variation in their names (they have exactly the same name as Unigine expects). In fact if the files are not archived the engine starts as expected.
  13. Hi. We are working on Unigine 2.1.1 start version now. We are working GUI Process on only c++. (Not Use Unigine Script) Which headerfile defines WidgetSpriteVideo and WidgetSpriteNode class? please help!!!!!
  14. Hi, I'm trying to use WidgetSpriteVideo to display video on in-game screen models and it works pretty fine. However, I can't have the video cropped properly. As I show on my screenshot, I'd like the right part of the video not being displayed. I've made some research, found this topic and tried to do the same. Here is the code in which I try to create my WidgetSpriteVideo and attach it to my GuiObject: // gui: Gui of my ObjectGui WidgetHBox container = new WidgetHBox(gui); container.setStencil(1); WidgetSpriteVideo videoSprite = new WidgetSpriteVideo(gui, "MyVideo.ogv", 0); videoSprite.setFlags(GUI_ALIGN_OVERLAP); container.addChild(videoSprite); gui.addChild(container); What am I missing? Thanks, Alexandre.
  15. Hello, I am trying replicate some of the behavior from the gui_06 sample to attach a GuiObject to a node in the world. I have everything in my script set up exactly the same as the example script (including importing and referencing the same material library as the script), but for some reason the label isn't showing up in the main world. Object obj = our_custom_class.rootObject; ObjectGui dragHandle = add_editor(new ObjectGui(2.0f, 2.0f)); dragHandle.setWorldTransform(obj.getTransform()); dragHandle.setBillboard(1); dragHandle.setBackground(0); dragHandle.setMaterial("objects_gui", "*"); // Imported from the sample material library dragHandle.setProperty("surface_base", "*"); dragHandle.setScreenSize(96, 96); Gui gui = dragHandle.getGui(); WidgetLabel label = new WidgetLabel(gui, "Some example text"); label.setFontSize(48); gui.addChild(label); obj.addWorldChild(dragHandle); Thoughts on why my label isn't showing up? Thank you, Andrew
  16. [SOLVED] image scale in tag text

    Hi all, my question is about how image scale should be defined in rich text tag. I've tried different versions of the same definition in my .ui file but it always fails as unknown image option. Here is my last code. <?xml version="1.0" encoding="utf-8"?> <ui version="1.0"> <window name="rpci_wnd" export="1" height="539"> <hbox align="expand" background="1"> <label align="expand" width="579"> <text rich="1"> <image src="gui/gui_white.png" scale=%40 color="#00ff00"/>FS4<right/>This is right aligned text</text> </label> </hbox> </window> </ui> Thanks in advance.
  17. Roadmap for the UI

    I'm curious as to what the longterm roadmap looks like for the GUI system in Unigine. With the advent of some competitors (Unity) integrating a UI editor directly into the engine, it raises questions about the feasibility of doing the something similar with Unigine. Especially since dropping support for Qt but retaining the UI file format. Is this something that's been discussed internally?
  18. I'm developing an application with mfc in windows. My application has its own gui. if I don't want the unigine gui to display or create, what should I do?
  19. [SOLVED] Extending the Editor Panel

    The plugin sample explains pretty clearly how to add new UIs via the plugin tab in the Tools menu, but is there a way I can launch my plugin from the editor toolbar panel without modifying the source code?
  20. Hi everyone, I'm having quite a problem with the integration of Noesis Gui, a UI framework. Here is how it works in a DirectX11 application (it's very similar in OpenGL): Initialize the NoesisGui object and update it each frame (no problem with that) At render time:Set the RenderTargetView Pass a draw call to the NoesisGui object The NoesisGui framework will then render on top of the RenderTargetView, which can be the backbuffer (for HUD elements) or another texture. It is especially usefull to draw UI in 3D scene (in a Unigine::ObjectGui fashion): the texture can be used as ShaderResourceView to texture a mesh. My problem is that I cannot find a correct way to pass that ShaderResourceView to Unigine in order to use it in a 3D scene. I've found this post, showing the integration of Coherent UI but what it does is copying the UI element texture twice so that it can be used as Unigine::Image2D by the engine. That seems dramatically sub-optimal to me and I was hoping I overlooked some part of the documentation that would prevent such manipulation. Is there a better way to perform what I'm trying to achieve? Thanks,
  21. We've just finished evaluating the Coherent UI system using a Unigine plugin supplied by Coherent themselves. Unfortunately the performance of the system is sub-par. Simply loading any page (without displaying it) makes the entire renderer process erratic and if you are then using getImage() / setImageTextureImage() to display the rendered HTML on an object then the framerate of the entire simulation drops to 30 FPS with just a single rotating cube on screen. However we do really like the system, and would like to use it in future titles. What are the chances of Unigine embracing CoherentUI and creating a high-performance plugin?
  22. Adobe Flash replacement?

    We are using Flash for HUDs as it allows an artist with familiar tools to create great looking overlays for the screen. I see from https://developer.unigine.com/en/docs/1.0/scripting/library/gui/class.widgetflash that Flash is no longer under development. Will the current version continue to be supported or is there an alternative (SVG? HTML5 + JS?) in the works?
  23. [SOLVED] WidgetSpriteViewport in AppWall

    Hi, I'm trying to use a WidgetSpriteViewport in a appWall gui unsuccessfully. If you use it at the engine.gui it works properly but in a wall gui it not appears. Recently I've modified the appWall to avoid crashes using WidgetSprites at the walls gui. The WidgetSprites works properly but the WidgetSpriteViewports don't appears. I must to do something special or WidgetSpriteViewport are not permitted in a wall guis. Thanks Jose
  24. I start a thread called "mainloop", as below. I expect it to rewind the video after 5 seconds. Instead the video skips back to the start for a single frame then carries on. void mainloop() { Gui gui; WidgetSpriteVideo bgvid; AmbientSource bgvidsound; gui = engine.getGui(); bgvid = new WidgetSpriteVideo(gui,"data/mupK/mov1.ogv", 0); bgvidsound = new AmbientSource("data/mupK/mov1.ogv", 0); bgvid.setAmbientSource(bgvidsound); gui.addChild(bgvid, GUI_ALIGN_BACKGROUND); while(1) { bgvid.stop(); bgvidsound.stop(); bgvid.setVideoTime(1.0f); bgvidsound.setTime(1.0f); bgvidsound.play(); bgvid.play(); sleep(5.0f); } }
×
×
  • Create New...