Page 1 of 1

Popup

Posted: Tue Aug 28, 2012 4:06 pm
by Kami
Are there any plans about a popuplib yet? And if so, what priority would it have on the to-do list? :)

Posted: Tue Aug 28, 2012 4:15 pm
by Tuck
http://www.sourcepython.com/forums/showthread.php?66-Scripting-questions&p=316&viewfull=1#post316

I've already asked about Menu's in this topic :/

edit: However never really got a clear answer

Posted: Tue Aug 28, 2012 4:24 pm
by Monday
We don't have an internal timeline or anything, we can't tell you when we will have something like popuplib however we do plan to include it.

Posted: Tue Aug 28, 2012 4:28 pm
by Kami
Ok thank you for the answer :)

Posted: Tue Aug 28, 2012 6:06 pm
by Omega_K2
Popuplib2 is pretty good, maybe you guys could ask GODJonez and use that as base or have him port it to SP :P

Posted: Tue Aug 28, 2012 8:51 pm
by Ayuto

Posted: Tue Aug 13, 2013 8:22 pm
by Omega_K2
A bump from the grave, but mainly because I'd love to see a popup/menu library rather sooner then later. And it seems useful for majority of plugins, as long you want the user to interact with it in some way at least.

It's one of the fews where writing your own solution just makes so little sense, because it will cause issues if multiple menus are shown "over" each other.


Edit: Even it is just an simple implementation, but that would do. Something among the lines of having it just autoconstruct and display. Especially because a more elaborate approach must be much more well thought out, or otherwise you kinda end up not using the features; for example, you might want to have a single menu, but serveral issues: the content is translated, there are dynamic parts in the menu (like variables, but also like access restriction for certain users, such as "press 1 to go to admin menu" - and this might not just be auth, but also context based; so essentially it should allow for an callback that returns True or False to display things); I found that not be possible to implement without workarounds in ES.

However just the core thing to manage and display stuff would be useful. I liked the approach in popuplib2 to treat an popup as list containing the lines. And then the differnent menus; subpaged menus are specially useful for example, so you just put your lines in and the outcome is whatever works (7. option lines usually, 8 is back 9 is next and 0 close, plus a common heading/footer)

Posted: Tue Aug 13, 2013 8:51 pm
by Tuck
Omega_K2 wrote:A bump from the grave, but mainly because I'd love to see a popup/menu library rather sooner then later. And it seems useful for majority of plugins, as long you want the user to interact with it in some way at least.

It's one of the fews where writing your own solution just makes so little sense, because it will cause issues if multiple menus are shown "over" each other.


Edit: Even it is just an simple implementation, but that would do. Something among the lines of having it just autoconstruct and display. Especially because a more elaborate approach must be much more well thought out, or otherwise you kinda end up not using the features; for example, you might want to have a single menu, but serveral issues: the content is translated, there are dynamic parts in the menu (like variables, but also like access restriction for certain users, such as "press 1 to go to admin menu" - and this might not just be auth, but also context based; so essentially it should allow for an callback that returns True or False to display things); I found that not be possible to implement without workarounds in ES.

However just the core thing to manage and display stuff would be useful. I liked the approach in popuplib2 to treat an popup as list containing the lines. And then the differnent menus; subpaged menus are specially useful for example, so you just put your lines in and the outcome is whatever works (7. option lines usually, 8 is back 9 is next and 0 close, plus a common heading/footer)


You cannot use 0 anymore they removed it.

And i had my own small popup thing because theres not that many source python script out yet (to interfere) and i was able to code something for my scripts, wasen't pretty but was simply to test it out :)

Posted: Tue Aug 13, 2013 8:55 pm
by Omega_K2
Tuck wrote:You cannot use 0 anymore they removed it.

And i had my own small popup thing because theres not that many source python script out yet (to interfere) and i was able to code something for my scripts, wasen't pretty but was simply to test it out :)


I thought they fixed that by now, guess they didn't then. At the very least you can press the buttons now

Posted: Tue Aug 13, 2013 8:59 pm
by Tuck
Omega_K2 wrote:I thought they fixed that by now, guess they didn't then. At the very least you can press the buttons now


oh i didnt know this was a bug i was told it was hardcoded so it was not able to catch 0 but i tested this a very long time ago before the conversion from CamelCase

Posted: Tue Aug 13, 2013 9:26 pm
by Omega_K2
Tuck wrote:oh i didnt know this was a bug i was told it was hardcoded so it was not able to catch 0 but i tested this a very long time ago before the conversion from CamelCase


A bug in the CS:GO Engine, much like the unpressable keys when CS:GO came out. Not sure whether 0. has been fixed though, they did fix the unpressable keys however

Posted: Wed Aug 14, 2013 8:40 am
by mister-man
Whats up with ShowMenu?
Is it possible to use it?

Or isn't it recoded after redesign?


www.sourcepython.com/showwiki.php?title=Wiki:messages&highlight=saytext

Posted: Wed Aug 14, 2013 9:08 am
by Ayuto
mister-man wrote:Whats up with ShowMenu?
Is it possible to use it?

Or isn't it recoded after redesign?


www.sourcepython.com/showwiki.php?title=Wiki:messages&highlight=saytext

You "can" use it, but you should not use it for the same reason why you should not use es.menu.

Posted: Wed Aug 14, 2013 6:46 pm
by mister-man
Okay, but what is the better way?
Use nothing? Or is it a better lib?

Posted: Wed Aug 14, 2013 7:50 pm
by Ayuto
You can use ShowMenu directly if you want, but you should really update your addon as soon as a popuplib has been created.

Posted: Wed Aug 14, 2013 7:55 pm
by mister-man
Yes, thats because I use a wrapper class in my plugin.

Posted: Thu Aug 15, 2013 5:33 am
by Omega_K2
btw I don't even know whether it's possible right now to propertly code a popuplib. As far I as I renember you somehow need to capture client commands, in ES this was possible with a special event ES registered, but not sure what the appropinate function/listener in the c api is, if it is even wrapped.

Edit: It just seems the engine refuses to return on ClientComamnd if the command was registered in the engine. So you're not getting callbacks on menuselect. Guess you need some kind of workaround for that