@Hexmage960, post #2
DEFTYPE.IntuitionBase *ibase DEFTYPE.Screen *scr DEFTYPE.Window *win DEFTYPE.DrawInfo *di DEFTYPE.Image *upimage DEFTYPE.Gadget *upbutton DEFTYPE.IntuiMessage *msg DEFTYPE.l idcmp DEFTYPE.l suc DEFTYPE.w w DEFTYPE.w h DEFTYPE.b done Dim tags.TagItem(20) ;nieistotne, szukam WB ;--------------------- *ibase =IntuitionBase lock.l =LockIBase_(0) *scr =*ibase\FirstScreen While *scr If (*scr\Flags)&#SCREENTYPE=#WBENCHSCREEN Pop While Goto jump_00 EndIf *scr=*scr\NextScreen Wend jump_00: UnlockIBase_(lock) *di =GetScreenDrawInfo_(*scr) ;obrazek strzalki w gore ;----------------------- tags(0)\ti_Tag =#SYSIA_Which, #UPIMAGE tags(1)\ti_Tag =#SYSIA_Size, #SYSISIZE_HIRES tags(2)\ti_Tag =#SYSIA_DrawInfo, *di tags(3)\ti_Tag =#TAG_DONE, 0 *upimage=NewObjectA_(0,"sysiclass",&tags(0)) suc=GetAttr_(#IA_Width,*upimage,&w) suc=GetAttr_(#IA_Height,*upimage,&h) ;objekt typu button jako gadget boopsi ;------------------------------------- tags(0)\ti_Tag = #GA_Previous, 0 tags(1)\ti_Tag = #GA_ID, 112 tags(2)\ti_Tag = #GA_Left, 30 tags(3)\ti_Tag = #GA_Top, 30 tags(4)\ti_Tag = #GA_Width, w tags(5)\ti_Tag = #GA_Height, h tags(6)\ti_Tag = #GA_DrawInfo, *di tags(7)\ti_Tag = #GA_GZZGadget, False tags(8)\ti_Tag = #GA_Image, *upimage tags(9)\ti_Tag = #ICA_TARGET, #ICTARGET_IDCMP tags(10)\ti_Tag = #TAG_DONE, 0 *upbutton=NewObjectA_(0,"buttongclass",&tags(0)) ;otwieram okno ;------------- idcmp=#IDCMP_CLOSEWINDOW|#IDCMP_RAWKEY|#IDCMP_IDCMPUPDATE title.s="test" tags(0)\ti_Tag =#WA_Left, *scr\WBorLeft tags(1)\ti_Tag =#WA_Top, *scr\BarHeight+1 tags(2)\ti_Tag =#WA_Width, *scr\Width/4 tags(3)\ti_Tag =#WA_Height, *scr\Height/2 tags(4)\ti_Tag =#WA_PubScreen,*scr tags(5)\ti_Tag =#WA_Title, &title.s tags(6)\ti_Tag =#WA_Activate, True tags(7)\ti_Tag =#WA_Flags, #WFLG_DRAGBAR|#WFLG_CLOSEGADGET tags(8)\ti_Tag =#WA_IDCMP, idcmp tags(9)\ti_Tag =#WA_Gadgets, *upbutton tags(10)\ti_Tag=#TAG_DONE, 0 *win=OpenWindowTagList_(0,&tags(0)) suc=SetFont_(*win\RPort,*scr\RastPort\Font) Repeat WaitPort_(*win\UserPort) *msg=GetMsg_(*win\UserPort) While *msg Select *msg\Class Case #IDCMP_IDCMPUPDATE SetAPen_ *win\RPort,1 RectFill_ *win\RPort,100,100,150,150 Case #IDCMP_RAWKEY SetAPen_ *win\RPort,1+Int(Rnd(3)) RectFill_ *win\RPort,12,200,23,250 Case #IDCMP_CLOSEWINDOW done=True End Select ReplyMsg_(*msg) *msg=GetMsg_(*win\UserPort) Wend Until done CloseWindow_(*win) DisposeObject_(*upimage) End
@peceha, post #3
GA_Immediate, TRUE, GA_RelVerify, TRUE.
@peceha, post #5
@Hexmage960, post #7
/* for notifications from "boopsi" gadgets */
#define IDCMP_IDCMPUPDATE 0x00800000 /* new for V36 */
@peceha, post #8
#define ICTARGET_IDCMP (~0L)