Popup

All other Source.Python topics and issues.
User avatar
Kami
Global Moderator
Posts: 263
Joined: Wed Aug 15, 2012 1:24 am
Location: Germany

Popup

Postby Kami » Tue Aug 28, 2012 4:06 pm

Are there any plans about a popuplib yet? And if so, what priority would it have on the to-do list? :)
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Tue Aug 28, 2012 4:15 pm

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
-Tuck
User avatar
Monday
Administrator
Posts: 98
Joined: Thu Jul 12, 2012 4:15 am

Postby Monday » Tue Aug 28, 2012 4:24 pm

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.
User avatar
Kami
Global Moderator
Posts: 263
Joined: Wed Aug 15, 2012 1:24 am
Location: Germany

Postby Kami » Tue Aug 28, 2012 4:28 pm

Ok thank you for the answer :)
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Tue Aug 28, 2012 6:06 pm

Popuplib2 is pretty good, maybe you guys could ask GODJonez and use that as base or have him port it to SP :P
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Tue Aug 28, 2012 8:51 pm

Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Tue Aug 13, 2013 8:22 pm

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)
Libraries: k2tools
Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)
Plugins (game-specific): None atm

If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Tue Aug 13, 2013 8:51 pm

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 :)
-Tuck
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Tue Aug 13, 2013 8:55 pm

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
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Tue Aug 13, 2013 8:59 pm

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
-Tuck
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Tue Aug 13, 2013 9:26 pm

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
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
User avatar
mister-man
Member
Posts: 70
Joined: Wed Aug 29, 2012 7:09 pm
Location: Germany

Postby mister-man » Wed Aug 14, 2013 8:40 am

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

Community of Gamers --> http://c-o-g.de
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Wed Aug 14, 2013 9:08 am

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.
User avatar
mister-man
Member
Posts: 70
Joined: Wed Aug 29, 2012 7:09 pm
Location: Germany

Postby mister-man » Wed Aug 14, 2013 6:46 pm

Okay, but what is the better way?
Use nothing? Or is it a better lib?
----------



Community of Gamers --> http://c-o-g.de
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Wed Aug 14, 2013 7:50 pm

You can use ShowMenu directly if you want, but you should really update your addon as soon as a popuplib has been created.
User avatar
mister-man
Member
Posts: 70
Joined: Wed Aug 29, 2012 7:09 pm
Location: Germany

Postby mister-man » Wed Aug 14, 2013 7:55 pm

Yes, thats because I use a wrapper class in my plugin.
----------



Community of Gamers --> http://c-o-g.de
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Thu Aug 15, 2013 5:33 am

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
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 64 guests