Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #6405 > unrolled thread

dragging a text icon by its outline

Started byChristopher Self <cself@btinternet.com>
First post2022-08-03 20:13 +0100
Last post2022-08-14 18:42 +0100
Articles 3 — 1 participant

Back to article view | Back to comp.sys.acorn.programmer


Contents

  dragging a text icon by its outline Christopher Self <cself@btinternet.com> - 2022-08-03 20:13 +0100
    Re: dragging a text icon by its outline Christopher Self <cself@btinternet.com> - 2022-08-07 21:37 +0100
    Re: dragging a text icon by its outline Christopher Self <cself@btinternet.com> - 2022-08-14 18:42 +0100

#6405 — dragging a text icon by its outline

FromChristopher Self <cself@btinternet.com>
Date2022-08-03 20:13 +0100
Subjectdragging a text icon by its outline
Message-ID<5a124fe1d2cself@btinternet.com>
I'm trying to drag an icon around a window using the icon's outline, but
it keeps boxing my compass.

What's wrong with this, please?:

 PROCget_window_state (play_agenda_win%, minx%, miny%, maxx%, maxy%,
scrollx%, scrolly%, behind%)
 PROCget_icon_outline (play_agenda_win%, icon%, icminx%, icminy%, icmaxx%,
icmaxy%)
 REM draw dragbox for current icon
 block!4  = 5
 block!8  = icminx% + (scrollx% - minx%)
 block!12 = icminy% + (scrolly% - maxy%)
 block!16 = icmaxx% + (scrollx% - minx%)
 block!20 = icmaxy% + (scrolly% - maxy%)
 block!24 = minx%
 block!28 = miny%
 block!32 = maxx%
 block!36 = maxy%
 SYS "Wimp_DragBox",,block


I've bodged it so far with:

 block!8  = minx% + 8
 block!12 = maxy% - (scrolly% - icminy%)
 block!16 = maxx% - 8
 block!20 = maxy% - (scrolly% - icmaxy%)

But I don't understand why that works.

-- 
Christopher Self

[toc] | [next] | [standalone]


#6411

FromChristopher Self <cself@btinternet.com>
Date2022-08-07 21:37 +0100
Message-ID<5a1466ed4ecself@btinternet.com>
In reply to#6405
This is now almost working:

 block!8  = minx% - (scrollx% - icminx%)
 block!12 = maxy% - (scrolly% - icminy%)
 block!16 = minx% - (scrollx% - icmaxx%)
 block!20 = maxy% - (scrolly% - icmaxy%)

But it doesn't cope with an undersize window, and I still don't understand
it.

-- 
Christopher Self

[toc] | [prev] | [next] | [standalone]


#6416

FromChristopher Self <cself@btinternet.com>
Date2022-08-14 18:42 +0100
Message-ID<5a17f1b251cself@btinternet.com>
In reply to#6405
I've even managed to clip it correctly now:

 block!8  = minx% - (scrollx% - icminx%)
   IF scrollx% > icminx% THEN block!8  = minx%+4
 block!12 = maxy% - (scrolly% - icminy%)
 block!16 = minx% - (scrollx% - icmaxx%)
   IF maxx% + (scrollx% - minx%) < icmaxx% THEN block!16 = maxx%-4
 block!20 = maxy% - (scrolly% - icmaxy%)

But I still don't understand it...

-- 
Christopher Self

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.acorn.programmer


csiph-web