s_menu_text { // jcem - copied from s_textbutton of buttons.script GUI_CREATE { location = 320,240 region = 0,0 to 32,32 int id = 0 int facecolor = 0xccffffff //deeefe int glowcolor = 0xeeffffff //0xcc9cd0fc int depressedcolor = 0xffffffff int current_color = facecolor int textsize = 1 int textcolor = 0xffffffff int theight = 8 int twidth string typeface = localize$(IDS_F_GEN_TEXTBUTTON) //localize$(IDS_F_GEN_TEXTBUTTON) string text int gwidth pane p_glow = WPATH "glow.tga" alphamode (p_glow) = am_alpha_oneone origin (p_glow) = getwidth(p_glow)/2, getheight(p_glow)/2 color (p_glow) = 20, 80, 100, 255 font3d gFont3d = FPATH typeface sound btnRolloverSound = SPATH "sfx_button7.wav" if !callback($$CTCL_CheckUseJPD$$) { // delay is frame based not time based int delay = FRAME_DELAY int time_delayed = 0 } framerate = 2 int disabled = 0 } GUI_INIT { if disabled == 1 { textcolor = 0x44ffffff color (p_glow) = 0, 40, 50, 255 } if disabled == 0 { textcolor = current_color color (p_glow) = 20, 80, 100, 255 } print3d_attributes = gFont3d, 0xffffffff,textsize,0,1,0,0,just_center twidth = getprint3dwidth(text) theight = getprint3dheight(text) region = 0,0 to twidth + 5, theight scale (p_glow) = ((twidth * getwidth(p_glow)) / 100) + (twidth / 3), 125, 100 } REGION_ENTERED { if disabled == 0 { textcolor = glowcolor color (p_glow) = 40, 150, 180, 255 play btnRolloverSound, 1 } } REGION_EXITED { if disabled == 0 { textcolor = facecolor color (p_glow) = 20, 80, 100, 255 } } LBUTTON_UPDATE { if disabled == 0 { if !callback($$CTCL_CheckUseJPD$$) { if (time_delayed == delay) { if (mouse.left == BUTTON_PRESSED) { textcolor = depressedcolor color (p_glow) = 20, 150, 175, 50 } if (mouse.left == BUTTON_RELEASED) { textcolor = glowcolor color (p_glow) = 20, 120, 150, 50 } if (mouse.left == BUTTON_CLICKED) { mail(id) } } } } } GUI_EXECUTE { if !callback($$CTCL_CheckUseJPD$$) { if (time_delayed < delay) time_delayed++ } } GUI_DRAW { render p_glow, location.x + (twidth / 2), location.y + (theight / 2) + 3 print3d_attributes = gFont3d, textcolor,textsize,1,1,0,0,just_center lprint3d_margins = region lprint3d_position = 0,-2 print3d text } }