xboxscene.org forums

Author Topic: How The Hell Do You Do This  (Read 100 times)

Jezz_X

  • Archived User
  • Hero Member
  • *
  • Posts: 2893
How The Hell Do You Do This
« on: February 16, 2004, 02:05:00 AM »

I'm trying to make a dialog reappear after a another message box has wiped it off the screen so I can keep entering some stuff into it, but I cant make them reappear again.

If I try to recall the whole thing with

OnEvent EventHandler
LoadDialogFromFile MyDialog testDialog.xml
ExecuteUIOBject MyDialog

it just pops up with an error

If I just add

ExecuteUIOBject MyDialog

it locks up the script without displaying it and no input is allowed

If I rename the dialog when I call it again thats fine  like

LoadDialogFromFile NEWDialog testDialog.xml
ExecuteUIOBject NEWDialog

So how do I display it again with the same name of mydialog ???


Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
How The Hell Do You Do This
« Reply #1 on: February 16, 2004, 02:48:00 AM »

Hmmm..... that's technically a bug, but not for simple reasons.

I'll need to work on it. When dialogs are dismissed, the UI "object" is deleted. The handle associated with the dialog should be re-usable, but you'd have to reload it (there may be a way for me to save the XML, or even the object, though)

I need to think about this issue in depth, though. Please be patient.

P.S. OnEvent only needs to be called once, as it sets the Event Handler for the executing script for all UI Objects. Once set, it doesn't need to be reset.

The problem is with re-using dialog/UI handles.
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
How The Hell Do You Do This
« Reply #2 on: February 16, 2004, 02:49:00 AM »

Do you have a RETURN at the end of your :EventHandler section? Cause it works fine for me.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
How The Hell Do You Do This
« Reply #3 on: February 16, 2004, 02:51:00 AM »

QUOTE (flattspott @ Feb 16 2004, 07:49 AM)
Do you have a RETURN at the end of your :EventHandler section? Cause it works fine for me.

His problem is with re-using the handle within a script.

I might suggest calling a secondary script specifically for the dialog, each time you need to bring it up.
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
How The Hell Do You Do This
« Reply #4 on: February 16, 2004, 03:00:00 AM »

Okay then, so he needs a loader script to as a temp fix

2 xas files. The second one is just for the dialog stuff. And in the first script he'd have a CallFile whenever he needs to redraw the script. Wouldn't that work?
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
How The Hell Do You Do This
« Reply #5 on: February 16, 2004, 03:02:00 AM »

QUOTE (flattspott @ Feb 16 2004, 08:00 AM)
Okay then, so he needs a loader script to as a temp fix

2 xas files. The second one is just for the dialog stuff. And in the first script he'd have a CallFile whenever he needs to redraw the script. Wouldn't that work?

Yes, that should work fine.
Logged

Jezz_X

  • Archived User
  • Hero Member
  • *
  • Posts: 2893
How The Hell Do You Do This
« Reply #6 on: February 16, 2004, 03:03:00 AM »

Except I would need to _ all the vars in it
Logged

Jezz_X

  • Archived User
  • Hero Member
  • *
  • Posts: 2893
How The Hell Do You Do This
« Reply #7 on: February 16, 2004, 03:12:00 AM »

While I have your attention can i have an example of
ENABLED (Boolean, disabled is dimmed and cannot be in focus)
VISIBLE (Boolean, when FALSE, control is disabled and not drawn at all)

i want to make a edit box become unenabled when I click on a checkbox

I tried lots but cant get it to work

Also the text in the dialogs comes up as white and not the system ui colors for me as it says in the docs
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
How The Hell Do You Do This
« Reply #8 on: February 16, 2004, 03:15:00 AM »

QUOTE (Jezz_X @ Feb 16 2004, 08:12 AM)
While I have your attention can i have an example of
ENABLED (Boolean, disabled is dimmed and cannot be in focus)
VISIBLE (Boolean, when FALSE, control is disabled and not drawn at all)

i want to make a edit box become unenabled when I click on a checkbox

I tried lots but cant get it to work

Also the text in the dialogs comes up as white and not the system ui colors for me as it says in the docs

That's because I haven't implemented them yet. wink.gif

Soon. I'm cleaning up a few things yet. Overdraw is a biggy.... and I still also have to fix editboxes when the string is too big.

Gotta go to work now. Later.
Logged

Krill123

  • Archived User
  • Full Member
  • *
  • Posts: 224
How The Hell Do You Do This
« Reply #9 on: February 16, 2004, 03:48:00 AM »

blink.gif

I thought taking care of xbox-scene was your job!!?
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
How The Hell Do You Do This
« Reply #10 on: February 16, 2004, 04:20:00 AM »

laugh.gif
Logged