Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 1st, 2012  |  syntax: None  |  size: 3.25 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include "ui/menudef.h"
  2. #include "ui_mp/common_macro.inc"
  3.  
  4. #define CHOICE_X_START                  0
  5. #define CHOICE_Y_START                  150
  6.  
  7. #define CHOICE_GROUP                    "record"
  8.  
  9. #include "ui_mp/menustyle.inc"
  10. #include "ui/choices_setup_common.menu"
  11.  
  12. #include "ui_mp/popupstyle.inc"
  13. #include "ui/choices_setup_popmenu.menu"
  14.  
  15. #undef CHOICE_HORIZONTAL_ALIGN
  16. #define CHOICE_HORIZONTAL_ALIGN HORIZONTAL_ALIGN_CENTER
  17. #undef CHOICE_VERTICAL_ALIGN
  18. #define CHOICE_VERTICAL_ALIGN   VERTICAL_ALIGN_CENTER
  19.        
  20. #undef CHOICE_SIZE_X
  21. #define CHOICE_SIZE_X   400
  22.  
  23. #undef CHOICE_POPUP_TITLE_HEIGHT
  24. #define CHOICE_POPUP_TITLE_HEIGHT 26
  25.  
  26.  
  27. #define SIDE_MARGIN             100
  28.  
  29. {
  30.         menuDef
  31.         {
  32.                
  33.                
  34.                 name "record_menu"
  35.                 fullscreen 0
  36.                 rect    (0-(CHOICE_POPUP_WIDTH/2)) (0-(CHOICE_POPUP_HEIGHT( 6 )/2)) CHOICE_POPUP_WIDTH CHOICE_POPUP_HEIGHT( 6 ) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER
  37.                 focusColor COLOR_FOCUSED
  38.                 style 1
  39.                 border                  1
  40.                 bordersize              CHOICE_POPUP_BORDER_WIDTH
  41.                 bordercolor             CHOICE_POPUP_BORDER_COLOR
  42.                 popup
  43.                 onOpen
  44.                 {
  45.                         setlocalvarint ui_record_name = "";
  46.                 }
  47.                 onEsc
  48.                 {
  49.                         //close self;
  50.                 }
  51.                 itemDef
  52.                 {
  53.                         style                   WINDOW_STYLE_SHADER
  54.                         rect                    0 0 (CHOICE_POPUP_WIDTH-(CHOICE_POPUP_BORDER_WIDTH*2)) (CHOICE_POPUP_HEIGHT( 6 )-(CHOICE_POPUP_BORDER_WIDTH*2)) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER
  55.                         background              "white"
  56.                         forecolor               CHOICE_POPUP_BACKCOLOR
  57.                         visible                 1
  58.                         decoration
  59.                 }
  60.                
  61.                 CHOICE_POPMENU_TITLE( "Demo Recording:" )
  62.                 CHOICE_POPMENU_SUBTITLE( "Enter your demo name below.")
  63.                
  64.                 #define LOCAL_KEY_SEG( prect, pdvar, text ) \
  65.                 itemDef {\
  66.                         group grpcdkey \
  67.                         type ITEM_TYPE_UPREDITFIELD \
  68.                         style 1 \
  69.                         text "" \
  70.                         dvar ui_record_name \
  71.                         maxchars 20 \
  72.                         rect prect 0 0 \
  73.                         textalign ITEM_ALIGN_CENTER \
  74.                         textalignx -60 \
  75.                         textaligny 16 \
  76.                         textfont UI_FONT_NORMAL \
  77.                         textscale .3 \
  78.                         border 1 \
  79.                         bordercolor .5 .5 .5 1 \
  80.                         backcolor .1 0.1 0.1 .25 \
  81.                         forecolor 1 1 1 1 \
  82.                         visible 1 \
  83.                 }                      
  84.  
  85.                 #define LOCAL_ACCEPT \
  86.                         accept\
  87.                         {\
  88.                                 uiScript verifyCDKey; setlocalvarint ui_show_cancel 1; \
  89.                         }
  90.                        
  91.                 //mouseenter { setcolor bordercolor 1 .75 0 1 }
  92.                 //mouseexit { setcolor bordercolor .5 .5 .5 1 }        
  93.                
  94.                 #define SEG_WIDTH       200
  95.                 #define SEG_HEIGHT      20
  96.                 #define SEG_SIZE        SEG_WIDTH SEG_HEIGHT
  97.                 #define SEG_X_SPACE 4
  98.                
  99.                 #define SEG_Y           60
  100.                
  101.                 #define SEG1_X          SIDE_MARGIN
  102.                 #define SEG2_X          (SEG1_X+SEG_WIDTH+SEG_X_SPACE)
  103.                 #define SEG3_X          (SEG2_X+SEG_WIDTH+SEG_X_SPACE)
  104.                 #define SEG4_X          (SEG3_X+SEG_WIDTH+SEG_X_SPACE)
  105.                 #define SEG5_X          (SEG4_X+SEG_WIDTH+SEG_X_SPACE+12)
  106.                                
  107.                 LOCAL_KEY_SEG( SEG1_X SEG_Y SEG_SIZE, "recordname" "" )
  108.                 CHOICE_BUTTON( 5, "I'am Ready to record and get FAMOUS!?", play "mouse_click";  close self; execNow "record " + text;)
  109.                 CHOICE_BUTTON( 6, "I don't want to record because I hack.", close self; )
  110.                 CHOICE_BUTTON_BG( 6, 1 )
  111.                 CHOICE_HIGHLIGHT( 6, 1 )
  112.        
  113.                
  114.                
  115.                
  116.                
  117.                 //itemDef
  118.                 //{
  119.                         //name datafield
  120.                         //group grpcdkey
  121.                         //style 0
  122.                         //text "Record Name:"
  123.                         //maxchars 2
  124.                         //rect (SEG5_X-12) SEG_Y SEG_SIZE
  125.                         //textalign ITEM_ALIGN_LEFT
  126.                         //textalignx 3
  127.                         //textaligny 18
  128.                         //textfont UI_FONT_NORMAL
  129.                         //textscale .3
  130.                         //backcolor 0 0 0 0
  131.                         //decoration
  132.                         //forecolor 1 1 1 1
  133.                         //visible 1
  134.                 //}
  135.                
  136.                
  137.                
  138.         }
  139. }