Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Hexile

Pages: [1] 2
1
Help requests / Re: Converting TGUI 0.6 project to TGUI 0.8.5
« on: 16 September 2019, 00:26:27 »
not bind, but std::ref like mentioned in the 0.8 tutorials.

After poking cmake with a stick i could get the sln file and compile tgui from github. the errors have been sorted out. Though i think i misunderstood something as my application is crashing when setting up a "signal"

Code: [Select]
listBox->connect( "clicked", PlaylistClicked, std::ref( gui ), listBox->getSelectedItemIndex(), listBox->getSelectedItemId(), listBox->getSelectedItem() );
Code: [Select]
void PlaylistClicked( tgui::Gui& gui, int selectItem, sf::String str_ItemId, sf::String str_ItemText ) { std::cout << "Playlist Clicked\n"; }

2
Help requests / Re: Converting TGUI 0.6 project to TGUI 0.8.5
« on: 15 September 2019, 19:47:12 »
Instead of replacing the "= default" you could also try to remove the "TGUI_CONSTEXPR" from those lines.

No difference.

Quote
Maybe you should try reinstalling the compiler and maybe even visual studio? Having the compiler crash isn't normal.

Actually. i had accidentally changed something so only intellisense things would be shown and there was a path issue with the linker. Once resolved, the example compiled just fine.


So going back to my project, cleaning it and then trying to compile yielded some more errors:

Quote
use of undefined type 'tgui::internal_signal::func_traits<void,std::reference_wrapper<tgui::Gui>,void (__cdecl &)(tgui::Gui &,tgui::Knob::Ptr,tgui::Scrollbar::Ptr,tgui::Label::Ptr,int,bool),tgui::Knob::Ptr &,tgui::Scrollbar::Ptr &,tgui::Label::Ptr &,int,bool>'

'unsigned int tgui::Signal::connect(const tgui::Signal::DelegateEx &)': cannot convert argument 1 from 'std::_Binder<std::_Unforced,tgui::Signal &,_Ty,void (__cdecl &)(tgui::Gui &,tgui::Knob::Ptr,tgui::Scrollbar::Ptr,tgui::Label::Ptr,int,bool),tgui::Knob::Ptr &,tgui::Scrollbar::Ptr &,tgui::Label::Ptr &,int,bool>' to 'const tgui::Signal::Delegate &'
        with
        [
            _Ty=std::reference_wrapper<tgui::Gui>
        ]

'id': an object of const-qualified type must be initialized   SystemCrashMP   C:\Users\ExileFox\Documents\projects\Project1\TGUI-0.8.5\include\TGUI\SignalImpl.hpp

use of undefined type 'tgui::internal_signal::func_traits<void,std::reference_wrapper<tgui::Gui>,void (__cdecl &)(tgui::Gui &,tgui::Knob::Ptr,tgui::Scrollbar::Ptr,tgui::Label::Ptr,int,bool),tgui::Knob::Ptr &,tgui::Scrollbar::Ptr &,tgui::Label::Ptr &,unsigned int,bool>'

'unsigned int tgui::Signal::connect(const tgui::Signal::DelegateEx &)': cannot convert argument 1 from 'std::_Binder<std::_Unforced,tgui::Signal &,_Ty,void (__cdecl &)(tgui::Gui &,tgui::Knob::Ptr,tgui::Scrollbar::Ptr,tgui::Label::Ptr,int,bool),tgui::Knob::Ptr &,tgui::Scrollbar::Ptr &,tgui::Label::Ptr &,unsigned int,bool>' to 'const tgui::Signal::Delegate &'
        with
        [
            _Ty=std::reference_wrapper<tgui::Gui>
        ]

File: \TGUI-0.8.5\include\TGUI\SignalImpl.hpp Line: 347


I think i'll reinstall visual studio as a next step as this just seems like another red herring.

3
Help requests / Re: Converting TGUI 0.6 project to TGUI 0.8.5
« on: 15 September 2019, 17:50:02 »
i tried to compile this as a new project and i get the same issue;
https://tgui.eu/examples/0.8/many-different-widgets/

if i alter TGUI like you suggested, the compiler makes a silent crash while building and Visual Studio doesn't catch it  :(

4
Help requests / Re: Converting TGUI 0.6 project to TGUI 0.8.5
« on: 15 September 2019, 16:05:59 »
well, first off you need the windows 8.1 sdk, then you can try changing it in

Project Properties -> General -> Windows SDK Version

I tried to switch to windows 10 sdk, but it didn't change anything.

5
Help requests / Re: Converting TGUI 0.6 project to TGUI 0.8.5
« on: 15 September 2019, 15:36:27 »
* using build tools v142
* 16.2.5 after updating

The warning is gone, but the 3 errors remain.

Could it be because i'm using the windows 8.1 as my target platform?

6
Help requests / Re: Converting TGUI 0.6 project to TGUI 0.8.5
« on: 15 September 2019, 14:29:22 »
So i let the project rest for a while and I'm having this issue when trying to compile:
Code: [Select]
defaulted default constructor cannot be constexpr because the corresponding implicitly declared default constructor would not be constexprin:
\TGUI-0.8.5\include\TGUI\Vector2f.hpp Line:44   
\TGUI-0.8.5\include\TGUI\AbsoluteOrRelativeValue.hpp Line:177   

Additionally, there is a warning:
Code: [Select]
Avoid unnamed objects with custom construction and destruction (es.84).in: \TGUI-0.8.5\include\TGUI\to_string.hpp Line:40

And when AbsoluteOrRelative.hpp is examined, there is an another error on line 177 in to_string.hpp:
Code: [Select]
constexpr constructor calls non-constexpr function "tgui::AbsoluteOrRelativeValue::AbsoluteOrRelativeValue()"
This is on Visual Studio 2019 (not VScode)

7
hmm, okay. It might be worth adding an "obsolete section" in the docs then, in case there is more things no longer supported.

8
Supposedly, it could be made working using slider 2d and clamping the xpos to something determined by the ypos.
Or at least I think it should be...

I understand it wouldn't be easy to add full rotation support, but it's nice to hear your thoughts on that feature.

9
Help requests / Converting TGUI 0.6 project to TGUI 0.8.5
« on: 11 August 2019, 04:14:03 »
So a while back I was working on something using TGUI 0.6 and now i'd like to move onto TGUI 0.8 only grabbing the basic import and event setup.

However, as there is still documentation missing. I'm not sure how to do this.

Should i really go back to 0.6 ?  :-\

i've attached the source of the old project after removing parts that were too similar.

10
Quote
The option is missing.
You actually just have to set the Height to a larger value than the Width. I'll put on my todo list that I should add a property for it in the gui builder to make it more intuitive, because someone else recently had the same problem with a Slider and I agree that it isn't obvious at all.
Alright.

Quote
Also; If possible, it would be nice if we could set the angles of scrollbars, sliders, etc.
When rotating over an angle other than 90° there is no more obvious definition about where the top left position actually is. There are multiple ways the scrollbar could be positioned after e.g. a 45° turn. I've never seen diagonal scrollbar, is there a use case that you have in mind where you would need to rotate it over such a non-standard angle?

I do agree that beyond 45 degrees do not make sense, however, i'm interested in replicating the EQ sliders on an obscure hifi unit i saw a while back.
Instead of them being vertical |||||| they were slanted/angled like //////

11
Feature requests / TGUI builder 0.8.5 - missing vertical slider
« on: 10 August 2019, 20:45:27 »
Hi. The option is missing. did it get removed from the builder?

Also; If possible, it would be nice if we could set the angles of scrollbars, sliders, etc.

12
Help requests / Re: Trouble syncing scrollbar and knob widgets
« on: 20 August 2016, 18:47:49 »
Fixed. I overlooked the callback's lower half when testing before

13
Help requests / Re: Trouble syncing scrollbar and knob widgets
« on: 20 August 2016, 18:18:40 »
I left this project for a while but decided to do some cleaning to get around some oddities and visual bugs, there is one thing that i can't seem to get working now: flipping the visual range of scroll bars.
Theoretically 255-value should do the trick but the application gets stuck in a loop. "value" can only range from 0 to 255 anyway.

Initialization:
Code: [Select]
#define SCROLLBAR_BTN_SIZE 12 // makes the scrollbar visible

tgui::Scrollbar::Ptr scrollbar1(gui);
scrollbar1->load(THEME_CONFIG_FILE);
scrollbar1->setVerticalScroll(true);
scrollbar1->setPosition(20, 20);
scrollbar1->setSize(18, 256);
scrollbar1->setMaximum(255 + SCROLLBAR_BTN_SIZE);
scrollbar1->setLowValue(SCROLLBAR_BTN_SIZE);

tgui::Knob::Ptr knob1(gui);
knob1->load("data/widgets/Knob/Knob.conf");
knob1->setPosition(55, 235);
knob1->setSize(40, 40);
knob1->setStartRotation(127 + 90);
knob1->setEndRotation(-128 + 90);
knob1->setMinimum(0);
knob1->setMaximum(255);

//...  ... knob/slider 8

Callback handling:
Code: [Select]
// Knobs
case Knob_CALLBACK_ID + 1:
{
value = knob1->getValue();

if (invert_Knob_SYNC == true) scrollbar1->setValue(value); // Do something here ??
else scrollbar1->setValue(value); // default
_itoa_s(value, valText, 10);
reverse(valText);
char lvalue[7];
lvalue[0] = valText[0];
lvalue[1] = '\n';
lvalue[2] = valText[1];
lvalue[3] = '\n';
lvalue[4] = valText[2];
lvalue[5] = '\0';
val1->setText(lvalue);

std::cout << value << '\t' << "knob1" << '\t';

break;
}
//...  ... case 8
case Knob_CALLBACK_ID + 9:
{
invert_Knob_SYNC = !invert_Knob_SYNC;
break;
}
case KnobScroll_CALLBACK_ID + 1:
{
value = scrollbar1->getValue();

if (invert_Knob_SYNC == true) knob1->setValue(value); // Do something here as well ???
else knob1->setValue(value); // default
break;
}
//...  ... case 8

Any suggestions on how to accomplish this?

14
Installation help / Re: Project migration issue on VS2015
« on: 20 August 2016, 03:24:28 »
Aha. The migration caused some issues with the solution, so i created a new solution, with tgui 0.6.10 and pasted my code in there and it works fine now

15
Installation help / Project migration issue on VS2015
« on: 19 August 2016, 21:22:09 »
Ok, i'm not sure what's going on here.

I went from VS2013, TGUI 0.6.9 and SFML 2.3.2 to VS2015, TGUI 0.7.1 and SFML 2.4.0 between 2 different computers with very different configurations.

Anyhow, there is a really odd issue that prevents me from compiling my project:
Code: [Select]
sf::RenderWindow window(sf::VideoMode(960, 600), "RexKeyPad");
tgui::Gui gui(window);

if (gui.setGlobalFont("data/DroidSansMono.ttf") == false)
return 1;

Quote
Severity   Code   Description   Project   File   Line   Suppression State
Error (active)      class "tgui::Gui" has no member "setGlobalFont"   RexKeyPad   c:\DEV\RexKeyPad\RexKeyPad\Main.cpp   107   

Any TGUI code beyond the IF above fails with various errors which wouldn't normally exist.

I have triple checked all sorts of path, include, lib etc configurations but can't find the cause. Any help would be appreciated

Pages: [1] 2