View previous topic :: View next topic |
Author |
Message |
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Fri Mar 27, 2015 8:15 pm Post subject: What code lines to create a continuation box |
|
|
I don't know if this can be down in LUA, but here goes.
I have a table entry that I want to for loop with increasing values, IE Code: |
al= addresslist_GetAddressList()
memrec1 = addresslist_getMemoryRecord(al, 0)--Only item in table currently
for x = 0, 255 do--May need to increase to higher values but that isn't what I need
memoryrecord_setValue(memrec1, x)
bring up a dialog box that pauses the loop until a button is pushed
I can then go into the game, get some info and proceed to the next number
end |
Last edited by bknight2602 on Fri Mar 27, 2015 8:43 pm; edited 1 time in total |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Fri Mar 27, 2015 8:41 pm Post subject: |
|
|
instead of pausing the loop, you may instead want a dialog with a button, that when pressed execute a function that handles the next iteration of the loop and store the state of the loop in a global variable _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Fri Mar 27, 2015 8:45 pm Post subject: |
|
|
That probably would work, what code steps would be required, please.
I edited the first post to add the end of code, sorry. |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Fri Mar 27, 2015 9:00 pm Post subject: |
|
|
something like this:
Code: |
function HandleLoopIteration()
if x<=255 then
--do something with memrec1 and x e.g:
memrec1.Value=x
x=x+1
else
showMessage("End of the loop reached")
--pauseDialog.hide() or pauseDialog.destroy() pauseDialog=nil
end
end
memrec1=getAddressList()[0] --Only item in table currently
x=0
pauseDialog=createForm()
pauseDialog.caption="Something"
pauseDialog.Width=150
pauseDialog.Height=50
pauseDialog.position=poScreenCenter
resumeButton=createButton(pauseDialog)
resumeButton.OnClick=HandleLoopIteration
resumeButton.Caption="Resume"
resumeButton.Left=pauseDialog.ClientWidth / 2 - resumeButton.Width / 2
resumeButton.Top=pauseDialog.ClientHeight / 2 - resumeButton.Height / 2
HandleLoopIteration() --do the first iteration
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Fri Mar 27, 2015 9:34 pm Post subject: |
|
|
Thanks, I was thinking of something totally different. |
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Sun Mar 29, 2015 11:37 am Post subject: |
|
|
Code: |
pauseDialog=createForm()
pauseDialog.caption="Something"
pauseDialog.Width=150
pauseDialog.Height=50
pauseDialog.position=poScreenCenter |
One other question what code line to increase the font of .caption?
I tried several ie:
pauseDialog.caption.Font = 18
pauseDialog.caption.TFont = 18
pauseDialog.TFont = 18
Nothing has changed the original font size. |
|
Back to top |
|
|
panraven Grandmaster Cheater Reputation: 55
Joined: 01 Oct 2008 Posts: 942
|
Posted: Sun Mar 29, 2015 6:06 pm Post subject: |
|
|
try
Code: | pauseDialog.Font.Size=20 |
and this will similarily affect the font size/height
Code: | pauseDialog.Font.Height=20 |
but setting one will affect another,
I don't know their relationship and their real meaning.
set them zero for default.
UPDATED: oops, it's caption of a form. yes, these won't work as DB said.
Last edited by panraven on Sun Mar 29, 2015 6:43 pm; edited 1 time in total |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Sun Mar 29, 2015 6:36 pm Post subject: |
|
|
i don't think the window title can change it's size.
perhaps you may wish to create a borderless window with no title and place an image at top drawing your custom header _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
|