0 Members and 1 Guest are viewing this topic.
ld hl,SmWinDatald de,SmWinDataEnd-SmWinDatald a,GUIRSmallWincall PushGUIStackld hl,winButtonsld de,dat_end-winButtonsld a,GUIRWinButtonscall pushGUIStackld hl,0call GUIMouseretSmWinData: .db 5,5 ;the x and y coordinates relative to the LCD of the top-left of the window .db $F8,$88,$88,$88,$F8 ;a square icon .db "My Window",0 ;the window titleSmWinDataEnd:exitMyProg: call ResetAppPage retwinButtons: .db 00100000b ;only displaying a close button .dw 0 ;null pointer .dw 0 ;another null pointer .dw exitMyProg ;we'll jump to exitMyProg when this button is clickeddat_end:
.nolist#include "ti83plus.inc"#include "Axe.inc"#include "dcs7.inc".list#define B_CALL(xxxx) rst 28h \ .dw xxxx .dw AXM_HEADER .dw Ax1_End .db AXM_ALL .dw tok_DrawL ;DlgBox() .db AXM_INLINE .db AXM_1ARG .org 0 ; OLD CODE: ; call OpenGUIStack ; ld hl,SmWinData ; ld de,SmWinDataEnd-SmWinData ; ld a,GUIRSmallWin ; OK, so let's first get stuff ready! (Open the GUI stack!) call OpenGUIStack ; Text is stored in HL already, no need to move it around! ; Save hl! push hl ; Now find the length of the string arg! call sub_Length ; Copy it to the correct place... ex de,hl ; ...and bring back the string arg! pop hl ; Set window type! ld a,GUIRSmallWin ; Push the GUI! call PushGUIStack ; Now, add the close button to the window. ld hl,winButtons ld de,dat_end-winButtons ld a,GUIRWinButtons call pushGUIStack ; Now, render the GUI and give control (mouse) to DCS! ld hl,0 call GUIMouse retexitMyProg: call ResetAppPage retwinButtons: .db 00100000b ;only displaying a close button .dw 0 ;null pointer .dw 0 ;another null pointer .dw exitMyProg ;we'll jump to exitMyProg when this button is clickeddat_end:Ax1_End: .dw AXM_END.end
Thank to launch this project, I hope you will succeed !
call OpenGUIStack push hl call sub_Length ex de,hl pop hl ld a,GUIRSmallWin call PushGUIStack ld hl,winButtons ld de,dat_end-winButtons ld a,GUIRWinButtons call pushGUIStack ld hl,0 call GUIMouse ret
; OK, so let's first get stuff ready! (Open the GUI stack!) call OpenGUIStack ; Text is stored in HL already, no need to move it around! ; Save hl! push hl ; Now find the length of the string arg! call sub_Length ; Copy it to the correct place... ex de,hl ; ...and bring back the string arg! pop hl ; Set window type! ld a,GUIRSmallWin ; Push the GUI!
; Save hl! push hl ; Now find the length of the string arg! call sub_Length
; Copy it to the correct place... ex de,hl
call OpenGUIStack
; ...and bring back the string arg! pop hl