Page 1 of 2
[Implemented] Constants for network events
Posted: Sat Jan 21, 2006 2:34 pm
by Trond
It would be nicer if the network events 0, 2 and 3 had constants so you didn't have to remember them. It would make sense since everything else in PB has constants.
Posted: Sat Jan 21, 2006 3:04 pm
by Dare2
Yes, concur. For everything where it applies.
Posted: Sat Jan 21, 2006 3:34 pm
by nco2k
agree.
c ya,
nco2k
Posted: Sat Jan 21, 2006 4:52 pm
by DarkDragon
DrawingMode() - do for them, too.
Posted: Sat Jan 21, 2006 6:55 pm
by freedimension
DarkDragon wrote:DrawingMode() - do for them, too.
Ah, back in those days:
viewtopic.php?t=9455&highlight=drawingmode 
Posted: Sat Jan 21, 2006 7:48 pm
by DarkDragon
Yeah, but I just wanted to mention it again here, because this topic is similar

.
Posted: Sat Jan 21, 2006 7:53 pm
by freedimension
DarkDragon wrote:Yeah, but I just wanted to mention it again here, because this topic is similar

.
Yes I know, and I'm quite thankful for that too

Posted: Sun Jan 22, 2006 12:13 pm
by Trond
Another constant suggestion: #PB_Window_Standard would equal #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget
or something, so that you didn't have to type everything everytime. It would of course also be nice if constants could be removed from the chain, for example if you could remove #PB_Window_ScreenCentered and add #PB_Window_WindowCentered (this may already be possible for all I know).
Posted: Sun Jan 22, 2006 12:31 pm
by PB
Until your wish gets considered, you may be interested in this tip:
viewtopic.php?p=120641
Posted: Sun Jan 22, 2006 2:51 pm
by Trond
Good tip, however it will create a bit of a mess if everyone had their own constants I think...
Posted: Sun Jan 22, 2006 5:58 pm
by Dr. Dri
same request for ChangeListIconGadgetDisplay()
Dri
Posted: Sun Jan 22, 2006 8:52 pm
by PB
> it will create a bit of a mess if everyone had their own constants
True; I didn't consider what would happen if someone posted some code here
that made use of their own custom "Residents" file. But if they're not posting
their code, then it's totally fine. Good pick-up, though!

Posted: Sun Jan 22, 2006 11:54 pm
by HeX0R
If this will really happen, Fred could add the long forgotten
Client Event 4.
This request is from 22 Apr 2003 and someone called "AlphaSND" said something like "I will add this. Thanks for the suggestions !"

Posted: Sun Jan 22, 2006 11:56 pm
by nco2k
and ClientIP().
c ya,
nco2k
Posted: Mon Jan 23, 2006 1:44 pm
by Fred
Trond wrote:or something, so that you didn't have to type everything everytime. It would of course also be nice if constants could be removed from the chain, for example if you could remove #PB_Window_ScreenCentered and add #PB_Window_WindowCentered (this may already be possible for all I know).
Yes, you can using the xor binary operator:
Code: Select all
#PB_Window_Standard = #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget
OpenWindow(0, 0, 0, 640, 480, #PB_Window_Standard & ~#PB_Window_SizeGadget, "Test")
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow