MultipleMaids.Gui.cs 405 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070
  1. using ExIni;
  2. using MyRoomCustom;
  3. using System;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Text;
  9. using UnityEngine;
  10. using UnityEngine.Rendering;
  11. using Object = UnityEngine.Object;
  12. namespace CM3D2.MultipleMaids.Plugin
  13. {
  14. public partial class MultipleMaids
  15. {
  16. public void OnGUI()
  17. {
  18. for (int index1 = 0; index1 < maidCnt; ++index1)
  19. {
  20. if (isPoseIti[index1])
  21. {
  22. Maid maid = maidArray[index1];
  23. isPoseIti[index1] = false;
  24. maid.transform.position = poseIti[index1];
  25. Vector3 eulerAngles = maid.transform.eulerAngles;
  26. for (int index2 = 0; index2 < 10; ++index2)
  27. {
  28. Transform transform1 = maid.transform;
  29. Vector3 position1 = maid.transform.position;
  30. Vector3 right = Vector3.right;
  31. Quaternion rotation = maid.transform.rotation;
  32. double num1 = -rotation.eulerAngles.x;
  33. transform1.RotateAround(position1, right, (float)num1);
  34. Transform transform2 = maid.transform;
  35. Vector3 position2 = maid.transform.position;
  36. Vector3 forward = Vector3.forward;
  37. rotation = maid.transform.rotation;
  38. double num2 = -rotation.eulerAngles.z;
  39. transform2.RotateAround(position2, forward, (float)num2);
  40. }
  41. Transform transform = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01", true);
  42. transform.position = new Vector3(poseIti[index1].x, transform.position.y, poseIti[index1].z);
  43. maid.transform.eulerAngles = eulerAngles;
  44. }
  45. }
  46. GUIStyle style = new GUIStyle(GUI.skin.box);
  47. style.fontSize = GetPix(11);
  48. style.alignment = TextAnchor.UpperRight;
  49. if (isGuiInit || screenSize != new Vector2(Screen.width, Screen.height))
  50. {
  51. screenSize = new Vector2(Screen.width, Screen.height);
  52. isGuiInit = false;
  53. rectWin2.width = Screen.width * 0.4f;
  54. rectWin2.height = Screen.height * 0.15f;
  55. rectWin2.x = (float)(Screen.width / 2.0 - rectWin2.width / 2.0);
  56. rectWin2.y = sceneLevel != 5
  57. ? Screen.height - rectWin2.height
  58. : Screen.height * 0.94f - rectWin2.height;
  59. rectWin.width = GetPix(kankyoFlg || kankyo2Flg ? 220 : 180);
  60. rectWin.height = Screen.height * 0.9f;
  61. rectWin.x = Screen.width - rectWin.width;
  62. rectWin.y = GetPix(65);
  63. sceneManagerRect.width = Screen.width * 0.45f;
  64. sceneManagerRect.height = Screen.height * 0.55f;
  65. sceneManagerRect.x = (float)(Screen.width * 0.5f - sceneManagerRect.width * 0.5f);
  66. sceneManagerRect.y = (float)(Screen.height * 0.5f - sceneManagerRect.height * 0.5f);
  67. sceneModalRect.width = Mathf.Min(Screen.width * 0.35f, 480f);
  68. sceneModalRect.height = Mathf.Min(Screen.height * 0.45f, 360f);
  69. sceneModalRect.x = (float)(Screen.width * 0.5f - sceneModalRect.width * 0.5f);
  70. sceneModalRect.y = (float)(Screen.height * 0.5f - sceneModalRect.height * 0.5f);
  71. }
  72. if (bGuiMessage)
  73. {
  74. rectWin2.width = Screen.width * 0.4f;
  75. rectWin2.height = Screen.height * 0.15f;
  76. rectWin2.x = Mathf.Clamp(rectWin2.x, -rectWin2.width + GetPix(20), Screen.width - GetPix(20));
  77. rectWin2.y = Mathf.Clamp(rectWin2.y, -rectWin2.height + GetPix(20), Screen.height - GetPix(20));
  78. rectWin2 = GUI.Window(130, rectWin2, MessageWindow, "", style);
  79. }
  80. if (bGui)
  81. {
  82. rectWin.x = Mathf.Clamp(rectWin.x, 0, Screen.width - rectWin.width);
  83. rectWin.y = Mathf.Clamp(rectWin.y, -rectWin.height + GetPix(20), Screen.height - GetPix(20));
  84. rectWin.height = Screen.height * 0.9f;
  85. rectWin.width = GetPix(kankyoFlg || kankyo2Flg ? 220 : 180);
  86. if (sceneLevel == 5 || sceneLevel == 14)
  87. rectWin.height *= 0.85f;
  88. comboBoxControl.height = rectWin.height;
  89. faceCombo.height = rectWin.height;
  90. poseCombo.height = rectWin.height;
  91. poseGroupCombo.height = rectWin.height;
  92. itemCombo.height = rectWin.height;
  93. bgmCombo.height = rectWin.height;
  94. itemCombo2.height = rectWin.height;
  95. bgCombo2.height = rectWin.height;
  96. bgCombo.height = rectWin.height;
  97. slotCombo.height = rectWin.height;
  98. doguCombo.height = rectWin.height;
  99. parCombo.height = rectWin.height;
  100. lightCombo.height = rectWin.height;
  101. sceneSortCombo.height = sceneManagerRect.height;
  102. if (sceneFlg)
  103. {
  104. if (manageSceneFlag || deleteDirectoryFlag)
  105. {
  106. sceneModalRect = GUI.ModalWindow(9999, sceneModalRect, SceneManagerModal, "", style);
  107. }
  108. sceneManagerRect = GUI.Window(131, sceneManagerRect, SceneManagerWindow, "", style);
  109. int resizeHandleSize = GetPix(15);
  110. resizeManagerRect.x = sceneManagerRect.x + sceneManagerRect.width - resizeHandleSize;
  111. resizeManagerRect.y = sceneManagerRect.y + sceneManagerRect.height - resizeHandleSize;
  112. resizeManagerRect.width = resizeManagerRect.height = resizeHandleSize;
  113. if (!resizeManager && Input.GetMouseButtonDown(0) && resizeManagerRect.Contains(Event.current.mousePosition))
  114. {
  115. resizeManager = true;
  116. }
  117. if (resizeManager)
  118. {
  119. float rectWidth = Event.current.mousePosition.x - sceneManagerRect.x;
  120. float rectHeight = Event.current.mousePosition.y - sceneManagerRect.y;
  121. sceneManagerRect.width = Mathf.Max(GetPix(480), rectWidth);
  122. sceneManagerRect.height = Mathf.Max(GetPix(260), rectHeight);
  123. if (Input.GetMouseButtonUp(0))
  124. {
  125. resizeManager = false;
  126. }
  127. }
  128. }
  129. if (!faceFlg && !poseFlg && !kankyoFlg && !kankyo2Flg && !isF6 && okFlg)
  130. {
  131. rectWin = GUI.Window(129, rectWin, MaidCallWindow, "", style);
  132. }
  133. else if (kankyoFlg)
  134. {
  135. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  136. && rectWin.Contains(Event.current.mousePosition)
  137. && Input.GetMouseButtonDown(0))
  138. {
  139. Input.ResetInputAxes();
  140. }
  141. rectWin = GUI.Window(129, rectWin, BGSelectWindow, "", style);
  142. }
  143. else if (kankyo2Flg)
  144. {
  145. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  146. && rectWin.Contains(Event.current.mousePosition)
  147. && Input.GetMouseButtonDown(0))
  148. {
  149. Input.ResetInputAxes();
  150. }
  151. rectWin = GUI.Window(129, rectWin, BGSelectWindow2, "", style);
  152. }
  153. else if (poseFlg)
  154. {
  155. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  156. && rectWin.Contains(Event.current.mousePosition)
  157. && Input.GetMouseButtonDown(0))
  158. {
  159. Input.ResetInputAxes();
  160. }
  161. rectWin = GUI.Window(129, rectWin, PoseWindow, "", style);
  162. }
  163. else // implies faceFlg == true
  164. {
  165. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  166. && rectWin.Contains(Event.current.mousePosition)
  167. && Input.GetMouseButtonDown(0))
  168. {
  169. Input.ResetInputAxes();
  170. }
  171. rectWin = GUI.Window(129, rectWin, FaceWindow, "", style);
  172. }
  173. GameMain.Instance.MainCamera.SetControl(true);
  174. }
  175. }
  176. private void BGSelectWindow2(int winID)
  177. {
  178. GUIStyle guiStyle1 = "label";
  179. guiStyle1.fontSize = GetPix(12);
  180. guiStyle1.alignment = TextAnchor.UpperLeft;
  181. GUIStyle style1 = "label";
  182. style1.fontSize = GetPix(11);
  183. style1.alignment = TextAnchor.UpperLeft;
  184. GUIStyle style2 = "button";
  185. style2.fontSize = GetPix(20);
  186. GUIStyle buttonStyle = "button";
  187. buttonStyle.fontSize = GetPix(14);
  188. buttonStyle.alignment = TextAnchor.MiddleLeft;
  189. GUIStyle guiStyle2 = "button";
  190. guiStyle2.fontSize = GetPix(12);
  191. guiStyle2.alignment = TextAnchor.MiddleLeft;
  192. GUIStyle style3 = new GUIStyle("toggle")
  193. {
  194. fontSize = GetPix(13)
  195. };
  196. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  197. Maid maid = maidArray[selectMaidIndex];
  198. if (!kankyo2InitFlg)
  199. {
  200. listStyle2.normal.textColor = Color.white;
  201. listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  202. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  203. listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
  204. listStyle2.fontSize = GetPix(11);
  205. listStyle3.normal.textColor = Color.white;
  206. listStyle3.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  207. listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
  208. listStyle3.padding.left = listStyle3.padding.right = listStyle3.padding.top = GetPix(0);
  209. listStyle3.padding.bottom = GetPix(0);
  210. listStyle3.fontSize = GetPix(14);
  211. bgCombo2.selectedItemIndex = bgIndexB;
  212. bgCombo2List = new GUIContent[bgArray.Length];
  213. for (int index = 0; index < bgArray.Length; ++index)
  214. {
  215. bgCombo2List[index] = bgUiNames.TryGetValue(bgArray[index], out string name)
  216. ? new GUIContent(name)
  217. : new GUIContent(bgArray[index]);
  218. }
  219. slotCombo.selectedItemIndex = 0;
  220. slotComboList = slotArray.Select(s => slotUiNames.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
  221. itemCombo2.selectedItemIndex = 0;
  222. itemCombo2List = itemBArray.Select(s => itemComboUiName.TryGetValue(s, out string name) ? name : s)
  223. .Select(s => new GUIContent(s)).ToArray();
  224. kankyo2InitFlg = true;
  225. }
  226. listStyle3.padding.top = GetPix(1);
  227. listStyle3.padding.bottom = GetPix(0);
  228. listStyle3.fontSize = GetPix(13);
  229. if (poseCombo.isClickedComboButton || poseGroupCombo.isClickedComboButton)
  230. {
  231. GUI.enabled = false;
  232. }
  233. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  234. {
  235. if (!isF6)
  236. {
  237. bool flag = true;
  238. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  239. {
  240. flag = false;
  241. }
  242. if (GUI.Toggle(new Rect(GetPix(2),
  243. GetPix(2),
  244. GetPix(39),
  245. GetPix(20)),
  246. flag,
  247. "配置",
  248. style3))
  249. {
  250. faceFlg = false;
  251. poseFlg = false;
  252. // sceneFlg = false;
  253. kankyoFlg = false;
  254. kankyo2Flg = false;
  255. bGui = true;
  256. }
  257. }
  258. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(42),
  259. GetPix(2),
  260. GetPix(39),
  261. GetPix(20)),
  262. poseFlg,
  263. "操作",
  264. style3))
  265. {
  266. poseFlg = true;
  267. faceFlg = false;
  268. // sceneFlg = false;
  269. kankyoFlg = false;
  270. kankyo2Flg = false;
  271. }
  272. if (GUI.Toggle(new Rect(GetPix(82), GetPix(2), GetPix(39), GetPix(20)),
  273. faceFlg,
  274. "表情",
  275. style3))
  276. {
  277. faceFlg = true;
  278. poseFlg = false;
  279. // sceneFlg = false;
  280. kankyoFlg = false;
  281. kankyo2Flg = false;
  282. if (!faceFlg2)
  283. {
  284. isFaceInit = true;
  285. faceFlg2 = true;
  286. maidArray[selectMaidIndex].boMabataki = false;
  287. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  288. }
  289. isFaceInit = true;
  290. }
  291. if (GUI.Toggle(new Rect(GetPix(122), GetPix(2), GetPix(39), GetPix(20)),
  292. kankyoFlg,
  293. "環境",
  294. style3))
  295. {
  296. poseFlg = false;
  297. faceFlg = false;
  298. // sceneFlg = false;
  299. kankyoFlg = true;
  300. kankyo2Flg = false;
  301. }
  302. if (GUI.Toggle(new Rect(GetPix(162), GetPix(2), GetPix(39), GetPix(20)),
  303. kankyo2Flg,
  304. "環2",
  305. style3))
  306. {
  307. poseFlg = false;
  308. faceFlg = false;
  309. // sceneFlg = false;
  310. kankyoFlg = false;
  311. kankyo2Flg = true;
  312. }
  313. if (!line1)
  314. {
  315. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  316. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  317. }
  318. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 2f), line1);
  319. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 1f), line2);
  320. }
  321. if (isDanceStop)
  322. {
  323. isStop[selectMaidIndex] = true;
  324. isDanceStop = false;
  325. }
  326. if (slotCombo.isClickedComboButton || itemCombo2.isClickedComboButton
  327. || bgCombo2.isClickedComboButton)
  328. {
  329. GUI.enabled = false;
  330. }
  331. if (!modItemsOnly)
  332. {
  333. bool previousGUIState = GUI.enabled;
  334. GUI.enabled = slotIndex > 1 || !bg2Busy;
  335. modItemsToggle = GUI.Toggle(new Rect(GetPix(156),
  336. GetPix(115),
  337. GetPix(50),
  338. GetPix(20)),
  339. modItemsToggle,
  340. "Mods",
  341. style3
  342. );
  343. GUI.enabled = previousGUIState;
  344. }
  345. if (slotIndex > 0)
  346. {
  347. if (bg2Busy && slotIndex > 1)
  348. {
  349. GUI.Label(new Rect(GetPix(15), GetPix(130), GetPix(90), GetPix(25)), "Initializing...");
  350. }
  351. int iconSize = GetPix(45);
  352. Rect position1;
  353. Rect viewRect;
  354. int bg2ItemCount = slotIndex == 1 ?
  355. creativeSortList.Count :
  356. (!modItemsOnly && modItemsToggle) ?
  357. numberOfModItems : sortList.Count;
  358. if (sceneLevel != 5)
  359. {
  360. position1 = new Rect(GetPix(7),
  361. GetPix(138),
  362. GetPix(44) * 4 + GetPix(20),
  363. rectWin.height - GetPix(148));
  364. viewRect = new Rect(0.0f,
  365. 0.0f,
  366. position1.width * 0.845f,
  367. Mathf.Ceil(bg2ItemCount / 4f) * iconSize + GetPix(10));
  368. }
  369. else
  370. {
  371. position1 = new Rect(GetPix(7),
  372. GetPix(138),
  373. GetPix(44) * 4 + GetPix(20),
  374. rectWin.height - GetPix(148));
  375. viewRect = new Rect(0.0f,
  376. 0.0f,
  377. position1.width * 0.845f,
  378. Mathf.Ceil(bg2ItemCount / 4f) * iconSize + GetPix(10));
  379. }
  380. bg2ScrollPos = GUI.BeginScrollView(position1, bg2ScrollPos, viewRect);
  381. int bg2Index = 0;
  382. List<SortItem> bg2List = slotIndex == 1 ? creativeSortList : sortList;
  383. foreach (SortItem sortItem in bg2List)
  384. {
  385. if (slotIndex > 1 && modItemsToggle && !sortItem.isMod)
  386. {
  387. continue;
  388. }
  389. Rect position2 = new Rect(
  390. bg2Index % 4 * iconSize,
  391. bg2Index / 4 * iconSize,
  392. iconSize,
  393. iconSize
  394. );
  395. if (GUI.Button(position2, ""))
  396. {
  397. GameObject gameObject = null;
  398. if (slotIndex > 1)
  399. {
  400. string menu = sortItem.menu;
  401. byte[] modBuf = null;
  402. bool ready = true;
  403. if (sortItem.isOfficialMod)
  404. {
  405. menu = sortItem.baseMenu;
  406. using (FileStream fileStream = new FileStream(sortItem.menu, FileMode.Open))
  407. {
  408. if (fileStream == null)
  409. {
  410. ready = false;
  411. }
  412. else
  413. {
  414. modBuf = new byte[fileStream.Length];
  415. fileStream.Read(modBuf, 0, (int)fileStream.Length);
  416. }
  417. }
  418. }
  419. byte[] menuBuf = null;
  420. using (AFileBase afileBase = GameUty.FileOpen(menu, null))
  421. {
  422. if (ready = afileBase.IsValid())
  423. {
  424. menuBuf = afileBase.ReadAll();
  425. }
  426. }
  427. if (ready)
  428. {
  429. string[] meshInfo = ProcScriptBin(menuBuf);
  430. gameObject = ImportCM2.LoadSkinMesh_R(meshInfo[0], meshInfo, 1);
  431. gameObject.name = menu;
  432. if (sortItem.isOfficialMod)
  433. {
  434. gameObject.name += $"#{Path.GetFileName(sortItem.menu)}";
  435. ProcModScriptBin(modBuf, gameObject);
  436. }
  437. }
  438. }
  439. else
  440. {
  441. // My Room Custom content
  442. PlacementData.Data data = PlacementData.GetData(int.Parse(sortItem.menu));
  443. gameObject = Instantiate(data.GetPrefab());
  444. gameObject.name = $"creative_{sortItem.baseMenu}";
  445. }
  446. if (gameObject != null)
  447. {
  448. doguBObject.Add(gameObject);
  449. gameObject.transform.position = new Vector3(0, 0, 0.4f);
  450. doguCnt = doguBObject.Count - 1;
  451. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  452. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  453. gDogu[doguCnt].layer = 8;
  454. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  455. gDogu[doguCnt].SetActive(false);
  456. gDogu[doguCnt].transform.position = gameObject.transform.position;
  457. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  458. mDogu[doguCnt].isScale = false;
  459. mDogu[doguCnt].obj = gDogu[doguCnt];
  460. mDogu[doguCnt].maid = gameObject;
  461. mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
  462. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  463. mDogu[doguCnt].ido = 1;
  464. }
  465. }
  466. GUI.DrawTexture(position2, sortItem.tex);
  467. bg2Index++;
  468. }
  469. GUI.EndScrollView();
  470. }
  471. GUI.enabled = true;
  472. GUI.Label(new Rect(GetPix(3), GetPix(108), GetPix(100), GetPix(25)),
  473. "服装",
  474. style1);
  475. style1.fontSize = GetPix(9);
  476. GUI.Label(new Rect(GetPix(3), GetPix(119), GetPix(100), GetPix(25)),
  477. "アクセサリ",
  478. style1);
  479. style1.fontSize = GetPix(11);
  480. GUI.Label(new Rect(GetPix(3), GetPix(58), GetPix(100), GetPix(25)),
  481. "アイテム",
  482. style1);
  483. GUI.Label(new Rect(GetPix(3), GetPix(86), GetPix(100), GetPix(24)),
  484. "背景(小)",
  485. style1);
  486. if (itemCombo2.isClickedComboButton || bgCombo2.isClickedComboButton)
  487. {
  488. GUI.enabled = false;
  489. }
  490. if (GUI.Button(
  491. new Rect(GetPix(4), GetPix(27), GetPix(85), GetPix(23)),
  492. "Backgrounds", style2))
  493. {
  494. sceneFlg = !sceneFlg || !kankyoToggle;
  495. kankyoToggle = true;
  496. faceFlg = false;
  497. poseFlg = false;
  498. kankyoFlg = false;
  499. kankyo2Flg = true;
  500. bGui = true;
  501. if (!sceneManagerInitialize) InitializeSceneManager();
  502. }
  503. GUI.enabled = !bg2Busy;
  504. int num1 =
  505. slotCombo.List(new Rect(GetPix(51),
  506. GetPix(111),
  507. GetPix(100),
  508. GetPix(23)),
  509. slotComboList[slotIndex].text,
  510. slotComboList,
  511. buttonStyle,
  512. "box",
  513. listStyle3);
  514. GUI.enabled = true;
  515. if (itemCombo2.isClickedComboButton)
  516. {
  517. GUI.enabled = false;
  518. }
  519. bgIndexB =
  520. bgCombo2.List(new Rect(GetPix(51),
  521. GetPix(83),
  522. GetPix(100),
  523. GetPix(23)),
  524. bgCombo2List[bgIndexB].text,
  525. bgCombo2List,
  526. buttonStyle,
  527. "box",
  528. listStyle3);
  529. if (GUI.Button(new Rect(GetPix(156), GetPix(83), GetPix(38), GetPix(23)),
  530. "追加",
  531. style2))
  532. {
  533. Object original = GameMain.Instance.BgMgr.CreateAssetBundle(bgArray[bgIndexB]);
  534. if (original == null)
  535. {
  536. original = Resources.Load("BG/" + bgArray[bgIndexB]);
  537. }
  538. GameObject gameObject = Instantiate(original) as GameObject;
  539. doguBObject.Add(gameObject);
  540. gameObject.name = "BG_" + bgArray[bgIndexB];
  541. Vector3 zero1 = Vector3.zero;
  542. Vector3 zero2 = Vector3.zero;
  543. zero1.z = 0.4f;
  544. gameObject.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
  545. gameObject.transform.localPosition = zero1;
  546. gameObject.transform.localRotation = Quaternion.Euler(zero2);
  547. doguCnt = doguBObject.Count - 1;
  548. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  549. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  550. gDogu[doguCnt].layer = 8;
  551. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  552. gDogu[doguCnt].SetActive(false);
  553. gDogu[doguCnt].transform.position = gameObject.transform.position;
  554. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  555. mDogu[doguCnt].isScale = false;
  556. mDogu[doguCnt].obj = gDogu[doguCnt];
  557. mDogu[doguCnt].maid = gameObject;
  558. mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
  559. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  560. mDogu[doguCnt].ido = 1;
  561. }
  562. GUI.enabled = true;
  563. itemIndexB =
  564. itemCombo2.List(new Rect(GetPix(51),
  565. GetPix(55),
  566. GetPix(100),
  567. GetPix(23)),
  568. itemCombo2List[itemIndexB].text,
  569. itemCombo2List,
  570. buttonStyle,
  571. "box",
  572. listStyle3);
  573. if (GUI.Button(new Rect(GetPix(156), GetPix(55), GetPix(38), GetPix(23)),
  574. "追加",
  575. style2))
  576. {
  577. string str = itemBArray[itemIndexB].Split(',')[1];
  578. byte[] f_byBuf = null;
  579. using (AFileBase afileBase = GameUty.FileOpen(str, null))
  580. {
  581. NDebug.Assert(afileBase.IsValid(), "メニューファイルが存在しません。 :" + str);
  582. if (f_byBuf == null || f_byBuf.Length < afileBase.GetSize())
  583. {
  584. f_byBuf = new byte[afileBase.GetSize()];
  585. }
  586. afileBase.Read(ref f_byBuf, afileBase.GetSize());
  587. }
  588. string[] filename2 = ProcScriptBin(f_byBuf);
  589. GameObject gameObject = ImportCM2.LoadSkinMesh_R(filename2[0], filename2, 1);
  590. doguBObject.Add(gameObject);
  591. gameObject.name = str;
  592. Vector3 zero1 = Vector3.zero;
  593. Vector3 zero2 = Vector3.zero;
  594. zero1.z = 0.4f;
  595. switch (itemIndexB)
  596. {
  597. case 0:
  598. zero2.z = 90f;
  599. zero1.y = 0.04f;
  600. goto case 19;
  601. case 1:
  602. zero2.z = 90f;
  603. goto case 19;
  604. case 4:
  605. zero2.x = 90f;
  606. goto case 19;
  607. case 19:
  608. case 20:
  609. case 21:
  610. case 22:
  611. case 23:
  612. switch (gameObject.name)
  613. {
  614. case "HandItemL_Etoile_Saucer_I_.menu":
  615. case "HandItemL_Karte_I_.menu":
  616. case "HandItemL_Katuramuki_Daikon_I_.menu":
  617. case "HandItemR_BeerBottle(cap_off)_I_.menu":
  618. case "HandItemR_BeerBottle(cap_on)_I_.menu":
  619. case "HandItemR_BeerGlass_I_.menu":
  620. case "HandItemR_Etoile_Teacup_I_.menu":
  621. case "HandItemR_Jyouro_I_.menu":
  622. case "HandItemR_Ketchup_I_.menu":
  623. case "HandItemR_Kobin_I_.menu":
  624. case "HandItemR_MelonSoda_I_.menu":
  625. case "HandItemR_MilkBottle(cap_off)_I_.menu":
  626. case "HandItemR_MilkBottle(cap_on)_I_.menu":
  627. case "HandItemR_Mugcup_I_.menu":
  628. case "HandItemR_Natumikan_I_.menu":
  629. case "HandItemR_Nei_Heartful_I_.menu":
  630. case "HandItemR_Ochoko_I_.menu":
  631. case "HandItemR_Shaker_I_.menu":
  632. case "HandItemR_SmartPhone_I_.menu":
  633. case "HandItemR_Suika_I_.menu":
  634. case "HandItemR_Tomato_I_.menu":
  635. case "HandItemR_TropicalGlass_I_.menu":
  636. case "HandItemR_cocktail_blue_I_.menu":
  637. case "HandItemR_cocktail_red_I_.menu":
  638. case "HandItemR_cocktail_yellow_I_.menu":
  639. case "HandItemR_smoothie_green_I_.menu":
  640. case "HandItemR_smoothie_red_I_.menu":
  641. zero2.x = 0.0f;
  642. zero2.z = 90f;
  643. break;
  644. case "HandItemL_Karaoke_Mike_I_.menu":
  645. case "HandItemR_Crops_Suika_I_.menu":
  646. case "HandItemR_Curry_I_.menu":
  647. case "HandItemR_DVD1_I_.menu":
  648. case "HandItemR_DVD2_I_.menu":
  649. case "HandItemR_DVD3_I_.menu":
  650. case "HandItemR_DVD4_I_.menu":
  651. case "HandItemR_DVD5_I_.menu":
  652. case "HandItemR_Folk_I_.menu":
  653. case "HandItemR_Hanabi_I_.menu":
  654. case "HandItemR_Kushiyaki_I_.menu":
  655. case "HandItemR_Ninjin_I_.menu":
  656. case "HandItemR_Omurice1_I_.menu":
  657. case "HandItemR_Omurice2_I_.menu":
  658. case "HandItemR_Omurice3_I_.menu":
  659. case "HandItemR_Pasta_I_.menu":
  660. case "HandItemR_Satumaimo_I_.menu":
  661. case "HandItemR_Scoop_I_.menu":
  662. case "HandItemR_Senkouhanabi_I_.menu":
  663. case "HandItemR_Shell_I_.menu":
  664. case "HandItemR_Spoon_Curry_I_.menu":
  665. case "HandItemR_Spoon_Omurice_I_.menu":
  666. case "HandItemR_Tomorokoshi_I_.menu":
  667. case "HandItemR_Tomorokoshi_yaki_I_.menu":
  668. case "HandItemR_Uchiwa_I_.menu":
  669. zero2.z = 90f;
  670. break;
  671. }
  672. gameObject.transform.localPosition = zero1;
  673. gameObject.transform.localRotation = Quaternion.Euler(zero2);
  674. doguCnt = doguBObject.Count - 1;
  675. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  676. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  677. gDogu[doguCnt].layer = 8;
  678. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  679. gDogu[doguCnt].SetActive(false);
  680. gDogu[doguCnt].transform.position = gameObject.transform.position;
  681. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  682. mDogu[doguCnt].isScale = false;
  683. mDogu[doguCnt].obj = gDogu[doguCnt];
  684. mDogu[doguCnt].maid = gameObject;
  685. mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
  686. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  687. mDogu[doguCnt].ido = 1;
  688. break;
  689. case 25:
  690. zero2.z = 90f;
  691. goto case 19;
  692. case 26:
  693. zero2.z = 90f;
  694. goto case 19;
  695. case 27:
  696. zero2.z = 90f;
  697. goto case 19;
  698. default:
  699. zero2.x = -90f;
  700. goto case 19;
  701. }
  702. }
  703. GUI.enabled = true;
  704. GUI.DragWindow();
  705. if (num1 == slotIndex)
  706. {
  707. return;
  708. }
  709. slotIndex = num1;
  710. bg2ScrollPos = new Vector2(0.0f, 0.0f);
  711. if (slotIndex == 0)
  712. {
  713. return;
  714. }
  715. else if (slotIndex == 1)
  716. {
  717. if (creativeSortList.Count == 0)
  718. {
  719. PlacementData.CreateData();
  720. List<PlacementData.Data> creativeData = PlacementData.GetAllDatas(false);
  721. creativeData = creativeData.OrderBy(data => data.categoryID).ThenBy(data => data.ID).ToList();
  722. creativeSortList = new List<SortItem>(creativeData.Count);
  723. foreach (var data in creativeData)
  724. {
  725. string asset = !string.IsNullOrEmpty(data.resourceName) ? data.resourceName : data.assetName;
  726. SortItem item = new SortItem()
  727. {
  728. menu = data.ID.ToString(),
  729. baseMenu = asset,
  730. isCreative = true,
  731. tex = data.GetThumbnail() as Texture2D
  732. };
  733. creativeSortList.Add(item);
  734. }
  735. }
  736. }
  737. else
  738. {
  739. if (!bg2Initialized)
  740. {
  741. GameMain.Instance.StartCoroutine(InitializeBG2());
  742. }
  743. else
  744. {
  745. SetBG2Props();
  746. }
  747. }
  748. }
  749. private void BGSelectWindow(int winID)
  750. {
  751. GUIStyle guistyle = "label";
  752. guistyle.fontSize = GetPix(12);
  753. guistyle.alignment = TextAnchor.UpperLeft;
  754. GUIStyle guistyle2 = "label";
  755. guistyle2.fontSize = GetPix(11);
  756. guistyle2.alignment = TextAnchor.UpperLeft;
  757. GUIStyle guistyle3 = "button";
  758. guistyle3.fontSize = GetPix(20);
  759. GUIStyle guistyle4 = "button";
  760. guistyle4.fontSize = GetPix(14);
  761. guistyle4.alignment = TextAnchor.MiddleLeft;
  762. GUIStyle guistyle5 = "button";
  763. guistyle5.fontSize = GetPix(12);
  764. guistyle5.alignment = TextAnchor.MiddleLeft;
  765. GUIStyle guistyle6 = new GUIStyle("toggle")
  766. {
  767. fontSize = GetPix(13)
  768. };
  769. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  770. Maid maid = maidArray[selectMaidIndex];
  771. if (!kankyoInitFlg)
  772. {
  773. listStyle2.normal.textColor = Color.white;
  774. listStyle2.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  775. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  776. RectOffset padding = listStyle2.padding;
  777. RectOffset padding2 = listStyle2.padding;
  778. RectOffset padding3 = listStyle2.padding;
  779. int num = listStyle2.padding.bottom = GetPix(0);
  780. num = padding3.top = num;
  781. num = padding2.right = num;
  782. padding.left = num;
  783. listStyle2.fontSize = GetPix(11);
  784. listStyle3.normal.textColor = Color.white;
  785. listStyle3.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  786. listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
  787. RectOffset padding4 = listStyle3.padding;
  788. RectOffset padding5 = listStyle3.padding;
  789. num = listStyle3.padding.top = GetPix(0);
  790. num = padding5.right = num;
  791. padding4.left = num;
  792. listStyle3.padding.bottom = GetPix(0);
  793. listStyle3.fontSize = GetPix(12);
  794. bgmCombo.selectedItemIndex = bgmIndex;
  795. if (sceneLevel == 5)
  796. {
  797. bgmCombo.selectedItemIndex = 2;
  798. }
  799. bgmComboList = bgmArray.Select(s => dancesDict.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
  800. bgCombo.selectedItemIndex = bgIndex;
  801. bgComboList = new GUIContent[bgArray.Length];
  802. for (int j = 0; j < bgArray.Length; j++)
  803. {
  804. // Dicts merged during init
  805. if (bgDict.TryGetValue(bgArray[j], out string name))
  806. {
  807. bgComboList[j] = new GUIContent(name);
  808. }
  809. else
  810. {
  811. bgComboList[j] = new GUIContent(bgArray[j]);
  812. }
  813. }
  814. doguCombo.selectedItemIndex = 0;
  815. doguComboList = new GUIContent[doguBArray.Length];
  816. for (int j = 0; j < doguComboList.Length; j++)
  817. {
  818. // Dicts merged during init
  819. if (doguUiNames.TryGetValue(doguBArray[j], out string name))
  820. {
  821. doguComboList[j] = new GUIContent(name);
  822. }
  823. else
  824. {
  825. doguComboList[j] = new GUIContent(doguBArray[j]);
  826. }
  827. }
  828. parCombo.selectedItemIndex = 0;
  829. parComboList = parArray.Select(s => parUiDict.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
  830. lightCombo.selectedItemIndex = 0;
  831. lightList = new List<GameObject>
  832. {
  833. GameMain.Instance.MainLight.gameObject
  834. };
  835. lightComboList = new GUIContent[lightList.Count];
  836. for (int i = 0; i < lightList.Count; i++)
  837. {
  838. if (i == 0)
  839. {
  840. lightComboList[i] = new GUIContent("メイン");
  841. }
  842. else
  843. {
  844. lightComboList[i] = new GUIContent("追加" + i);
  845. }
  846. }
  847. kankyoInitFlg = true;
  848. }
  849. listStyle3.padding.top = GetPix(1);
  850. listStyle3.padding.bottom = GetPix(0);
  851. listStyle3.fontSize = GetPix(12);
  852. if (poseCombo.isClickedComboButton)
  853. {
  854. GUI.enabled = false;
  855. }
  856. if (poseGroupCombo.isClickedComboButton)
  857. {
  858. GUI.enabled = false;
  859. }
  860. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  861. {
  862. if (!isF6)
  863. {
  864. bool value = true;
  865. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  866. {
  867. value = false;
  868. }
  869. if (GUI.Toggle(new Rect(GetPix(2),
  870. GetPix(2),
  871. GetPix(39),
  872. GetPix(20)),
  873. value,
  874. "配置",
  875. guistyle6))
  876. {
  877. faceFlg = false;
  878. poseFlg = false;
  879. kankyoFlg = false;
  880. kankyo2Flg = false;
  881. bGui = true;
  882. }
  883. }
  884. if (!yotogiFlg)
  885. {
  886. if (GUI.Toggle(new Rect(GetPix(42),
  887. GetPix(2),
  888. GetPix(39),
  889. GetPix(20)),
  890. poseFlg,
  891. "操作",
  892. guistyle6))
  893. {
  894. poseFlg = true;
  895. faceFlg = false;
  896. kankyoFlg = false;
  897. kankyo2Flg = false;
  898. }
  899. }
  900. if (GUI.Toggle(new Rect(GetPix(82), GetPix(2), GetPix(39), GetPix(20)),
  901. faceFlg,
  902. "表情",
  903. guistyle6))
  904. {
  905. faceFlg = true;
  906. poseFlg = false;
  907. kankyoFlg = false;
  908. kankyo2Flg = false;
  909. if (!faceFlg2)
  910. {
  911. isFaceInit = true;
  912. faceFlg2 = true;
  913. maidArray[selectMaidIndex].boMabataki = false;
  914. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  915. }
  916. isFaceInit = true;
  917. }
  918. if (GUI.Toggle(new Rect(GetPix(122), GetPix(2), GetPix(39), GetPix(20)),
  919. kankyoFlg,
  920. "環境",
  921. guistyle6))
  922. {
  923. poseFlg = false;
  924. faceFlg = false;
  925. kankyoFlg = true;
  926. kankyo2Flg = false;
  927. }
  928. if (GUI.Toggle(new Rect(GetPix(162), GetPix(2), GetPix(39), GetPix(20)),
  929. kankyo2Flg,
  930. "環2",
  931. guistyle6))
  932. {
  933. poseFlg = false;
  934. faceFlg = false;
  935. kankyoFlg = false;
  936. kankyo2Flg = true;
  937. }
  938. if (!line1)
  939. {
  940. line1 = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.3f));
  941. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  942. }
  943. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 2f), line1);
  944. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 1f), line2);
  945. }
  946. if (isDanceStop)
  947. {
  948. isStop[selectMaidIndex] = true;
  949. isDanceStop = false;
  950. }
  951. yotogiFlg = false;
  952. if (sceneLevel == 14)
  953. {
  954. if (GameObject.Find("/UI Root/YotogiPlayPanel/CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit"))
  955. {
  956. yotogiFlg = true;
  957. }
  958. }
  959. if (!isF6)
  960. {
  961. if (GUI.Button(new Rect(GetPix(157),
  962. GetPix(32),
  963. GetPix(46),
  964. GetPix(35)),
  965. "シーン\n 管 理",
  966. guistyle3))
  967. {
  968. sceneFlg = sceneFlg ? kankyoToggle : true;
  969. kankyoToggle = false;
  970. faceFlg = false;
  971. poseFlg = false;
  972. kankyoFlg = true;
  973. kankyo2Flg = false;
  974. bGui = true;
  975. if (!sceneManagerInitialize) InitializeSceneManager();
  976. }
  977. }
  978. if (doguCombo.isClickedComboButton || parCombo.isClickedComboButton || bgCombo.isClickedComboButton
  979. || bgmCombo.isClickedComboButton || lightCombo.isClickedComboButton)
  980. {
  981. GUI.enabled = false;
  982. }
  983. int num2 = -1;
  984. if (lightIndex[selectLightIndex] == 0)
  985. {
  986. isIdx1 = true;
  987. }
  988. if (lightIndex[selectLightIndex] == 1)
  989. {
  990. isIdx2 = true;
  991. }
  992. if (lightIndex[selectLightIndex] == 2)
  993. {
  994. isIdx3 = true;
  995. }
  996. if (lightIndex[selectLightIndex] == 3)
  997. {
  998. isIdx4 = true;
  999. }
  1000. int offsetTop = GetPix(80);
  1001. int UIHeight = GetPix(550);
  1002. Rect BGWindowScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  1003. Rect BGWindowScrollView = new Rect(0, offsetTop, rectWin.width - 20, UIHeight);
  1004. bgScrollPos = GUI.BeginScrollView(BGWindowScrollRect, bgScrollPos, BGWindowScrollView);
  1005. if (GUI.Toggle(new Rect(GetPix(5), GetPix(215), GetPix(45), GetPix(20)),
  1006. isIdx1,
  1007. "通常",
  1008. guistyle6))
  1009. {
  1010. if (lightIndex[selectLightIndex] != 0)
  1011. {
  1012. isIdx1 = true;
  1013. isIdx2 = false;
  1014. isIdx3 = false;
  1015. isIdx4 = false;
  1016. num2 = 0;
  1017. }
  1018. }
  1019. if (GUI.Toggle(new Rect(GetPix(50), GetPix(215), GetPix(45), GetPix(20)),
  1020. isIdx2,
  1021. "Spot",
  1022. guistyle6))
  1023. {
  1024. if (lightIndex[selectLightIndex] != 1)
  1025. {
  1026. isIdx1 = false;
  1027. isIdx2 = true;
  1028. isIdx3 = false;
  1029. isIdx4 = false;
  1030. num2 = 1;
  1031. }
  1032. }
  1033. if (GUI.Toggle(new Rect(GetPix(99), GetPix(215), GetPix(45), GetPix(20)),
  1034. isIdx3,
  1035. "Point",
  1036. guistyle6))
  1037. {
  1038. if (lightIndex[selectLightIndex] != 2)
  1039. {
  1040. isIdx1 = false;
  1041. isIdx2 = false;
  1042. isIdx3 = true;
  1043. isIdx4 = false;
  1044. num2 = 2;
  1045. }
  1046. }
  1047. if (selectLightIndex == 0)
  1048. {
  1049. if (GUI.Toggle(new Rect(GetPix(150),
  1050. GetPix(215),
  1051. GetPix(45),
  1052. GetPix(20)),
  1053. isIdx4,
  1054. "単色",
  1055. guistyle6))
  1056. {
  1057. if (lightIndex[selectLightIndex] != 3)
  1058. {
  1059. isIdx1 = false;
  1060. isIdx2 = false;
  1061. isIdx3 = false;
  1062. isIdx4 = true;
  1063. num2 = 3;
  1064. }
  1065. }
  1066. }
  1067. else if (GUI.Toggle(new Rect(GetPix(150),
  1068. GetPix(215),
  1069. GetPix(45),
  1070. GetPix(20)),
  1071. isIdx4,
  1072. "無効",
  1073. guistyle6))
  1074. {
  1075. if (lightIndex[selectLightIndex] != 3)
  1076. {
  1077. isIdx1 = false;
  1078. isIdx2 = false;
  1079. isIdx3 = false;
  1080. isIdx4 = true;
  1081. num2 = 3;
  1082. }
  1083. }
  1084. if (num2 >= 0)
  1085. {
  1086. lightIndex[selectLightIndex] = num2;
  1087. if (selectLightIndex == 0)
  1088. {
  1089. GameMain.Instance.MainLight.Reset();
  1090. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1091. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1092. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1093. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1094. if (lightIndex[selectLightIndex] == 0)
  1095. {
  1096. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1097. bgObject.SetActive(true);
  1098. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1099. }
  1100. else if (lightIndex[selectLightIndex] == 1)
  1101. {
  1102. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1103. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1104. bgObject.SetActive(true);
  1105. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1106. }
  1107. else if (lightIndex[selectLightIndex] == 2)
  1108. {
  1109. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1110. bgObject.SetActive(true);
  1111. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1112. }
  1113. else if (lightIndex[selectLightIndex] == 3)
  1114. {
  1115. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1116. mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1117. bgObject.SetActive(false);
  1118. }
  1119. }
  1120. else
  1121. {
  1122. lightList[selectLightIndex].SetActive(true);
  1123. if (lightIndex[selectLightIndex] == 0)
  1124. {
  1125. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Directional;
  1126. }
  1127. else if (lightIndex[selectLightIndex] == 1)
  1128. {
  1129. lightList[selectLightIndex].transform.eulerAngles += Vector3.right * 40f;
  1130. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Spot;
  1131. }
  1132. else if (lightIndex[selectLightIndex] == 2)
  1133. {
  1134. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Point;
  1135. }
  1136. else if (lightIndex[selectLightIndex] == 3)
  1137. {
  1138. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Directional;
  1139. lightList[selectLightIndex].SetActive(false);
  1140. }
  1141. }
  1142. lightColorR[selectLightIndex] = 1f;
  1143. lightColorG[selectLightIndex] = 1f;
  1144. lightColorB[selectLightIndex] = 1f;
  1145. lightX[selectLightIndex] = 40f;
  1146. lightY[selectLightIndex] = 180f;
  1147. lightAkarusa[selectLightIndex] = 0.95f;
  1148. lightKage[selectLightIndex] = 0.098f;
  1149. lightRange[selectLightIndex] = 50f;
  1150. if (lightIndex[selectLightIndex] == 1)
  1151. {
  1152. lightX[selectLightIndex] = 90f;
  1153. }
  1154. }
  1155. GUI.Label(new Rect(GetPix(10), GetPix(138), GetPix(100), GetPix(25)),
  1156. "キューブ表示",
  1157. guistyle2);
  1158. guistyle6.fontSize = GetPix(12);
  1159. isCube2 = GUI.Toggle(new Rect(GetPix(5),
  1160. GetPix(153),
  1161. GetPix(55),
  1162. GetPix(20)),
  1163. isCube2,
  1164. "大道具(",
  1165. guistyle6);
  1166. if (!isF6)
  1167. {
  1168. isCube = GUI.Toggle(new Rect(GetPix(102),
  1169. GetPix(153),
  1170. GetPix(54),
  1171. GetPix(20)),
  1172. isCube,
  1173. "メイド",
  1174. guistyle6);
  1175. }
  1176. bool flag = GUI.Toggle(new Rect(GetPix(160),
  1177. GetPix(153),
  1178. GetPix(44),
  1179. GetPix(20)),
  1180. isCube3,
  1181. "背景",
  1182. guistyle6);
  1183. guistyle6.fontSize = GetPix(13);
  1184. bool flag2 = GUI.Toggle(new Rect(GetPix(61),
  1185. GetPix(153),
  1186. GetPix(38),
  1187. GetPix(20)),
  1188. isCubeS,
  1189. "小)",
  1190. guistyle6);
  1191. if (isCubeS != flag2)
  1192. {
  1193. isCubeS = flag2;
  1194. if (isCubeS)
  1195. {
  1196. cubeSize = 0.05f;
  1197. }
  1198. else
  1199. {
  1200. cubeSize = 0.12f;
  1201. }
  1202. for (int i = 0; i < doguBObject.Count; i++)
  1203. {
  1204. gDogu[i].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  1205. }
  1206. }
  1207. if (isCube3 != flag)
  1208. {
  1209. isCube3 = flag;
  1210. if (gBg == null)
  1211. {
  1212. gBg = GameObject.CreatePrimitive(PrimitiveType.Cube);
  1213. gBg.GetComponent<Renderer>().material = m_material;
  1214. gBg.layer = 8;
  1215. gBg.GetComponent<Renderer>().enabled = false;
  1216. gBg.SetActive(false);
  1217. gBg.transform.position = bgObject.transform.position;
  1218. mBg = gBg.AddComponent<MouseDrag6>();
  1219. mBg.obj = gBg;
  1220. mBg.maid = bgObject;
  1221. mBg.angles = bg.eulerAngles;
  1222. gBg.transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  1223. mBg.ido = 1;
  1224. mBg.isScale = false;
  1225. }
  1226. if (isCube3)
  1227. {
  1228. gBg.SetActive(true);
  1229. }
  1230. else
  1231. {
  1232. gBg.SetActive(false);
  1233. }
  1234. }
  1235. int num3 = 0;
  1236. if (lightIndex[selectLightIndex] == 0 || lightIndex[selectLightIndex] == 1
  1237. || (selectLightIndex == 0 && lightIndex[selectLightIndex] == 3))
  1238. {
  1239. GUI.Label(new Rect(GetPix(10), GetPix(237), GetPix(100), GetPix(25)),
  1240. "向きX",
  1241. guistyle2);
  1242. lightX[selectLightIndex] =
  1243. GUI.HorizontalSlider(new Rect(GetPix(8),
  1244. GetPix(251),
  1245. GetPix(192),
  1246. GetPix(20)),
  1247. lightX[selectLightIndex],
  1248. 220f,
  1249. -140f);
  1250. GUI.Label(new Rect(GetPix(10), GetPix(261), GetPix(100), GetPix(25)),
  1251. "向きY",
  1252. guistyle2);
  1253. lightY[selectLightIndex] =
  1254. GUI.HorizontalSlider(new Rect(GetPix(8),
  1255. GetPix(275),
  1256. GetPix(192),
  1257. GetPix(20)),
  1258. lightY[selectLightIndex],
  1259. 0f,
  1260. 360f);
  1261. }
  1262. else
  1263. {
  1264. num3 = 50;
  1265. }
  1266. if (lightIndex[selectLightIndex] != 3 || selectLightIndex <= 0)
  1267. {
  1268. GUI.Label(new Rect(GetPix(10),
  1269. GetPix(285 - num3),
  1270. GetPix(100),
  1271. GetPix(25)),
  1272. "明るさ",
  1273. guistyle2);
  1274. lightAkarusa[selectLightIndex] =
  1275. GUI.HorizontalSlider(new Rect(GetPix(8),
  1276. GetPix(299 - num3),
  1277. GetPix(192),
  1278. GetPix(20)),
  1279. lightAkarusa[selectLightIndex],
  1280. 0f,
  1281. 1.9f);
  1282. if (lightIndex[selectLightIndex] == 0 || lightIndex[selectLightIndex] == 3)
  1283. {
  1284. if (selectLightIndex == 0)
  1285. {
  1286. GUI.Label(new Rect(GetPix(10),
  1287. GetPix(309 - num3),
  1288. GetPix(100),
  1289. GetPix(25)),
  1290. "影",
  1291. guistyle2);
  1292. lightKage[selectLightIndex] =
  1293. GUI.HorizontalSlider(new Rect(GetPix(8),
  1294. GetPix(323 - num3),
  1295. GetPix(192),
  1296. GetPix(20)),
  1297. lightKage[selectLightIndex],
  1298. 0f,
  1299. 1f);
  1300. }
  1301. else
  1302. {
  1303. num3 = 25;
  1304. }
  1305. }
  1306. else if (lightIndex[selectLightIndex] == 1 || lightIndex[selectLightIndex] == 2)
  1307. {
  1308. GUI.Label(new Rect(GetPix(10),
  1309. GetPix(311 - num3),
  1310. GetPix(100),
  1311. GetPix(25)),
  1312. "範囲",
  1313. guistyle2);
  1314. lightRange[selectLightIndex] =
  1315. GUI.HorizontalSlider(new Rect(GetPix(8),
  1316. GetPix(325 - num3),
  1317. GetPix(192),
  1318. GetPix(20)),
  1319. lightRange[selectLightIndex],
  1320. 0f,
  1321. 150f);
  1322. }
  1323. else
  1324. {
  1325. num3 = 75;
  1326. }
  1327. GUI.Label(new Rect(GetPix(10),
  1328. GetPix(333 - num3),
  1329. GetPix(100),
  1330. GetPix(25)),
  1331. "赤",
  1332. guistyle2);
  1333. lightColorR[selectLightIndex] =
  1334. GUI.HorizontalSlider(new Rect(GetPix(8),
  1335. GetPix(347 - num3),
  1336. GetPix(92),
  1337. GetPix(20)),
  1338. lightColorR[selectLightIndex],
  1339. 0f,
  1340. 1f);
  1341. GUI.Label(new Rect(GetPix(108),
  1342. GetPix(333 - num3),
  1343. GetPix(100),
  1344. GetPix(25)),
  1345. "緑",
  1346. guistyle2);
  1347. lightColorG[selectLightIndex] =
  1348. GUI.HorizontalSlider(new Rect(GetPix(108),
  1349. GetPix(347 - num3),
  1350. GetPix(92),
  1351. GetPix(20)),
  1352. lightColorG[selectLightIndex],
  1353. 0f,
  1354. 1f);
  1355. GUI.Label(new Rect(GetPix(10),
  1356. GetPix(357 - num3),
  1357. GetPix(100),
  1358. GetPix(25)),
  1359. "青",
  1360. guistyle2);
  1361. lightColorB[selectLightIndex] =
  1362. GUI.HorizontalSlider(new Rect(GetPix(8),
  1363. GetPix(371 - num3),
  1364. GetPix(92),
  1365. GetPix(20)),
  1366. lightColorB[selectLightIndex],
  1367. 0f,
  1368. 1f);
  1369. }
  1370. if (GUI.Toggle(new Rect(GetPix(5), GetPix(391), GetPix(67), GetPix(20)),
  1371. isBloomS,
  1372. "ブルーム",
  1373. guistyle6))
  1374. {
  1375. isBloomS = true;
  1376. isDepthS = false;
  1377. isBlurS = false;
  1378. isFogS = false;
  1379. }
  1380. if (isBloomS)
  1381. {
  1382. isBloom = GUI.Toggle(new Rect(GetPix(8),
  1383. GetPix(412),
  1384. GetPix(40),
  1385. GetPix(20)),
  1386. isBloom,
  1387. "有効",
  1388. guistyle6);
  1389. if (!isBloom)
  1390. {
  1391. GUI.enabled = false;
  1392. }
  1393. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  1394. "強さ",
  1395. guistyle2);
  1396. bloom1 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1397. GetPix(445),
  1398. GetPix(92),
  1399. GetPix(20)),
  1400. bloom1,
  1401. 0f,
  1402. 5.7f);
  1403. GUI.Label(new Rect(GetPix(110), GetPix(430), GetPix(100), GetPix(25)),
  1404. "広さ",
  1405. guistyle2);
  1406. bloom2 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1407. GetPix(445),
  1408. GetPix(92),
  1409. GetPix(20)),
  1410. bloom2,
  1411. 0f,
  1412. 15f);
  1413. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  1414. "赤",
  1415. guistyle2);
  1416. bloom3 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1417. GetPix(470),
  1418. GetPix(92),
  1419. GetPix(20)),
  1420. bloom3,
  1421. 0f,
  1422. 0.5f);
  1423. GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
  1424. "緑",
  1425. guistyle2);
  1426. bloom4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1427. GetPix(470),
  1428. GetPix(92),
  1429. GetPix(20)),
  1430. bloom4,
  1431. 0f,
  1432. 0.5f);
  1433. GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
  1434. "青",
  1435. guistyle2);
  1436. bloom5 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1437. GetPix(495),
  1438. GetPix(92),
  1439. GetPix(20)),
  1440. bloom5,
  1441. 0f,
  1442. 0.5f);
  1443. isBloomA = GUI.Toggle(new Rect(GetPix(110),
  1444. GetPix(491),
  1445. GetPix(50),
  1446. GetPix(20)),
  1447. isBloomA,
  1448. "HDR",
  1449. guistyle6);
  1450. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  1451. && !bgmCombo.isClickedComboButton)
  1452. {
  1453. GUI.enabled = true;
  1454. }
  1455. }
  1456. if (GUI.Toggle(new Rect(GetPix(73), GetPix(391), GetPix(40), GetPix(20)),
  1457. isDepthS,
  1458. "深度",
  1459. guistyle6))
  1460. {
  1461. isBloomS = false;
  1462. isDepthS = true;
  1463. isBlurS = false;
  1464. isFogS = false;
  1465. }
  1466. if (isDepthS)
  1467. {
  1468. isDepth = GUI.Toggle(new Rect(GetPix(8),
  1469. GetPix(412),
  1470. GetPix(40),
  1471. GetPix(20)),
  1472. isDepth,
  1473. "有効",
  1474. guistyle6);
  1475. if (!isDepth)
  1476. {
  1477. GUI.enabled = false;
  1478. }
  1479. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  1480. "焦点距離",
  1481. guistyle2);
  1482. depth1 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1483. GetPix(445),
  1484. GetPix(192),
  1485. GetPix(20)),
  1486. depth1,
  1487. 0f,
  1488. 10f);
  1489. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  1490. "焦点領域サイズ",
  1491. guistyle2);
  1492. depth2 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1493. GetPix(470),
  1494. GetPix(92),
  1495. GetPix(20)),
  1496. depth2,
  1497. 0f,
  1498. 2f);
  1499. GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
  1500. "カメラ絞り",
  1501. guistyle2);
  1502. depth3 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1503. GetPix(470),
  1504. GetPix(92),
  1505. GetPix(20)),
  1506. depth3,
  1507. 0f,
  1508. 60f);
  1509. GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
  1510. "ブレ",
  1511. guistyle2);
  1512. depth4 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1513. GetPix(495),
  1514. GetPix(92),
  1515. GetPix(20)),
  1516. depth4,
  1517. 0f,
  1518. 10f);
  1519. isDepthA = GUI.Toggle(new Rect(GetPix(110),
  1520. GetPix(491),
  1521. GetPix(100),
  1522. GetPix(20)),
  1523. isDepthA,
  1524. "深度表示",
  1525. guistyle6);
  1526. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  1527. && !bgmCombo.isClickedComboButton)
  1528. {
  1529. GUI.enabled = true;
  1530. }
  1531. }
  1532. if (GUI.Toggle(new Rect(GetPix(114), GetPix(391), GetPix(40), GetPix(20)),
  1533. isBlurS,
  1534. "光学",
  1535. guistyle6))
  1536. {
  1537. isBloomS = false;
  1538. isDepthS = false;
  1539. isBlurS = true;
  1540. isFogS = false;
  1541. }
  1542. if (isBlurS)
  1543. {
  1544. isBlur = GUI.Toggle(new Rect(GetPix(8),
  1545. GetPix(412),
  1546. GetPix(40),
  1547. GetPix(20)),
  1548. isBlur,
  1549. "有効",
  1550. guistyle6);
  1551. if (!isBlur)
  1552. {
  1553. GUI.enabled = false;
  1554. }
  1555. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  1556. "強さ",
  1557. guistyle2);
  1558. blur1 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1559. GetPix(445),
  1560. GetPix(92),
  1561. GetPix(20)),
  1562. blur1,
  1563. -40f,
  1564. 70f);
  1565. GUI.Label(new Rect(GetPix(108), GetPix(430), GetPix(100), GetPix(25)),
  1566. "ブラー",
  1567. guistyle2);
  1568. blur2 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1569. GetPix(445),
  1570. GetPix(92),
  1571. GetPix(20)),
  1572. blur2,
  1573. 0f,
  1574. 5f);
  1575. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  1576. "ブレ",
  1577. guistyle2);
  1578. blur3 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1579. GetPix(470),
  1580. GetPix(92),
  1581. GetPix(20)),
  1582. blur3,
  1583. 0f,
  1584. 40f);
  1585. GUI.Label(new Rect(GetPix(108), GetPix(455), GetPix(100), GetPix(25)),
  1586. "色収差",
  1587. guistyle2);
  1588. blur4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1589. GetPix(470),
  1590. GetPix(92),
  1591. GetPix(20)),
  1592. blur4,
  1593. -30f,
  1594. 30f);
  1595. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  1596. && !bgmCombo.isClickedComboButton)
  1597. {
  1598. GUI.enabled = true;
  1599. }
  1600. }
  1601. if (GUI.Toggle(new Rect(GetPix(155), GetPix(391), GetPix(60), GetPix(20)),
  1602. isFogS,
  1603. "フォグ",
  1604. guistyle6))
  1605. {
  1606. isBloomS = false;
  1607. isDepthS = false;
  1608. isBlurS = false;
  1609. isFogS = true;
  1610. }
  1611. if (isFogS)
  1612. {
  1613. isFog = GUI.Toggle(new Rect(GetPix(8),
  1614. GetPix(412),
  1615. GetPix(40),
  1616. GetPix(20)),
  1617. isFog,
  1618. "有効",
  1619. guistyle6);
  1620. if (!isFog)
  1621. {
  1622. GUI.enabled = false;
  1623. }
  1624. GUI.Label(new Rect(GetPix(110), GetPix(406), GetPix(100), GetPix(24)),
  1625. "発生距離",
  1626. guistyle2);
  1627. fog1 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1628. GetPix(420),
  1629. GetPix(92),
  1630. GetPix(20)),
  1631. fog1,
  1632. 0f,
  1633. 30f);
  1634. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  1635. "密度",
  1636. guistyle2);
  1637. fog2 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1638. GetPix(445),
  1639. GetPix(92),
  1640. GetPix(20)),
  1641. fog2,
  1642. 0f,
  1643. 10f);
  1644. GUI.Label(new Rect(GetPix(110), GetPix(430), GetPix(100), GetPix(25)),
  1645. "強度",
  1646. guistyle2);
  1647. fog3 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1648. GetPix(445),
  1649. GetPix(92),
  1650. GetPix(20)),
  1651. fog3,
  1652. -5f,
  1653. 20f);
  1654. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  1655. "高さ",
  1656. guistyle2);
  1657. fog4 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1658. GetPix(470),
  1659. GetPix(92),
  1660. GetPix(20)),
  1661. fog4,
  1662. -10f,
  1663. 10f);
  1664. GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
  1665. "赤",
  1666. guistyle2);
  1667. fog5 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1668. GetPix(470),
  1669. GetPix(92),
  1670. GetPix(20)),
  1671. fog5,
  1672. 0f,
  1673. 1f);
  1674. GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
  1675. "緑",
  1676. guistyle2);
  1677. fog6 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1678. GetPix(495),
  1679. GetPix(92),
  1680. GetPix(20)),
  1681. fog6,
  1682. 0f,
  1683. 1f);
  1684. GUI.Label(new Rect(GetPix(110), GetPix(480), GetPix(100), GetPix(25)),
  1685. "青",
  1686. guistyle2);
  1687. fog7 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1688. GetPix(495),
  1689. GetPix(92),
  1690. GetPix(20)),
  1691. fog7,
  1692. 0f,
  1693. 1f);
  1694. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  1695. && !bgmCombo.isClickedComboButton)
  1696. {
  1697. GUI.enabled = true;
  1698. }
  1699. }
  1700. isSepian = GUI.Toggle(new Rect(GetPix(5),
  1701. GetPix(515),
  1702. GetPix(80),
  1703. GetPix(20)),
  1704. isSepian,
  1705. "セピア",
  1706. guistyle6);
  1707. GUI.Label(new Rect(GetPix(108), GetPix(512), GetPix(100), GetPix(25)),
  1708. "ぼかし",
  1709. guistyle2);
  1710. bokashi = GUI.HorizontalSlider(new Rect(GetPix(108),
  1711. GetPix(527),
  1712. GetPix(92),
  1713. GetPix(20)),
  1714. bokashi,
  1715. 0f,
  1716. 18f);
  1717. if (GUI.Toggle(new Rect(GetPix(5), GetPix(545), GetPix(80), GetPix(20)),
  1718. isHairSetting,
  1719. "髪の設定",
  1720. guistyle6))
  1721. {
  1722. isHairSetting = true;
  1723. isSkirtSetting = false;
  1724. }
  1725. if (isHairSetting)
  1726. {
  1727. bool flag3 = GUI.Toggle(new Rect(GetPix(5),
  1728. GetPix(566),
  1729. GetPix(40),
  1730. GetPix(20)),
  1731. isKamiyure,
  1732. "有効",
  1733. guistyle6);
  1734. if (isKamiyure != flag3)
  1735. {
  1736. isKamiyure = flag3;
  1737. if (isKamiyure)
  1738. {
  1739. Preferences["config"]["hair_setting"].Value = "true";
  1740. Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
  1741. Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
  1742. Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
  1743. SaveConfig();
  1744. }
  1745. else
  1746. {
  1747. Preferences["config"]["hair_setting"].Value = "false";
  1748. SaveConfig();
  1749. for (int j = 0; j < maidCnt; j++)
  1750. {
  1751. for (int k = 0; k < maidArray[j].body0.goSlot.Count; k++)
  1752. {
  1753. if (k >= 3 && k <= 6)
  1754. {
  1755. if (maidArray[j].body0.goSlot[k].obj != null)
  1756. {
  1757. DynamicBone component = maidArray[j].body0.goSlot[k].obj.GetComponent<DynamicBone>();
  1758. if (component != null)
  1759. {
  1760. component.m_Damping = 0.6f;
  1761. component.m_Elasticity = 1f;
  1762. if (k == 5)
  1763. {
  1764. component.m_Elasticity = 0.05f;
  1765. }
  1766. component.m_Radius = 0.02f;
  1767. component.UpdateParameters();
  1768. }
  1769. }
  1770. }
  1771. }
  1772. }
  1773. }
  1774. }
  1775. if (!isKamiyure)
  1776. {
  1777. GUI.enabled = false;
  1778. }
  1779. GUI.Label(new Rect(GetPix(108), GetPix(565), GetPix(100), GetPix(25)),
  1780. "当たり判定半径",
  1781. guistyle2);
  1782. float num4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1783. GetPix(579),
  1784. GetPix(92),
  1785. GetPix(20)),
  1786. kamiyure4,
  1787. 0f,
  1788. 0.04f);
  1789. if (kamiyure4 != num4)
  1790. {
  1791. kamiyure4 = num4;
  1792. Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
  1793. SaveConfig();
  1794. }
  1795. GUI.Label(new Rect(GetPix(108), GetPix(590), GetPix(100), GetPix(25)),
  1796. "減衰率",
  1797. guistyle2);
  1798. float num5 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1799. GetPix(604),
  1800. GetPix(92),
  1801. GetPix(20)),
  1802. kamiyure2,
  1803. 0.2f,
  1804. 1f);
  1805. if (kamiyure2 != num5)
  1806. {
  1807. kamiyure2 = num5;
  1808. Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
  1809. SaveConfig();
  1810. }
  1811. GUI.Label(new Rect(GetPix(10), GetPix(590), GetPix(100), GetPix(25)),
  1812. "復元率",
  1813. guistyle2);
  1814. float num6 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1815. GetPix(604),
  1816. GetPix(92),
  1817. GetPix(20)),
  1818. kamiyure3,
  1819. 0f,
  1820. 2f);
  1821. if (kamiyure3 != num6)
  1822. {
  1823. kamiyure3 = num6;
  1824. Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
  1825. SaveConfig();
  1826. }
  1827. GUI.enabled = true;
  1828. }
  1829. if (GUI.Toggle(new Rect(GetPix(105), GetPix(545), GetPix(100), GetPix(20)),
  1830. isSkirtSetting,
  1831. "スカート設定",
  1832. guistyle6))
  1833. {
  1834. isHairSetting = false;
  1835. isSkirtSetting = true;
  1836. }
  1837. if (isSkirtSetting)
  1838. {
  1839. bool flag4 = GUI.Toggle(new Rect(GetPix(5),
  1840. GetPix(566),
  1841. GetPix(40),
  1842. GetPix(20)),
  1843. isSkirtyure,
  1844. "有効",
  1845. guistyle6);
  1846. if (isSkirtyure != flag4)
  1847. {
  1848. isSkirtyure = flag4;
  1849. if (isSkirtyure)
  1850. {
  1851. Preferences["config"]["skirt_setting"].Value = "true";
  1852. Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
  1853. Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
  1854. Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
  1855. SaveConfig();
  1856. }
  1857. else
  1858. {
  1859. Preferences["config"]["skirt_setting"].Value = "false";
  1860. SaveConfig();
  1861. for (int j = 0; j < maidCnt; j++)
  1862. {
  1863. for (int k = 0; k < maidArray[j].body0.goSlot.Count; k++)
  1864. {
  1865. if (maidArray[j].body0.goSlot[k].obj != null)
  1866. {
  1867. DynamicSkirtBone fieldValue =
  1868. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[k].bonehair3,
  1869. "m_SkirtBone");
  1870. if (fieldValue != null)
  1871. {
  1872. fieldValue.m_fPanierForce = 0.05f;
  1873. fieldValue.m_fPanierForceDistanceThreshold = 0.1f;
  1874. fieldValue.m_fRegDefaultRadius = 0.1f;
  1875. }
  1876. }
  1877. }
  1878. }
  1879. }
  1880. }
  1881. if (!isSkirtyure)
  1882. {
  1883. GUI.enabled = false;
  1884. }
  1885. GUI.Label(new Rect(GetPix(108), GetPix(565), GetPix(100), GetPix(25)),
  1886. "足側カプセル半径",
  1887. guistyle2);
  1888. float num4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1889. GetPix(579),
  1890. GetPix(92),
  1891. GetPix(20)),
  1892. skirtyure4,
  1893. 0f,
  1894. 0.2f);
  1895. if (skirtyure4 != num4)
  1896. {
  1897. skirtyure4 = num4;
  1898. Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
  1899. SaveConfig();
  1900. }
  1901. GUI.Label(new Rect(GetPix(108), GetPix(590), GetPix(100), GetPix(25)),
  1902. "足との距離パニエ力",
  1903. guistyle2);
  1904. float num5 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1905. GetPix(604),
  1906. GetPix(92),
  1907. GetPix(20)),
  1908. skirtyure2,
  1909. 0f,
  1910. 0.2f);
  1911. if (skirtyure2 != num5)
  1912. {
  1913. skirtyure2 = num5;
  1914. Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
  1915. SaveConfig();
  1916. }
  1917. GUI.Label(new Rect(GetPix(10), GetPix(590), GetPix(100), GetPix(25)),
  1918. "パニエ力",
  1919. guistyle2);
  1920. float num6 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1921. GetPix(604),
  1922. GetPix(92),
  1923. GetPix(20)),
  1924. skirtyure3,
  1925. 0f,
  1926. 0.1f);
  1927. if (skirtyure3 != num6)
  1928. {
  1929. skirtyure3 = num6;
  1930. Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
  1931. SaveConfig();
  1932. }
  1933. GUI.enabled = true;
  1934. }
  1935. GUI.enabled = true;
  1936. GUI.DrawTexture(new Rect(GetPix(5), GetPix(389), GetPix(195), 2f), line1);
  1937. GUI.DrawTexture(new Rect(GetPix(5), GetPix(389), GetPix(195), 1f), line2);
  1938. if (doguCombo.isClickedComboButton || parCombo.isClickedComboButton || bgCombo.isClickedComboButton
  1939. || bgmCombo.isClickedComboButton)
  1940. {
  1941. GUI.enabled = false;
  1942. }
  1943. GUI.DrawTexture(new Rect(GetPix(5), GetPix(176), GetPix(195), 2f), line1);
  1944. GUI.DrawTexture(new Rect(GetPix(5), GetPix(176), GetPix(195), 1f), line2);
  1945. GUI.Label(new Rect(GetPix(8), GetPix(187), GetPix(100), GetPix(25)),
  1946. "照明",
  1947. guistyle2);
  1948. listStyle3.padding.top = GetPix(3);
  1949. listStyle3.padding.bottom = GetPix(2);
  1950. listStyle3.fontSize = GetPix(13);
  1951. int num7 = lightCombo.List(new Rect(GetPix(34),
  1952. GetPix(185),
  1953. GetPix(78),
  1954. GetPix(23)),
  1955. lightComboList[selectLightIndex].text,
  1956. lightComboList,
  1957. guistyle4,
  1958. "box",
  1959. listStyle3);
  1960. if (num7 != selectLightIndex)
  1961. {
  1962. selectLightIndex = num7;
  1963. isIdx1 = false;
  1964. isIdx2 = false;
  1965. isIdx3 = false;
  1966. isIdx4 = false;
  1967. }
  1968. if (GUI.Button(new Rect(GetPix(115), GetPix(185), GetPix(35), GetPix(23)),
  1969. "追加",
  1970. guistyle3))
  1971. {
  1972. GameObject gameObject = new GameObject("Light");
  1973. gameObject.AddComponent<Light>();
  1974. lightList.Add(gameObject);
  1975. lightColorR.Add(1f);
  1976. lightColorG.Add(1f);
  1977. lightColorB.Add(1f);
  1978. lightIndex.Add(0);
  1979. lightX.Add(40f);
  1980. lightY.Add(180f);
  1981. lightAkarusa.Add(0.95f);
  1982. lightKage.Add(0.098f);
  1983. lightRange.Add(50f);
  1984. gameObject.transform.position = GameMain.Instance.MainLight.transform.position;
  1985. selectLightIndex = lightList.Count - 1;
  1986. lightComboList = new GUIContent[lightList.Count];
  1987. for (int i = 0; i < lightList.Count; i++)
  1988. {
  1989. if (i == 0)
  1990. {
  1991. lightComboList[i] = new GUIContent("メイン");
  1992. }
  1993. else
  1994. {
  1995. lightComboList[i] = new GUIContent("追加" + i);
  1996. }
  1997. }
  1998. lightCombo.selectedItemIndex = selectLightIndex;
  1999. gameObject.GetComponent<Light>().intensity = 0.95f;
  2000. gameObject.GetComponent<Light>().spotAngle = 50f;
  2001. gameObject.GetComponent<Light>().range = 10f;
  2002. gameObject.GetComponent<Light>().type = LightType.Directional;
  2003. gameObject.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  2004. if (gLight[selectLightIndex] == null)
  2005. {
  2006. gLight[selectLightIndex] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  2007. Material material = new Material(Shader.Find("Transparent/Diffuse"))
  2008. {
  2009. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  2010. };
  2011. gLight[selectLightIndex].GetComponent<Renderer>().material = material;
  2012. gLight[selectLightIndex].layer = 8;
  2013. gLight[selectLightIndex].GetComponent<Renderer>().enabled = false;
  2014. gLight[selectLightIndex].SetActive(false);
  2015. gLight[selectLightIndex].transform.position = gameObject.transform.position;
  2016. mLight[selectLightIndex] = gLight[selectLightIndex].AddComponent<MouseDrag6>();
  2017. mLight[selectLightIndex].obj = gLight[selectLightIndex];
  2018. mLight[selectLightIndex].maid = gameObject.gameObject;
  2019. mLight[selectLightIndex].angles = gameObject.gameObject.transform.eulerAngles;
  2020. gLight[selectLightIndex].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  2021. mLight[selectLightIndex].ido = 1;
  2022. mLight[selectLightIndex].isScale = false;
  2023. }
  2024. }
  2025. if (GUI.Button(new Rect(GetPix(153), GetPix(185), GetPix(23), GetPix(23)),
  2026. "R",
  2027. guistyle3))
  2028. {
  2029. for (int i = 1; i < lightList.Count; i++)
  2030. {
  2031. Destroy(lightList[i]);
  2032. }
  2033. lightIndex = new List<int>
  2034. {
  2035. 0
  2036. };
  2037. lightColorR = new List<float>
  2038. {
  2039. 1f
  2040. };
  2041. lightColorG = new List<float>
  2042. {
  2043. 1f
  2044. };
  2045. lightColorB = new List<float>
  2046. {
  2047. 1f
  2048. };
  2049. lightX = new List<float>
  2050. {
  2051. 40f
  2052. };
  2053. lightY = new List<float>
  2054. {
  2055. 180f
  2056. };
  2057. lightAkarusa = new List<float>
  2058. {
  2059. 0.95f
  2060. };
  2061. lightKage = new List<float>
  2062. {
  2063. 0.098f
  2064. };
  2065. lightRange = new List<float>
  2066. {
  2067. 50f
  2068. };
  2069. lightCombo.selectedItemIndex = 0;
  2070. lightList = new List<GameObject>
  2071. {
  2072. GameMain.Instance.MainLight.gameObject
  2073. };
  2074. lightComboList = new GUIContent[lightList.Count];
  2075. for (int i = 0; i < lightList.Count; i++)
  2076. {
  2077. if (i == 0)
  2078. {
  2079. lightComboList[i] = new GUIContent("メイン");
  2080. }
  2081. else
  2082. {
  2083. lightComboList[i] = new GUIContent("追加" + i);
  2084. }
  2085. }
  2086. selectLightIndex = 0;
  2087. GameMain.Instance.MainLight.Reset();
  2088. GameMain.Instance.MainLight.SetIntensity(0.95f);
  2089. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  2090. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  2091. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  2092. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  2093. bgObject.SetActive(true);
  2094. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  2095. isIdx1 = false;
  2096. isIdx2 = false;
  2097. isIdx3 = false;
  2098. isIdx4 = false;
  2099. }
  2100. GUI.enabled = true;
  2101. if (doguCombo.isClickedComboButton || bgCombo.isClickedComboButton || bgmCombo.isClickedComboButton)
  2102. {
  2103. GUI.enabled = false;
  2104. }
  2105. listStyle3.padding.top = GetPix(0);
  2106. listStyle3.padding.bottom = GetPix(0);
  2107. listStyle3.fontSize = GetPix(12);
  2108. GUI.Label(new Rect(GetPix(8), GetPix(116), GetPix(150), GetPix(25)),
  2109. "大道具2",
  2110. guistyle2);
  2111. parIndex = parCombo.List(new Rect(GetPix(51),
  2112. GetPix(113),
  2113. GetPix(100),
  2114. GetPix(23)),
  2115. parComboList[parIndex].text,
  2116. parComboList,
  2117. guistyle4,
  2118. "box",
  2119. listStyle3);
  2120. if (GUI.Button(new Rect(GetPix(156), GetPix(113), GetPix(38), GetPix(23)),
  2121. "追加",
  2122. guistyle3))
  2123. {
  2124. GameObject gameObject2 = null;
  2125. bool flag5 = false;
  2126. bool flag6 = false;
  2127. if (parArray[parIndex].Contains("#"))
  2128. {
  2129. string[] array3 = parArray[parIndex].Split(new char[] { '#' });
  2130. gameObject2 = GameMain.Instance.BgMgr.CreateAssetBundle(array3[1]);
  2131. if (gameObject2 != null)
  2132. {
  2133. gameObject2 = Instantiate(gameObject2);
  2134. MeshRenderer[] componentsInChildren = gameObject2.GetComponentsInChildren<MeshRenderer>();
  2135. for (int k = 0; k < componentsInChildren.Length; k++)
  2136. {
  2137. if (componentsInChildren[k] != null)
  2138. {
  2139. componentsInChildren[k].shadowCastingMode = ShadowCastingMode.Off;
  2140. }
  2141. }
  2142. }
  2143. flag5 = true;
  2144. if (!parArray[parIndex].Contains("Odogu_"))
  2145. {
  2146. flag6 = true;
  2147. }
  2148. doguBObject.Add(gameObject2);
  2149. }
  2150. else if (!parArray[parIndex].StartsWith("mirror") && parArray[parIndex].IndexOf(":") < 0)
  2151. {
  2152. Object @object = Resources.Load("Prefab/" + parArray[parIndex]);
  2153. gameObject2 = Instantiate(@object) as GameObject;
  2154. doguBObject.Add(gameObject2);
  2155. }
  2156. else if (parArray[parIndex].StartsWith("mirror"))
  2157. {
  2158. Material material2 = new Material(Shader.Find("Mirror"));
  2159. GameObject gameObject3 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  2160. gameObject3.GetComponent<Renderer>().material = material2;
  2161. gameObject3.AddComponent<MirrorReflection2>();
  2162. MirrorReflection2 component2 = gameObject3.GetComponent<MirrorReflection2>();
  2163. component2.m_TextureSize = 2048;
  2164. component2.m_ClipPlaneOffset = 0.07f;
  2165. gameObject3.GetComponent<Renderer>().enabled = true;
  2166. gameObject2 = gameObject3;
  2167. doguBObject.Add(gameObject2);
  2168. }
  2169. else
  2170. {
  2171. string[] array3 = parArray[parIndex].Split(new char[] { ':' });
  2172. Object @object = GameMain.Instance.BgMgr.CreateAssetBundle(array3[0]);
  2173. if (@object == null)
  2174. {
  2175. @object = Resources.Load("BG/" + array3[0]);
  2176. }
  2177. GameObject gameObject4 = Instantiate(@object) as GameObject;
  2178. int num8 = 0;
  2179. int.TryParse(array3[1], out int num9);
  2180. foreach (object obj in gameObject4.transform)
  2181. {
  2182. Transform transform = (Transform)obj;
  2183. if (num9 == num8)
  2184. {
  2185. gameObject2 = transform.gameObject;
  2186. break;
  2187. }
  2188. num8++;
  2189. }
  2190. doguBObject.Add(gameObject2);
  2191. gameObject2.transform.parent = null;
  2192. Destroy(gameObject4);
  2193. gameObject4.SetActive(false);
  2194. }
  2195. gameObject2.name = parArray[parIndex];
  2196. Vector3 zero = Vector3.zero;
  2197. Vector3 zero2 = Vector3.zero;
  2198. switch (parIndex)
  2199. {
  2200. case 0:
  2201. zero.z = -0.6f;
  2202. zero.y = 0.96f;
  2203. zero2.z = 180f;
  2204. zero2.x = -90f;
  2205. gameObject2.transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  2206. break;
  2207. case 1:
  2208. zero.z = -0.6f;
  2209. zero.y = 0.96f;
  2210. zero2.z = 180f;
  2211. zero2.x = -90f;
  2212. gameObject2.transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  2213. break;
  2214. case 2:
  2215. zero.z = -0.6f;
  2216. zero.y = 0.85f;
  2217. zero2.z = 180f;
  2218. zero2.x = -90f;
  2219. gameObject2.transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  2220. break;
  2221. case 3:
  2222. case 4:
  2223. case 5:
  2224. case 6:
  2225. case 7:
  2226. case 8:
  2227. case 9:
  2228. case 10:
  2229. case 11:
  2230. case 12:
  2231. case 13:
  2232. case 14:
  2233. case 15:
  2234. case 16:
  2235. case 17:
  2236. zero.z = 0.5f;
  2237. zero2.x = -90f;
  2238. break;
  2239. }
  2240. if (flag5)
  2241. {
  2242. zero.z = 0.4f;
  2243. if (flag6)
  2244. {
  2245. zero2.x = -90f;
  2246. }
  2247. }
  2248. if (gameObject2.name == "Salon_Entrance:3" || gameObject2.name == "Salon_Entrance:4"
  2249. || gameObject2.name == "Salon_Entrance:1"
  2250. || gameObject2.name == "Salon_Entrance:2"
  2251. || gameObject2.name == "Salon_Entrance:0" || gameObject2.name == "Shitsumu:23"
  2252. || gameObject2.name == "Shitsumu_Night:23")
  2253. {
  2254. zero.z = 0.5f;
  2255. zero2.x = -90f;
  2256. }
  2257. if (gameObject2.name == "Pool:26")
  2258. {
  2259. zero.z = 0.5f;
  2260. zero2.x = -90f;
  2261. zero2.z = 90f;
  2262. zero.y = 0.15f;
  2263. }
  2264. if (gameObject2.name == "Particle/pstarY_act2")
  2265. {
  2266. zero2.y = 90f;
  2267. }
  2268. gameObject2.transform.localPosition = zero;
  2269. gameObject2.transform.localRotation = Quaternion.Euler(zero2);
  2270. doguCnt = doguBObject.Count - 1;
  2271. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  2272. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  2273. gDogu[doguCnt].layer = 8;
  2274. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  2275. gDogu[doguCnt].SetActive(false);
  2276. gDogu[doguCnt].transform.position = gameObject2.transform.position;
  2277. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  2278. mDogu[doguCnt].obj = gDogu[doguCnt];
  2279. mDogu[doguCnt].maid = gameObject2;
  2280. mDogu[doguCnt].angles = gameObject2.transform.eulerAngles;
  2281. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  2282. mDogu[doguCnt].ido = 1;
  2283. mDogu[doguCnt].isScale = false;
  2284. if (gameObject2.name == "Particle/pLineY")
  2285. {
  2286. mDogu[doguCnt].count = 180;
  2287. gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
  2288. }
  2289. if (gameObject2.name == "Particle/pLineP02")
  2290. {
  2291. mDogu[doguCnt].count = 115;
  2292. gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
  2293. }
  2294. if (gameObject2.name == "Particle/pLine_act2")
  2295. {
  2296. mDogu[doguCnt].count = 90;
  2297. gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
  2298. }
  2299. if (gameObject2.name == "Particle/pHeart01")
  2300. {
  2301. mDogu[doguCnt].count = 77;
  2302. }
  2303. if (parIndex < 3)
  2304. {
  2305. mDogu[doguCnt].isScale = true;
  2306. mDogu[doguCnt].isScale2 = true;
  2307. mDogu[doguCnt].scale2 = gameObject2.transform.localScale;
  2308. if (parIndex == 0)
  2309. {
  2310. mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 5f,
  2311. gameObject2.transform.localScale.y * 5f,
  2312. gameObject2.transform.localScale.z * 5f);
  2313. }
  2314. if (parIndex == 1)
  2315. {
  2316. mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 10f,
  2317. gameObject2.transform.localScale.y * 10f,
  2318. gameObject2.transform.localScale.z * 10f);
  2319. }
  2320. if (parIndex == 2)
  2321. {
  2322. mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 33f,
  2323. gameObject2.transform.localScale.y * 33f,
  2324. gameObject2.transform.localScale.z * 33f);
  2325. }
  2326. }
  2327. if (gameObject2.GetComponent<Collider>() != null)
  2328. {
  2329. gameObject2.GetComponent<Collider>().enabled = false;
  2330. }
  2331. }
  2332. GUI.enabled = true;
  2333. if (bgCombo.isClickedComboButton || bgmCombo.isClickedComboButton)
  2334. {
  2335. GUI.enabled = false;
  2336. }
  2337. GUI.Label(new Rect(GetPix(8), GetPix(88), GetPix(100), GetPix(25)),
  2338. "大道具1",
  2339. guistyle2);
  2340. doguBIndex =
  2341. doguCombo.List(new Rect(GetPix(51),
  2342. GetPix(85),
  2343. GetPix(100),
  2344. GetPix(23)),
  2345. doguComboList[doguBIndex].text,
  2346. doguComboList,
  2347. guistyle4,
  2348. "box",
  2349. listStyle3);
  2350. if (GUI.Button(new Rect(GetPix(156), GetPix(85), GetPix(38), GetPix(23)),
  2351. "追加",
  2352. guistyle3))
  2353. {
  2354. GameObject gameObject2 = null;
  2355. if (doguDict.TryGetValue(doguBArray[doguBIndex], out PhotoBGObjectData objResult))
  2356. {
  2357. if (!string.IsNullOrEmpty(objResult.create_prefab_name))
  2358. {
  2359. Object tmpObj = Resources.Load("Prefab/" + objResult.create_prefab_name);
  2360. if (tmpObj == null)
  2361. {
  2362. gameObject2 = null;
  2363. }
  2364. else
  2365. {
  2366. gameObject2 = Instantiate(tmpObj) as GameObject;
  2367. }
  2368. }
  2369. else if (!string.IsNullOrEmpty(objResult.create_asset_bundle_name))
  2370. {
  2371. GameObject gameObject3 = GameMain.Instance.BgMgr.CreateAssetBundle(objResult.create_asset_bundle_name);
  2372. if (gameObject3 == null)
  2373. {
  2374. gameObject2 = null;
  2375. }
  2376. else
  2377. {
  2378. gameObject2 = Instantiate(gameObject3);
  2379. }
  2380. }
  2381. else if (!string.IsNullOrEmpty(objResult.direct_file))
  2382. {
  2383. BasePhotoCustomObject basePhotoCustomObject =
  2384. BasePhotoCustomObject.InstantiateFromFile(transform.gameObject, objResult.direct_file);
  2385. gameObject2 = basePhotoCustomObject.gameObject;
  2386. }
  2387. if (gameObject2 != null)
  2388. {
  2389. doguBObject.Add(gameObject2);
  2390. }
  2391. }
  2392. else if (!doguBArray[doguBIndex].StartsWith("mirror"))
  2393. {
  2394. Object @object;
  2395. if (doguBArray[doguBIndex].StartsWith("BG"))
  2396. {
  2397. string text2 = doguBArray[doguBIndex].Replace("BG", "");
  2398. @object = GameMain.Instance.BgMgr.CreateAssetBundle(text2);
  2399. if (@object == null)
  2400. {
  2401. @object = Resources.Load("BG/" + text2);
  2402. }
  2403. }
  2404. else
  2405. {
  2406. @object = Resources.Load("Prefab/" + doguBArray[doguBIndex]);
  2407. }
  2408. gameObject2 = Instantiate(@object) as GameObject;
  2409. doguBObject.Add(gameObject2);
  2410. }
  2411. else
  2412. {
  2413. Material material2 = new Material(Shader.Find("Mirror"));
  2414. GameObject gameObject3 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  2415. gameObject3.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  2416. gameObject3.GetComponent<Renderer>().material = material2;
  2417. gameObject3.AddComponent<MirrorReflection2>();
  2418. MirrorReflection2 component2 = gameObject3.GetComponent<MirrorReflection2>();
  2419. component2.m_TextureSize = 2048;
  2420. component2.m_ClipPlaneOffset = 0f;
  2421. gameObject3.GetComponent<Renderer>().enabled = true;
  2422. gameObject2 = gameObject3;
  2423. doguBObject.Add(gameObject2);
  2424. }
  2425. gameObject2.name = doguBArray[doguBIndex];
  2426. Vector3 zero = Vector3.zero;
  2427. Vector3 zero2 = Vector3.zero;
  2428. string text = gameObject2.name;
  2429. switch (text)
  2430. {
  2431. case "Odogu_XmasTreeMini_photo_ver":
  2432. zero.z = 0.6f;
  2433. gameObject2.transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  2434. foreach (object obj2 in gameObject2.transform)
  2435. {
  2436. Transform transform2 = (Transform)obj2;
  2437. if (transform2.GetComponent<Collider>() != null)
  2438. {
  2439. transform2.GetComponent<Collider>().enabled = false;
  2440. }
  2441. }
  2442. goto IL_A0BF;
  2443. case "Odogu_KadomatsuMini_photo_ver":
  2444. zero.z = 0.6f;
  2445. gameObject2.transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  2446. foreach (object obj3 in gameObject2.transform)
  2447. {
  2448. Transform transform2 = (Transform)obj3;
  2449. if (transform2.GetComponent<Collider>() != null)
  2450. {
  2451. transform2.GetComponent<Collider>().enabled = false;
  2452. }
  2453. }
  2454. goto IL_A0BF;
  2455. case "Odogu_ClassRoomDesk":
  2456. zero.z = 0.5f;
  2457. zero2.x = -90f;
  2458. goto IL_A0BF;
  2459. case "Odogu_SimpleTable":
  2460. zero.z = 0.5f;
  2461. zero2.x = -90f;
  2462. goto IL_A0BF;
  2463. case "Odogu_DildoBox":
  2464. zero.z = 0.5f;
  2465. zero2.x = -90f;
  2466. goto IL_A0BF;
  2467. case "PlayAreaOut":
  2468. zero.z = 0.5f;
  2469. zero.y = 0.2f;
  2470. goto IL_A0BF;
  2471. case "Odogu_Dresser_photo_ver":
  2472. GameObject.Find("Prim.00000000").GetComponent<Collider>().enabled = false;
  2473. GameObject.Find("Prim.00000001").GetComponent<Collider>().enabled = false;
  2474. GameObject.Find("Prim.00000002").GetComponent<Collider>().enabled = false;
  2475. GameObject.Find("Prim.00000004").GetComponent<Collider>().enabled = false;
  2476. goto IL_A0BF;
  2477. case "BGodogu_bbqgrill":
  2478. case "BGodogu_bucket":
  2479. case "BGodogu_coolerbox":
  2480. case "BGodogu_game_darts":
  2481. case "BGodogu_game_dartsboard":
  2482. case "BGodogu_nabe_huta":
  2483. case "BGodogu_nabe_water":
  2484. case "BGodogu_natumikan":
  2485. case "BGodogu_rb_chair":
  2486. case "BGodogu_rb_duck":
  2487. case "BGodogu_rb_obon":
  2488. case "BGodogu_rb_tokkuri":
  2489. case "BGodogu_saracorn":
  2490. case "BGodogu_saraimo":
  2491. case "BGodogu_saratomato":
  2492. case "BGodogu_sunanoshiro":
  2493. case "BGodogu_sunanoyama":
  2494. case "BGodogu_tsutsuhanabi":
  2495. case "BGodogu_ukiwa":
  2496. case "BGodogu_vf_crops_corn":
  2497. case "BGodogu_vf_crops_gekkabijin":
  2498. case "BGodogu_vf_crops_gekkabijinflower":
  2499. case "BGodogu_vf_crops_himawari":
  2500. case "BGodogu_vf_crops_natsumikan":
  2501. case "BGodogu_vf_crops_suika":
  2502. case "BGodogu_vf_crops_zakuro":
  2503. case "BGodogu_villa_table":
  2504. case "BGodogu_villa_tvrimocon":
  2505. case "BGodogu_villabr_sideboard":
  2506. case "BGOdogu_Game_Nei_USB":
  2507. case "BGOdogu_Game_Wanage":
  2508. case "BGOdogu_Game_Wa":
  2509. case "BGodogu_pafe":
  2510. case "BGodogu_furaidopoteto":
  2511. case "BGodogu_karaoketable":
  2512. case "BGodogu_omuriceh":
  2513. case "BGodogu_omuricekao1":
  2514. case "BGodogu_omuricekao2":
  2515. case "BGodogu_omuriceoppai":
  2516. case "BGodogu_kakigori":
  2517. case "BGodogu_pretzel_sara":
  2518. case "BGodogu_karaoke_box":
  2519. case "Odogu_StandMike":
  2520. case "Odogu_StandMikeBase":
  2521. case "Odogu_HeroineChair_muku":
  2522. case "Odogu_HeroineChair_mazime":
  2523. case "Odogu_HeroineChair_rindere":
  2524. case "Odogu_HeroineChair_tsumdere":
  2525. case "Odogu_HeroineChair_cooldere":
  2526. case "Odogu_HeroineChair_junshin":
  2527. case "Odogu_TabletPC":
  2528. case "Odogu_Styluspen_black":
  2529. case "Odogu_Styluspen_white":
  2530. case "Odogu_Styluspen_red":
  2531. case "Odogu_Styluspen_blue":
  2532. case "Odogu_Styluspen_yellow":
  2533. case "Odogu_Styluspen_green":
  2534. case "Odogu_Omurice1":
  2535. case "Odogu_Omurice3":
  2536. case "Odogu_OmuriceH":
  2537. case "Odogu_OmuriceKao1":
  2538. case "Odogu_OmuriceKao2":
  2539. case "Odogu_OmuriceOppai":
  2540. case "Odogu_AcquaPazza":
  2541. case "Odogu_Sandwich":
  2542. case "Odogu_vichyssoise":
  2543. case "Odogu_BirthdayCake":
  2544. case "Odogu_Shortcake":
  2545. case "Odogu_MontBlanc":
  2546. case "Odogu_Pafe":
  2547. case "Odogu_Smoothie_Red":
  2548. case "Odogu_Smoothie_Green":
  2549. case "Odogu_Cocktail_Red":
  2550. case "Odogu_Cocktail_Blue":
  2551. case "Odogu_Cocktail_Yellow":
  2552. case "Odogu_Coffiecup":
  2553. case "Odogu_WineBottle(cap_off)":
  2554. case "Odogu_WineBottle(cap_on)":
  2555. case "Odogu_Jyouro":
  2556. case "Odogu_Planter_Red":
  2557. case "Odogu_Planter_Lightblue":
  2558. case "Odogu_MariGold":
  2559. case "Odogu_CasinoChip_10":
  2560. case "Odogu_CasinoChip_100":
  2561. case "Odogu_CasinoChip_1000":
  2562. case "Odogu_CardShooter":
  2563. case "Odogu_CardsDeck":
  2564. case "Odogu_Card_s1":
  2565. case "Odogu_Card_s2":
  2566. case "Odogu_Card_s3":
  2567. case "Odogu_Card_s4":
  2568. case "Odogu_Card_s5":
  2569. case "Odogu_Card_s6":
  2570. case "Odogu_Card_s7":
  2571. case "Odogu_Card_s8":
  2572. case "Odogu_Card_s9":
  2573. case "Odogu_Card_s10":
  2574. case "Odogu_Card_s11":
  2575. case "Odogu_Card_s12":
  2576. case "Odogu_Card_s13":
  2577. case "Odogu_Card_h1":
  2578. case "Odogu_Card_h2":
  2579. case "Odogu_Card_h3":
  2580. case "Odogu_Card_h4":
  2581. case "Odogu_Card_h5":
  2582. case "Odogu_Card_h6":
  2583. case "Odogu_Card_h7":
  2584. case "Odogu_Card_h8":
  2585. case "Odogu_Card_h9":
  2586. case "Odogu_Card_h10":
  2587. case "Odogu_Card_h11":
  2588. case "Odogu_Card_h12":
  2589. case "Odogu_Card_h13":
  2590. case "Odogu_Card_d1":
  2591. case "Odogu_Card_d2":
  2592. case "Odogu_Card_d3":
  2593. case "Odogu_Card_d4":
  2594. case "Odogu_Card_d5":
  2595. case "Odogu_Card_d6":
  2596. case "Odogu_Card_d7":
  2597. case "Odogu_Card_d8":
  2598. case "Odogu_Card_d9":
  2599. case "Odogu_Card_d10":
  2600. case "Odogu_Card_d11":
  2601. case "Odogu_Card_d12":
  2602. case "Odogu_Card_d13":
  2603. case "Odogu_Card_c1":
  2604. case "Odogu_Card_c2":
  2605. case "Odogu_Card_c3":
  2606. case "Odogu_Card_c4":
  2607. case "Odogu_Card_c5":
  2608. case "Odogu_Card_c6":
  2609. case "Odogu_Card_c7":
  2610. case "Odogu_Card_c8":
  2611. case "Odogu_Card_c9":
  2612. case "Odogu_Card_c10":
  2613. case "Odogu_Card_c11":
  2614. case "Odogu_Card_c12":
  2615. case "Odogu_Card_c13":
  2616. case "Odogu_Card_joker":
  2617. zero.z = 0.5f;
  2618. zero2.x = -90f;
  2619. goto IL_A0BF;
  2620. }
  2621. zero.z = 0.5f;
  2622. if (gameObject2.name.StartsWith("Odogu_"))
  2623. {
  2624. foreach (object obj4 in gameObject2.transform)
  2625. {
  2626. Transform transform2 = (Transform)obj4;
  2627. if (transform2.GetComponent<Collider>() != null)
  2628. {
  2629. transform2.GetComponent<Collider>().enabled = false;
  2630. }
  2631. }
  2632. }
  2633. else if (gameObject2.GetComponent<Collider>() != null)
  2634. {
  2635. gameObject2.GetComponent<Collider>().enabled = false;
  2636. }
  2637. IL_A0BF:
  2638. gameObject2.transform.localPosition = zero;
  2639. gameObject2.transform.localRotation = Quaternion.Euler(zero2);
  2640. doguCnt = doguBObject.Count - 1;
  2641. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  2642. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  2643. gDogu[doguCnt].layer = 8;
  2644. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  2645. gDogu[doguCnt].SetActive(false);
  2646. gDogu[doguCnt].transform.position = gameObject2.transform.position;
  2647. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  2648. mDogu[doguCnt].isScale = false;
  2649. mDogu[doguCnt].obj = gDogu[doguCnt];
  2650. mDogu[doguCnt].maid = gameObject2;
  2651. mDogu[doguCnt].angles = gameObject2.transform.eulerAngles;
  2652. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  2653. mDogu[doguCnt].ido = 1;
  2654. if (doguBIndex == 6 || doguBIndex == 7)
  2655. {
  2656. mDogu[doguCnt].isScale2 = true;
  2657. mDogu[doguCnt].scale2 = gameObject2.transform.localScale;
  2658. }
  2659. }
  2660. GUI.EndScrollView();
  2661. GUI.enabled = true;
  2662. if (bgmCombo.isClickedComboButton)
  2663. {
  2664. GUI.enabled = false;
  2665. }
  2666. listStyle3.padding.top = GetPix(1);
  2667. listStyle3.padding.bottom = GetPix(0);
  2668. listStyle3.fontSize = GetPix(12);
  2669. int num10 = bgCombo.List(new Rect(GetPix(31),
  2670. GetPix(53),
  2671. GetPix(95),
  2672. GetPix(23)),
  2673. bgComboList[bgIndex].text,
  2674. bgComboList,
  2675. guistyle4,
  2676. "box",
  2677. listStyle3);
  2678. if (GUI.Button(new Rect(GetPix(5), GetPix(53), GetPix(23), GetPix(23)),
  2679. "<",
  2680. guistyle3))
  2681. {
  2682. num10--;
  2683. if (num10 <= -1)
  2684. {
  2685. num10 = bgArray.Length - 1;
  2686. }
  2687. }
  2688. if (GUI.Button(new Rect(GetPix(129), GetPix(53), GetPix(23), GetPix(23)),
  2689. ">",
  2690. guistyle3))
  2691. {
  2692. num10++;
  2693. if (num10 == bgArray.Length)
  2694. {
  2695. num10 = 0;
  2696. }
  2697. }
  2698. if (bgIndex != num10)
  2699. {
  2700. bgIndex = num10;
  2701. bg.localScale = new Vector3(1f, 1f, 1f);
  2702. if (bgArray[bgIndex].Length == 36)
  2703. {
  2704. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  2705. }
  2706. else
  2707. {
  2708. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  2709. }
  2710. bgCombo.selectedItemIndex = bgIndex;
  2711. if (bgArray[bgIndex] == "karaokeroom")
  2712. {
  2713. bg.transform.position = bgObject.transform.position;
  2714. Vector3 zero = Vector3.zero;
  2715. Vector3 zero2 = Vector3.zero;
  2716. zero2.y = 90f;
  2717. zero.z = 4f;
  2718. zero.x = 1f;
  2719. bg.transform.localPosition = zero;
  2720. bg.transform.localRotation = Quaternion.Euler(zero2);
  2721. }
  2722. }
  2723. GUI.enabled = true;
  2724. int num11 = bgmCombo.List(new Rect(GetPix(31),
  2725. GetPix(25),
  2726. GetPix(95),
  2727. GetPix(23)),
  2728. bgmComboList[bgmIndex].text,
  2729. bgmComboList,
  2730. guistyle4,
  2731. "box",
  2732. listStyle3);
  2733. if (GUI.Button(new Rect(GetPix(5), GetPix(25), GetPix(23), GetPix(23)),
  2734. "<",
  2735. guistyle3))
  2736. {
  2737. num11--;
  2738. if (num11 <= -1)
  2739. {
  2740. num11 = bgmArray.Length - 1;
  2741. }
  2742. }
  2743. if (GUI.Button(new Rect(GetPix(129), GetPix(25), GetPix(23), GetPix(23)),
  2744. ">",
  2745. guistyle3))
  2746. {
  2747. num11++;
  2748. if (num11 == bgmArray.Length)
  2749. {
  2750. num11 = 0;
  2751. }
  2752. }
  2753. if (bgmIndex != num11)
  2754. {
  2755. bgmIndex = num11;
  2756. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  2757. bgmCombo.selectedItemIndex = bgmIndex;
  2758. }
  2759. GUI.DragWindow();
  2760. if (bgmCombo.isClickedComboButton)
  2761. {
  2762. GUI.enabled = false;
  2763. }
  2764. }
  2765. private void PoseWindow(int winID)
  2766. {
  2767. GUIStyle style1 = "label";
  2768. style1.fontSize = GetPix(12);
  2769. style1.alignment = TextAnchor.UpperLeft;
  2770. GUIStyle style2 = "label";
  2771. style2.fontSize = GetPix(11);
  2772. style2.alignment = TextAnchor.UpperLeft;
  2773. GUIStyle style3 = "button";
  2774. style3.fontSize = GetPix(20);
  2775. GUIStyle buttonStyle1 = "button";
  2776. buttonStyle1.fontSize = GetPix(14);
  2777. buttonStyle1.alignment = TextAnchor.MiddleLeft;
  2778. GUIStyle buttonStyle2 = "button";
  2779. buttonStyle2.fontSize = GetPix(12);
  2780. buttonStyle2.alignment = TextAnchor.MiddleLeft;
  2781. GUIStyle style4 = new GUIStyle("toggle")
  2782. {
  2783. fontSize = GetPix(13)
  2784. };
  2785. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  2786. Maid maid = maidArray[selectMaidIndex];
  2787. if (!poseInitFlg)
  2788. {
  2789. listStyle2.normal.textColor = Color.white;
  2790. listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  2791. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  2792. listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
  2793. listStyle2.fontSize = GetPix(12);
  2794. listStyle3.normal.textColor = Color.white;
  2795. listStyle3.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  2796. listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
  2797. listStyle3.padding.left = listStyle3.padding.right = listStyle3.padding.top = GetPix(1);
  2798. listStyle3.padding.bottom = GetPix(0);
  2799. listStyle3.fontSize = GetPix(12);
  2800. listStyle4.normal.textColor = Color.white;
  2801. listStyle4.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  2802. listStyle4.onHover.background = listStyle4.hover.background = new Texture2D(2, 2);
  2803. listStyle4.padding.left = listStyle4.padding.right = listStyle4.padding.top = 3;
  2804. listStyle4.padding.bottom = 3;
  2805. listStyle4.fontSize = GetPix(13);
  2806. poseCombo.selectedItemIndex = 0;
  2807. int group = (int)groupList[0];
  2808. poseComboList = new GUIContent[group];
  2809. for (int index = 0; index < group; ++index)
  2810. {
  2811. poseComboList[index] = new GUIContent((index + 1).ToString() + ":" + poseArray[index]);
  2812. }
  2813. poseGroupCombo.selectedItemIndex = 0;
  2814. poseGroupComboList = new GUIContent[poseGroupArray.Length + 1];
  2815. poseGroupComboList[0] = new GUIContent("1:通常");
  2816. for (int index = 0; index < poseGroupArray.Length; ++index)
  2817. {
  2818. if (poseGroupArray[index] == "maid_dressroom01")
  2819. {
  2820. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":立ち");
  2821. }
  2822. if (poseGroupArray[index] == "tennis_kamae_f")
  2823. {
  2824. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":中腰");
  2825. }
  2826. if (poseGroupArray[index] == "senakanagasi_f")
  2827. {
  2828. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":膝をつく");
  2829. }
  2830. if (poseGroupArray[index] == "work_hansei")
  2831. {
  2832. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":座り");
  2833. }
  2834. if (poseGroupArray[index] == "inu_taiki_f")
  2835. {
  2836. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":四つん這い");
  2837. }
  2838. if (poseGroupArray[index] == "syagami_pose_f")
  2839. {
  2840. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":床座り");
  2841. }
  2842. if (poseGroupArray[index] == "densyasuwari_taiki_f")
  2843. {
  2844. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":椅子座り");
  2845. }
  2846. if (poseGroupArray[index] == "work_kaiwa")
  2847. {
  2848. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ソファー座り");
  2849. }
  2850. if (poseGroupArray[index] == "dance_cm3d2_001_f1,14.14")
  2851. {
  2852. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ドキドキ☆Fallin' Love");
  2853. }
  2854. if (poseGroupArray[index] == "dance_cm3d_001_f1,39.25")
  2855. {
  2856. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":entrance to you");
  2857. }
  2858. if (poseGroupArray[index] == "dance_cm3d_002_end_f1,50.71")
  2859. {
  2860. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":scarlet leap");
  2861. }
  2862. if (poseGroupArray[index] == "dance_cm3d2_002_smt_f,7.76,")
  2863. {
  2864. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":stellar my tears");
  2865. }
  2866. if (poseGroupArray[index] == "dance_cm3d_003_sp2_f1,90.15")
  2867. {
  2868. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":rhythmix to you");
  2869. }
  2870. if (poseGroupArray[index] == "dance_cm3d2_003_hs_f1,0.01,")
  2871. {
  2872. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":happy!happy!スキャンダル!!");
  2873. }
  2874. if (poseGroupArray[index] == "dance_cm3d_004_kano_f1,124.93")
  2875. {
  2876. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":Can Know Two Close");
  2877. }
  2878. if (poseGroupArray[index] == "dance_cm3d2_004_sse_f1,0.01")
  2879. {
  2880. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":sweet sweet everyday");
  2881. }
  2882. if (poseGroupArray[index] == "turusi_sex_in_taiki_f")
  2883. {
  2884. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":拘束");
  2885. }
  2886. if (poseGroupArray[index] == "rosyutu_pose01_f")
  2887. {
  2888. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ");
  2889. }
  2890. if (poseGroupArray[index] == "rosyutu_aruki_f_once_,1.37")
  2891. {
  2892. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":歩き");
  2893. }
  2894. if (poseGroupArray[index] == "stand_desk1")
  2895. {
  2896. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":その他");
  2897. }
  2898. if (poseGroupArray[index] == poseArray5[0])
  2899. {
  2900. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ダンスMC");
  2901. }
  2902. if (poseGroupArray[index] == poseArray6[0])
  2903. {
  2904. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ダンス");
  2905. }
  2906. if (existPose && strS != "")
  2907. {
  2908. if (index == poseGroupArray.Length - 4)
  2909. {
  2910. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  2911. }
  2912. if (index == poseGroupArray.Length - 3)
  2913. {
  2914. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  2915. }
  2916. if (index == poseGroupArray.Length - 2)
  2917. {
  2918. poseGroupComboList[index + 1] = new GUIContent("98:撮影モード");
  2919. }
  2920. if (index == poseGroupArray.Length - 1)
  2921. {
  2922. poseGroupComboList[index + 1] = new GUIContent("99:登録ポーズ");
  2923. }
  2924. }
  2925. else if (existPose && strS == "")
  2926. {
  2927. if (index == poseGroupArray.Length - 3)
  2928. {
  2929. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  2930. }
  2931. if (index == poseGroupArray.Length - 2)
  2932. {
  2933. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  2934. }
  2935. if (index == poseGroupArray.Length - 1)
  2936. {
  2937. poseGroupComboList[index + 1] = new GUIContent("99:登録ポーズ");
  2938. }
  2939. }
  2940. else if (!existPose && strS != "")
  2941. {
  2942. if (index == poseGroupArray.Length - 3)
  2943. {
  2944. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  2945. }
  2946. if (index == poseGroupArray.Length - 2)
  2947. {
  2948. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  2949. }
  2950. if (index == poseGroupArray.Length - 1)
  2951. {
  2952. poseGroupComboList[index + 1] = new GUIContent("98:撮影モード");
  2953. }
  2954. }
  2955. else
  2956. {
  2957. if (index == poseGroupArray.Length - 2)
  2958. {
  2959. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  2960. }
  2961. if (index == poseGroupArray.Length - 1)
  2962. {
  2963. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  2964. }
  2965. }
  2966. }
  2967. poseInitFlg = true;
  2968. itemCombo.selectedItemIndex = 0;
  2969. int length = itemArray.Length;
  2970. itemComboList = new GUIContent[length - 1];
  2971. for (int index = 0; index < length; ++index)
  2972. {
  2973. if (index == 0)
  2974. {
  2975. itemComboList[index] = new GUIContent("アイテム無し");
  2976. }
  2977. else
  2978. {
  2979. switch (itemArray[index])
  2980. {
  2981. case "handitem,HandItemR_WineGlass_I_.menu":
  2982. itemComboList[index] = new GUIContent(index.ToString() + ":ワイングラス");
  2983. break;
  2984. case "handitem,HandItemR_WineBottle_I_.menu":
  2985. itemComboList[index] = new GUIContent(index.ToString() + ":ワインボトル");
  2986. break;
  2987. case "handitem,handitemr_racket_I_.menu":
  2988. itemComboList[index] = new GUIContent(index.ToString() + ":ラケット");
  2989. break;
  2990. case "handitem,HandItemR_Hataki_I_.menu":
  2991. itemComboList[index] = new GUIContent(index.ToString() + ":ハタキ");
  2992. break;
  2993. case "handitem,HandItemR_Mop_I_.menu":
  2994. itemComboList[index] = new GUIContent(index.ToString() + ":モップ");
  2995. break;
  2996. case "handitem,HandItemR_Houki_I_.menu":
  2997. itemComboList[index] = new GUIContent(index.ToString() + ":ほうき");
  2998. break;
  2999. case "handitem,HandItemR_Zoukin2_I_.menu":
  3000. itemComboList[index] = new GUIContent(index.ToString() + ":雑巾");
  3001. break;
  3002. case "handitem,HandItemR_Chu-B_Lip_I_.menu":
  3003. itemComboList[index] = new GUIContent(index.ToString() + ":Chu-B Lip");
  3004. break;
  3005. case "handitem,HandItemR_Mimikaki_I_.menu":
  3006. itemComboList[index] = new GUIContent(index.ToString() + ":耳かき");
  3007. break;
  3008. case "handitem,HandItemR_Pen_I_.menu":
  3009. itemComboList[index] = new GUIContent(index.ToString() + ":ペン");
  3010. break;
  3011. case "handitem,HandItemR_Otama_I_.menu":
  3012. itemComboList[index] = new GUIContent(index.ToString() + ":おたま");
  3013. break;
  3014. case "handitem,HandItemR_Houchou_I_.menu":
  3015. itemComboList[index] = new GUIContent(index.ToString() + ":包丁");
  3016. break;
  3017. case "handitem,HandItemR_Book_I_.menu":
  3018. itemComboList[index] = new GUIContent(index.ToString() + ":本");
  3019. break;
  3020. case "handitem,HandItemR_Puff_I_.menu":
  3021. itemComboList[index] = new GUIContent(index.ToString() + ":パフ");
  3022. break;
  3023. case "handitem,HandItemR_Rip_I_.menu":
  3024. itemComboList[index] = new GUIContent(index.ToString() + ":リップ");
  3025. break;
  3026. case "handitem,HandItemD_Shisyuu_Hari_I_.menu":
  3027. itemComboList[index] = new GUIContent(index.ToString() + ":刺繍");
  3028. break;
  3029. case "handitem,HandItemD_Sara_Sponge_I_.menu":
  3030. itemComboList[index] = new GUIContent(index.ToString() + ":皿・スポンジ");
  3031. break;
  3032. case "kousoku_upper,KousokuU_TekaseOne_I_.menu":
  3033. itemComboList[index] = new GUIContent(index.ToString() + ":手枷1");
  3034. break;
  3035. case "kousoku_upper,KousokuU_TekaseTwo_I_.menu":
  3036. itemComboList[index] = new GUIContent(index.ToString() + ":手枷2");
  3037. break;
  3038. case "kousoku_lower,KousokuL_AshikaseUp_I_.menu":
  3039. itemComboList[index] = new GUIContent(index.ToString() + ":足枷");
  3040. break;
  3041. case "handitem,HandItemR_Usuba_Houchou_I_.menu":
  3042. itemComboList[index] = new GUIContent(index.ToString() + "薄刃包丁");
  3043. break;
  3044. case "handitem,HandItemR_Chusyaki_I_.menu":
  3045. itemComboList[index] = new GUIContent(index.ToString() + "注射器");
  3046. break;
  3047. case "handitem,HandItemR_Nei_Heartful_I_.menu":
  3048. itemComboList[index] = new GUIContent(index.ToString() + "ハートフルねい人形");
  3049. break;
  3050. case "handitem,HandItemR_Shaker_I_.menu":
  3051. itemComboList[index] = new GUIContent(index.ToString() + "シェイカー");
  3052. break;
  3053. case "handitem,HandItemR_SmartPhone_I_.menu":
  3054. itemComboList[index] = new GUIContent(index.ToString() + "スマートフォン");
  3055. break;
  3056. case "kousoku_upper,KousokuU_Ushirode_I_.menu":
  3057. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後ろ手拘束具");
  3058. break;
  3059. case "kousoku_upper,KousokuU_SMRoom_Haritsuke_I_.menu":
  3060. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":磔台・手枷足枷");
  3061. break;
  3062. case "kousoku_upper,KousokuU_SMRoom2_Haritsuke_I_.menu":
  3063. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":磔台・手枷足枷2");
  3064. break;
  3065. case "handitem,HandItemL_Dance_Hataki_I_.menu":
  3066. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンスハタキ");
  3067. break;
  3068. case "handitem,HandItemL_Dance_Mop_I_.menu":
  3069. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンスモップ");
  3070. break;
  3071. case "handitem,HandItemL_Dance_Zoukin_I_.menu":
  3072. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンス雑巾");
  3073. break;
  3074. case "handitem,HandItemL_Kozara_I_.menu":
  3075. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":小皿");
  3076. break;
  3077. case "handitem,HandItemR_Teacup_I_.menu":
  3078. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ティーカップ");
  3079. break;
  3080. case "handitem,HandItemL_Teasaucer_I_.menu":
  3081. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ティーソーサー");
  3082. break;
  3083. case "handitem,HandItemR_Wholecake_I_.menu":
  3084. itemComboList[index - 1] = new GUIContent("ホールケーキ");
  3085. break;
  3086. case "handitem,HandItemR_Menu_I_.menu":
  3087. itemComboList[index - 1] = new GUIContent("メニュー表");
  3088. break;
  3089. case "handitem,HandItemR_Vibe_I_.menu":
  3090. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":バイブ");
  3091. break;
  3092. case "handitem,HandItemR_VibePink_I_.menu":
  3093. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ピンクバイブ");
  3094. break;
  3095. case "handitem,HandItemR_VibeBig_I_.menu":
  3096. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":太バイブ");
  3097. break;
  3098. case "handitem,HandItemR_AnalVibe_I_.menu":
  3099. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":アナルバイブ");
  3100. break;
  3101. case "handitem,HandItemH_SoutouVibe_I_.menu":
  3102. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:双頭バイブ");
  3103. break;
  3104. case "accvag,accVag_Vibe_I_.menu":
  3105. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:バイブ");
  3106. break;
  3107. case "accvag,accVag_VibeBig_I_.menu":
  3108. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:太バイブ");
  3109. break;
  3110. case "accvag,accVag_VibePink_I_.menu":
  3111. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:ピンクバイブ");
  3112. break;
  3113. case "accanl,accAnl_AnalVibe_I_.menu":
  3114. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:アナルバイブ");
  3115. break;
  3116. case "accanl,accAnl_Photo_NomalVibe_I_.menu":
  3117. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:バイブ");
  3118. break;
  3119. case "accanl,accAnl_Photo_VibeBig_I_.menu":
  3120. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:太バイブ");
  3121. break;
  3122. case "accanl,accAnl_Photo_VibePink_I_.menu":
  3123. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:ピンクバイブ");
  3124. break;
  3125. case "handitem,HandItemL_Etoile_Saucer_I_.menu":
  3126. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "ティーソーサー");
  3127. break;
  3128. case "handitem,HandItemR_Etoile_Teacup_I_.menu":
  3129. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "ティーカップ");
  3130. break;
  3131. case "handitem,HandItemL_Katuramuki_Daikon_I_.menu":
  3132. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "桂むき大根");
  3133. break;
  3134. case "handitem,HandItemL_Karte_I_.menu":
  3135. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "カルテ");
  3136. break;
  3137. case "handitem,HandItemL_Cracker_I_.menu":
  3138. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "クラッカー");
  3139. break;
  3140. }
  3141. if (index == 12)
  3142. {
  3143. itemComboList[index] = new GUIContent(index.ToString() + ":手枷・足枷");
  3144. }
  3145. if (index == 13)
  3146. {
  3147. itemComboList[index] = new GUIContent(index.ToString() + ":手枷・足枷(下)");
  3148. }
  3149. if (index == 24)
  3150. {
  3151. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":カップ&ソーサー");
  3152. }
  3153. }
  3154. }
  3155. }
  3156. if (poseCombo.isClickedComboButton)
  3157. {
  3158. GUI.enabled = false;
  3159. }
  3160. if (poseGroupCombo.isClickedComboButton)
  3161. {
  3162. GUI.enabled = false;
  3163. }
  3164. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  3165. {
  3166. if (!isF6)
  3167. {
  3168. bool flag = true;
  3169. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  3170. {
  3171. flag = false;
  3172. }
  3173. if (GUI.Toggle(new Rect(GetPix(2),
  3174. GetPix(2),
  3175. GetPix(39),
  3176. GetPix(20)),
  3177. flag,
  3178. "配置",
  3179. style4))
  3180. {
  3181. faceFlg = false;
  3182. poseFlg = false;
  3183. // sceneFlg = false;
  3184. kankyoFlg = false;
  3185. kankyo2Flg = false;
  3186. bGui = true;
  3187. }
  3188. }
  3189. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
  3190. GetPix(2),
  3191. GetPix(39),
  3192. GetPix(20)),
  3193. poseFlg,
  3194. "操作",
  3195. style4))
  3196. {
  3197. poseFlg = true;
  3198. faceFlg = false;
  3199. // sceneFlg = false;
  3200. kankyoFlg = false;
  3201. kankyo2Flg = false;
  3202. }
  3203. if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
  3204. faceFlg,
  3205. "表情",
  3206. style4))
  3207. {
  3208. faceFlg = true;
  3209. poseFlg = false;
  3210. // sceneFlg = false;
  3211. kankyoFlg = false;
  3212. kankyo2Flg = false;
  3213. if (!faceFlg2)
  3214. {
  3215. isFaceInit = true;
  3216. faceFlg2 = true;
  3217. maidArray[selectMaidIndex].boMabataki = false;
  3218. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  3219. }
  3220. isFaceInit = true;
  3221. }
  3222. if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
  3223. kankyoFlg,
  3224. "環境",
  3225. style4))
  3226. {
  3227. poseFlg = false;
  3228. faceFlg = false;
  3229. // sceneFlg = false;
  3230. kankyoFlg = true;
  3231. kankyo2Flg = false;
  3232. }
  3233. if (!line1)
  3234. {
  3235. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  3236. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  3237. }
  3238. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
  3239. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
  3240. style1.fontSize = GetPix(13);
  3241. style1.alignment = TextAnchor.MiddleCenter;
  3242. GUI.Label(new Rect(GetPix(125), GetPix(25), GetPix(40), GetPix(25)),
  3243. string.Concat(selectMaidIndex + 1),
  3244. style1);
  3245. style1.fontSize = GetPix(11);
  3246. style1.alignment = TextAnchor.UpperLeft;
  3247. }
  3248. if (sceneLevel > 0)
  3249. {
  3250. int selectMaidIndex = this.selectMaidIndex;
  3251. if (sceneLevel == 3 || sceneLevel == 5 && (isF7 || maidCnt > 1))
  3252. {
  3253. if (GUI.Button(new Rect(GetPix(5),
  3254. GetPix(53),
  3255. GetPix(23),
  3256. GetPix(32)),
  3257. "<",
  3258. style3))
  3259. {
  3260. --this.selectMaidIndex;
  3261. if (this.selectMaidIndex < 0)
  3262. {
  3263. this.selectMaidIndex = selectList.Count - 1;
  3264. }
  3265. isPoseInit = true;
  3266. poseFlg = true;
  3267. copyIndex = 0;
  3268. poseCombo.selectedItemIndex = poseIndex[this.selectMaidIndex];
  3269. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  3270. }
  3271. if (GUI.Button(new Rect(GetPix(135),
  3272. GetPix(53),
  3273. GetPix(23),
  3274. GetPix(32)),
  3275. ">",
  3276. style3))
  3277. {
  3278. ++this.selectMaidIndex;
  3279. if (selectList.Count <= this.selectMaidIndex)
  3280. {
  3281. this.selectMaidIndex = 0;
  3282. }
  3283. isPoseInit = true;
  3284. poseFlg = true;
  3285. copyIndex = 0;
  3286. poseCombo.selectedItemIndex = poseIndex[this.selectMaidIndex];
  3287. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  3288. }
  3289. }
  3290. if (maidArray[this.selectMaidIndex].GetThumIcon())
  3291. {
  3292. GUI.DrawTexture(new Rect(GetPix(30),
  3293. GetPix(25),
  3294. GetPix(60),
  3295. GetPix(60)),
  3296. maidArray[this.selectMaidIndex].GetThumIcon());
  3297. }
  3298. GUI.Label(new Rect(GetPix(90), GetPix(50), GetPix(140), GetPix(210)),
  3299. maidArray[this.selectMaidIndex].status.lastName + "\n" + maidArray[this.selectMaidIndex].status.firstName,
  3300. style1);
  3301. }
  3302. if (!isF6)
  3303. {
  3304. if (isDanceStop)
  3305. {
  3306. isStop[selectMaidIndex] = true;
  3307. isDanceStop = false;
  3308. }
  3309. if (sceneLevel == 5 && maidCnt > 1)
  3310. {
  3311. bool flag = false;
  3312. if (selectMaidIndex == isEditNo)
  3313. {
  3314. flag = true;
  3315. }
  3316. isEdit[selectMaidIndex] =
  3317. GUI.Toggle(new Rect(GetPix(5),
  3318. GetPix(25),
  3319. GetPix(50),
  3320. GetPix(16)),
  3321. flag,
  3322. "Edit",
  3323. style4);
  3324. if (isEdit[selectMaidIndex] && selectMaidIndex != isEditNo)
  3325. {
  3326. isEditNo = selectMaidIndex;
  3327. for (int index = 0; index < maidCnt; ++index)
  3328. {
  3329. if (index != isEditNo)
  3330. {
  3331. isEdit[index] = false;
  3332. }
  3333. }
  3334. SceneEdit component = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  3335. SetFieldValue<SceneEdit, Maid>(component, "m_maid", maidArray[selectMaidIndex]);
  3336. component.PartsTypeCamera(MPN.stkg);
  3337. editSelectMaid = maidArray[selectMaidIndex];
  3338. if (selectList[selectMaidIndex] != null && goSlot[(int)selectList[selectMaidIndex]] != null)
  3339. {
  3340. maidArray[selectMaidIndex].body0.goSlot =
  3341. new List<TBodySkin>(goSlot[(int)selectList[selectMaidIndex]]);
  3342. for (int index = 0; index < bodyHit[(int)selectList[selectMaidIndex]].Count; ++index)
  3343. {
  3344. maidArray[selectMaidIndex].body0.goSlot[index].bonehair.bodyhit =
  3345. bodyHit[(int)selectList[selectMaidIndex]][index];
  3346. }
  3347. }
  3348. }
  3349. }
  3350. GUI.enabled = !poseGroupCombo.isClickedComboButton;
  3351. if (isLock[selectMaidIndex])
  3352. {
  3353. GUI.enabled = false;
  3354. }
  3355. int result;
  3356. Transform transform;
  3357. if (GUI.Button(new Rect(GetPix(5), GetPix(125), GetPix(23), GetPix(23)),
  3358. "<",
  3359. style3))
  3360. {
  3361. --poseIndex[selectMaidIndex];
  3362. if (poseGroupIndex > 0)
  3363. {
  3364. if ((int)groupList[poseGroupIndex - 1] > poseIndex[selectMaidIndex])
  3365. {
  3366. poseIndex[selectMaidIndex] = poseGroupIndex < groupList.Count
  3367. ? (int)groupList[poseGroupIndex] - 1
  3368. : poseArray.Length - 1;
  3369. }
  3370. }
  3371. else if (poseIndex[selectMaidIndex] < 0)
  3372. {
  3373. poseIndex[selectMaidIndex] = (int)groupList[poseGroupIndex] - 1;
  3374. }
  3375. isPoseInit = true;
  3376. poseCombo.selectedItemIndex = poseGroupIndex <= 0
  3377. ? poseIndex[selectMaidIndex]
  3378. : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
  3379. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  3380. {
  3381. string[] strArray = poseArray[poseIndex[selectMaidIndex]].Split(',');
  3382. isStop[selectMaidIndex] = false;
  3383. poseCount[selectMaidIndex] = 20;
  3384. if (strArray[0].Contains("_momi") || strArray[0].Contains("paizuri_"))
  3385. {
  3386. maid.body0.MuneYureL(0.0f);
  3387. maid.body0.MuneYureR(0.0f);
  3388. }
  3389. else
  3390. {
  3391. maid.body0.MuneYureL(1f);
  3392. maid.body0.MuneYureR(1f);
  3393. }
  3394. if (strArray[0].Contains("MultipleMaidsPose"))
  3395. {
  3396. string path = strArray[0].Split('/')[1];
  3397. byte[] numArray = new byte[0];
  3398. try
  3399. {
  3400. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  3401. {
  3402. numArray = new byte[fileStream.Length];
  3403. fileStream.Read(numArray, 0, numArray.Length);
  3404. }
  3405. }
  3406. catch { }
  3407. if (0 < numArray.Length)
  3408. {
  3409. long hashCode = Path.GetFileName(path).GetHashCode();
  3410. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  3411. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  3412. {
  3413. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  3414. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  3415. };
  3416. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  3417. {
  3418. maid.SetAutoTwist(f_eType, true);
  3419. }
  3420. }
  3421. }
  3422. else if (strArray[0].StartsWith("p") && int.TryParse(strArray[0].Substring(1), out result))
  3423. {
  3424. loadPose[selectMaidIndex] = strArray[0];
  3425. }
  3426. else if (!strArray[0].StartsWith("dance_"))
  3427. {
  3428. maidArray[selectMaidIndex].CrossFade(strArray[0] + ".anm", false, true, false, 0.0f, 1f);
  3429. }
  3430. else
  3431. {
  3432. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
  3433. {
  3434. maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
  3435. }
  3436. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray[0] + ".anm");
  3437. }
  3438. if (strArray.Length > 1)
  3439. {
  3440. maid.body0.m_Bones.GetComponent<Animation>()[strArray[0] + ".anm"].time = float.Parse(strArray[1]);
  3441. isDanceStop = true;
  3442. if (strArray.Length > 2)
  3443. {
  3444. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  3445. isPoseIti[selectMaidIndex] = true;
  3446. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  3447. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  3448. }
  3449. }
  3450. }
  3451. }
  3452. if (GUI.Button(new Rect(GetPix(135),
  3453. GetPix(125),
  3454. GetPix(23),
  3455. GetPix(23)),
  3456. ">",
  3457. style3))
  3458. {
  3459. ++poseIndex[selectMaidIndex];
  3460. if (poseIndex[selectMaidIndex] > (int)groupList[groupList.Count - 1])
  3461. {
  3462. if (poseIndex[selectMaidIndex] >= poseArray.Length)
  3463. {
  3464. poseIndex[selectMaidIndex] = (int)groupList[poseGroupIndex - 1];
  3465. }
  3466. }
  3467. else if (poseIndex[selectMaidIndex] >= (int)groupList[poseGroupIndex])
  3468. {
  3469. poseIndex[selectMaidIndex] = poseGroupIndex <= 0 ? 0 : (int)groupList[poseGroupIndex - 1];
  3470. }
  3471. isPoseInit = true;
  3472. poseCombo.selectedItemIndex = poseGroupIndex <= 0
  3473. ? poseIndex[selectMaidIndex]
  3474. : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
  3475. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  3476. {
  3477. string[] strArray = poseArray[poseIndex[selectMaidIndex]].Split(',');
  3478. isStop[selectMaidIndex] = false;
  3479. poseCount[selectMaidIndex] = 20;
  3480. if (strArray[0].Contains("_momi") || strArray[0].Contains("paizuri_"))
  3481. {
  3482. maid.body0.MuneYureL(0.0f);
  3483. maid.body0.MuneYureR(0.0f);
  3484. }
  3485. else
  3486. {
  3487. maid.body0.MuneYureL(1f);
  3488. maid.body0.MuneYureR(1f);
  3489. }
  3490. if (strArray[0].Contains("MultipleMaidsPose"))
  3491. {
  3492. string path = strArray[0].Split('/')[1];
  3493. byte[] numArray = new byte[0];
  3494. try
  3495. {
  3496. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  3497. {
  3498. numArray = new byte[fileStream.Length];
  3499. fileStream.Read(numArray, 0, numArray.Length);
  3500. }
  3501. }
  3502. catch { }
  3503. if (0 < numArray.Length)
  3504. {
  3505. long hashCode = Path.GetFileName(path).GetHashCode();
  3506. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  3507. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  3508. {
  3509. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  3510. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  3511. };
  3512. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  3513. {
  3514. maid.SetAutoTwist(f_eType, true);
  3515. }
  3516. }
  3517. }
  3518. else if (strArray[0].StartsWith("p") && int.TryParse(strArray[0].Substring(1), out result))
  3519. {
  3520. loadPose[selectMaidIndex] = strArray[0];
  3521. }
  3522. else if (!strArray[0].StartsWith("dance_"))
  3523. {
  3524. maidArray[selectMaidIndex].CrossFade(strArray[0] + ".anm", false, true, false, 0.0f, 1f);
  3525. }
  3526. else
  3527. {
  3528. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
  3529. {
  3530. maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
  3531. }
  3532. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray[0] + ".anm");
  3533. }
  3534. if (strArray.Length > 1)
  3535. {
  3536. maid.body0.m_Bones.GetComponent<Animation>()[strArray[0] + ".anm"].time = float.Parse(strArray[1]);
  3537. isDanceStop = true;
  3538. if (strArray.Length > 2)
  3539. {
  3540. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  3541. isPoseIti[selectMaidIndex] = true;
  3542. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  3543. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  3544. }
  3545. }
  3546. }
  3547. }
  3548. GUI.enabled = true;
  3549. int index1 = -1;
  3550. for (int index2 = 0; index2 < groupList.Count; ++index2)
  3551. {
  3552. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  3553. {
  3554. index1 = index2;
  3555. break;
  3556. }
  3557. }
  3558. int length1 = (int)groupList[0];
  3559. int num1 = 0;
  3560. if (index1 > 0)
  3561. {
  3562. length1 = (int)groupList[index1] - (int)groupList[index1 - 1];
  3563. num1 = (int)groupList[index1 - 1];
  3564. }
  3565. if (index1 < 0)
  3566. {
  3567. index1 = groupList.Count;
  3568. length1 = poseArray.Length - (int)groupList[index1 - 1];
  3569. num1 = (int)groupList[index1 - 1];
  3570. }
  3571. if (poseGroupCombo.selectedItemIndex != index1)
  3572. {
  3573. poseComboList = new GUIContent[length1];
  3574. int index2 = 0;
  3575. for (int index3 = num1; index3 < num1 + length1; ++index3)
  3576. {
  3577. bool flag = false;
  3578. foreach (IniKey key in Preferences["pose"].Keys)
  3579. {
  3580. if (poseArray[index3] == key.Key)
  3581. {
  3582. IniKey iniKey = Preferences["pose"][key.Key];
  3583. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  3584. {
  3585. poseComboList[index2] =
  3586. new GUIContent((index2 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  3587. + "                    " + key.Key);
  3588. flag = true;
  3589. }
  3590. }
  3591. }
  3592. if (!flag)
  3593. {
  3594. poseComboList[index2] = new GUIContent((index2 + 1).ToString() + ":" + poseArray[index3]);
  3595. }
  3596. ++index2;
  3597. }
  3598. poseGroupCombo.selectedItemIndex = index1;
  3599. poseGroupIndex = index1;
  3600. poseCombo.selectedItemIndex = 0;
  3601. }
  3602. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  3603. isLook[selectMaidIndex] =
  3604. GUI.Toggle(new Rect(GetPix(8),
  3605. GetPix(155),
  3606. GetPix(65),
  3607. GetPix(16)),
  3608. isLook[selectMaidIndex],
  3609. "顔の向き",
  3610. style4);
  3611. isPoseEdit = GUI.Toggle(new Rect(GetPix(86),
  3612. GetPix(155),
  3613. GetPix(90),
  3614. GetPix(16)),
  3615. isPoseEdit,
  3616. "ポーズ登録",
  3617. style4);
  3618. if (isPoseEdit)
  3619. {
  3620. inName3 = GUI.TextField(new Rect(GetPix(5),
  3621. GetPix(180),
  3622. GetPix(100),
  3623. GetPix(20)),
  3624. inName3);
  3625. if (GUI.Button(new Rect(GetPix(107),
  3626. GetPix(180),
  3627. GetPix(35),
  3628. GetPix(20)),
  3629. "追加",
  3630. style3))
  3631. {
  3632. isSavePose = true;
  3633. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  3634. existPose = true;
  3635. GUI.FocusControl("");
  3636. }
  3637. if (poseGroupComboList[poseGroupCombo.selectedItemIndex].text != "99:登録ポーズ")
  3638. {
  3639. GUI.enabled = false;
  3640. }
  3641. if (GUI.Button(new Rect(GetPix(144),
  3642. GetPix(180),
  3643. GetPix(24),
  3644. GetPix(20)),
  3645. "削",
  3646. style3))
  3647. {
  3648. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  3649. List<string> stringList1 = new List<string>();
  3650. stringList1.AddRange(poseArray);
  3651. if (poseComboList[poseCombo.selectedItemIndex].text.Contains("MultipleMaidsPose"))
  3652. {
  3653. string pose = poseArray[poseIndex[selectMaidIndex]];
  3654. stringList1.Remove(pose);
  3655. string path = poseArray[poseIndex[selectMaidIndex]].Split('/')[1].Replace("                    ", "");
  3656. if (File.Exists(path))
  3657. {
  3658. File.Delete(path);
  3659. }
  3660. }
  3661. else
  3662. {
  3663. string[] strArray = poseComboList[poseCombo.selectedItemIndex].text.Split('p');
  3664. string str = strArray[strArray.Length - 1];
  3665. IniKey iniKey = Preferences["pose"]["p" + str];
  3666. if (iniKey.Value != "" || iniKey.Value != "del")
  3667. {
  3668. Preferences["pose"]["p" + str].Value = "del";
  3669. SaveConfig();
  3670. }
  3671. stringList1.Remove("p" + str);
  3672. }
  3673. GUI.FocusControl("");
  3674. poseArray = stringList1.ToArray();
  3675. int index2 = -1;
  3676. for (int index3 = 0; index3 < groupList.Count; ++index3)
  3677. {
  3678. if (poseIndex[selectMaidIndex] < (int)groupList[index3])
  3679. {
  3680. index2 = index3;
  3681. break;
  3682. }
  3683. }
  3684. int length2 = (int)groupList[0];
  3685. int num2 = 0;
  3686. if (index2 > 0)
  3687. {
  3688. length2 = (int)groupList[index2] - (int)groupList[index2 - 1];
  3689. num2 = (int)groupList[index2 - 1];
  3690. }
  3691. if (index2 < 0)
  3692. {
  3693. index2 = groupList.Count;
  3694. length2 = poseArray.Length - (int)groupList[index2 - 1];
  3695. num2 = (int)groupList[index2 - 1];
  3696. }
  3697. poseComboList = new GUIContent[length2];
  3698. int index4 = 0;
  3699. bool existEdit = false;
  3700. for (int index3 = num2; index3 < num2 + length2; ++index3)
  3701. {
  3702. bool flag = false;
  3703. foreach (IniKey key in Preferences["pose"].Keys)
  3704. {
  3705. if (poseArray[index3] == key.Key)
  3706. {
  3707. IniKey iniKey = Preferences["pose"][key.Key];
  3708. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  3709. {
  3710. poseComboList[index4] =
  3711. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  3712. + "                    " + key.Key);
  3713. flag = true;
  3714. existEdit = true;
  3715. }
  3716. }
  3717. }
  3718. if (!flag)
  3719. {
  3720. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index3]);
  3721. }
  3722. ++index4;
  3723. }
  3724. ((Action<string, List<string>>)((path, result_list) =>
  3725. {
  3726. string[] files = Directory.GetFiles(path);
  3727. countS = 0;
  3728. for (int index = 0; index < files.Length; ++index)
  3729. {
  3730. if (Path.GetExtension(files[index]) == ".anm")
  3731. {
  3732. existEdit = true;
  3733. break;
  3734. }
  3735. }
  3736. }))(Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose", new List<string>());
  3737. if (!existEdit)
  3738. {
  3739. poseIniStr = "";
  3740. List<string> stringList2 = new List<string>(50 + poseGroupArray2.Length);
  3741. stringList2.AddRange(poseGroupArray2);
  3742. stringList2.AddRange(poseGroupArrayVP);
  3743. stringList2.AddRange(poseGroupArrayFB);
  3744. stringList2.AddRange(poseGroupArray3);
  3745. stringList2.Add(poseArray5[0]);
  3746. stringList2.Add(poseArray6[0]);
  3747. stringList2.Add(strList2[0]);
  3748. stringList2.Add(strListE2[0]);
  3749. existPose = false;
  3750. poseGroupArray = stringList2.ToArray();
  3751. groupList = new ArrayList();
  3752. for (int index3 = 0; index3 < poseArray.Length; ++index3)
  3753. {
  3754. for (int index5 = 0; index5 < poseGroupArray.Length; ++index5)
  3755. {
  3756. if (poseGroupArray[index5] == poseArray[index3])
  3757. {
  3758. groupList.Add(index3);
  3759. if (poseGroupArray[index5] == strList2[0])
  3760. {
  3761. sPoseCount = index3;
  3762. }
  3763. }
  3764. }
  3765. }
  3766. poseIndex[selectMaidIndex] = 0;
  3767. poseGroupComboList = new GUIContent[poseGroupArray.Length + 1];
  3768. poseGroupComboList[0] = new GUIContent("1:通常");
  3769. for (int index3 = 0; index3 < poseGroupArray.Length; ++index3)
  3770. {
  3771. if (poseGroupArray[index3] == "maid_dressroom01")
  3772. {
  3773. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":立ち");
  3774. }
  3775. if (poseGroupArray[index3] == "tennis_kamae_f")
  3776. {
  3777. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":中腰");
  3778. }
  3779. if (poseGroupArray[index3] == "senakanagasi_f")
  3780. {
  3781. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":膝をつく");
  3782. }
  3783. if (poseGroupArray[index3] == "work_hansei")
  3784. {
  3785. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":座り");
  3786. }
  3787. if (poseGroupArray[index3] == "inu_taiki_f")
  3788. {
  3789. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":四つん這い");
  3790. }
  3791. if (poseGroupArray[index3] == "syagami_pose_f")
  3792. {
  3793. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":床座り");
  3794. }
  3795. if (poseGroupArray[index3] == "densyasuwari_taiki_f")
  3796. {
  3797. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":椅子座り");
  3798. }
  3799. if (poseGroupArray[index3] == "work_kaiwa")
  3800. {
  3801. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ソファー座り");
  3802. }
  3803. if (poseGroupArray[index3] == "dance_cm3d2_001_f1,14.14")
  3804. {
  3805. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ドキドキ☆Fallin' Love");
  3806. }
  3807. if (poseGroupArray[index3] == "dance_cm3d_001_f1,39.25")
  3808. {
  3809. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":entrance to you");
  3810. }
  3811. if (poseGroupArray[index3] == "dance_cm3d_002_end_f1,50.71")
  3812. {
  3813. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":scarlet leap");
  3814. }
  3815. if (poseGroupArray[index3] == "dance_cm3d2_002_smt_f,7.76,")
  3816. {
  3817. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":stellar my tears");
  3818. }
  3819. if (poseGroupArray[index3] == "dance_cm3d_003_sp2_f1,90.15")
  3820. {
  3821. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":rhythmix to you");
  3822. }
  3823. if (poseGroupArray[index3] == "dance_cm3d2_003_hs_f1,0.01,")
  3824. {
  3825. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":happy!happy!スキャンダル!!");
  3826. }
  3827. if (poseGroupArray[index3] == "dance_cm3d_004_kano_f1,124.93")
  3828. {
  3829. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":Can Know Two Close");
  3830. }
  3831. if (poseGroupArray[index3] == "dance_cm3d2_004_sse_f1,0.01")
  3832. {
  3833. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":sweet sweet everyday");
  3834. }
  3835. if (poseGroupArray[index3] == "turusi_sex_in_taiki_f")
  3836. {
  3837. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":拘束");
  3838. }
  3839. if (poseGroupArray[index3] == "rosyutu_pose01_f")
  3840. {
  3841. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":エロ");
  3842. }
  3843. if (poseGroupArray[index3] == "rosyutu_aruki_f_once_,1.37")
  3844. {
  3845. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":歩き");
  3846. }
  3847. if (poseGroupArray[index3] == "stand_desk1")
  3848. {
  3849. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":その他");
  3850. }
  3851. if (poseGroupArray[index3] == poseArray5[0])
  3852. {
  3853. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ダンスMC");
  3854. }
  3855. if (poseGroupArray[index3] == poseArray6[0])
  3856. {
  3857. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ダンス");
  3858. }
  3859. if (index3 == poseGroupArray.Length - 2)
  3860. {
  3861. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":通常2");
  3862. }
  3863. if (index3 == poseGroupArray.Length - 1)
  3864. {
  3865. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":エロ2");
  3866. }
  3867. }
  3868. }
  3869. else
  3870. {
  3871. poseGroupCombo.selectedItemIndex = index2;
  3872. poseGroupIndex = index2;
  3873. poseCombo.selectedItemIndex = 0;
  3874. poseIndex[selectMaidIndex] = (int)groupList[groupList.Count - 1];
  3875. if (poseArray.Length <= poseIndex[selectMaidIndex])
  3876. {
  3877. --poseIndex[selectMaidIndex];
  3878. }
  3879. }
  3880. }
  3881. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  3882. }
  3883. else
  3884. {
  3885. if (!isLook[selectMaidIndex])
  3886. {
  3887. GUI.enabled = false;
  3888. }
  3889. GUI.Label(new Rect(GetPix(8), GetPix(175), GetPix(100), GetPix(25)),
  3890. "顔の向きX",
  3891. style2);
  3892. lookX[selectMaidIndex] =
  3893. GUI.HorizontalSlider(new Rect(GetPix(8),
  3894. GetPix(191),
  3895. GetPix(70),
  3896. GetPix(20)),
  3897. lookX[selectMaidIndex],
  3898. -0.6f,
  3899. 0.6f);
  3900. GUI.Label(new Rect(GetPix(88),
  3901. GetPix(175),
  3902. GetPix(100),
  3903. GetPix(25)),
  3904. "顔の向きY",
  3905. style2);
  3906. lookY[selectMaidIndex] =
  3907. GUI.HorizontalSlider(new Rect(GetPix(88),
  3908. GetPix(191),
  3909. GetPix(70),
  3910. GetPix(20)),
  3911. lookY[selectMaidIndex],
  3912. 0.5f,
  3913. -0.55f);
  3914. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  3915. }
  3916. int index6 = poseGroupIndex <= 0
  3917. ? poseIndex[selectMaidIndex]
  3918. : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
  3919. string[] strArray1;
  3920. if (GUI.Button(new Rect(GetPix(5), GetPix(215), GetPix(23), GetPix(23)),
  3921. "<",
  3922. style3))
  3923. {
  3924. --itemIndex[selectMaidIndex];
  3925. if (itemIndex[selectMaidIndex] <= -1)
  3926. {
  3927. itemIndex[selectMaidIndex] = itemArray.Length - 2;
  3928. }
  3929. strArray1 = new string[2];
  3930. string[] strArray2 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  3931. if (itemIndex[selectMaidIndex] > 13)
  3932. {
  3933. strArray2 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  3934. }
  3935. maid.DelProp(MPN.handitem, true);
  3936. maid.DelProp(MPN.accvag, true);
  3937. maid.DelProp(MPN.accanl, true);
  3938. bool flag = false;
  3939. if (itemIndex[selectMaidIndex] == 12 || itemIndex[selectMaidIndex] == 13 || itemIndex[selectMaidIndex] == 23)
  3940. {
  3941. flag = true;
  3942. }
  3943. if (!flag)
  3944. {
  3945. maid.DelProp(MPN.kousoku_upper, true);
  3946. maid.DelProp(MPN.kousoku_lower, true);
  3947. }
  3948. if (strArray2[0] != "")
  3949. {
  3950. maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
  3951. }
  3952. if (itemIndex[selectMaidIndex] == 12)
  3953. {
  3954. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] - 1].Split(',');
  3955. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  3956. }
  3957. if (itemIndex[selectMaidIndex] == 13)
  3958. {
  3959. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  3960. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  3961. }
  3962. if (itemIndex[selectMaidIndex] == 23)
  3963. {
  3964. string[] strArray3 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  3965. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  3966. cafeFlg[selectMaidIndex] = true;
  3967. }
  3968. maid.AllProcPropSeqStart();
  3969. itemCombo.selectedItemIndex = itemIndex[selectMaidIndex];
  3970. }
  3971. if (GUI.Button(new Rect(GetPix(135),
  3972. GetPix(215),
  3973. GetPix(23),
  3974. GetPix(23)),
  3975. ">",
  3976. style3))
  3977. {
  3978. ++itemIndex[selectMaidIndex];
  3979. if (itemIndex[selectMaidIndex] >= itemArray.Length - 1)
  3980. {
  3981. itemIndex[selectMaidIndex] = 0;
  3982. }
  3983. strArray1 = new string[2];
  3984. string[] strArray2 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  3985. if (itemIndex[selectMaidIndex] > 13)
  3986. {
  3987. strArray2 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  3988. }
  3989. maid.DelProp(MPN.handitem, true);
  3990. maid.DelProp(MPN.accvag, true);
  3991. maid.DelProp(MPN.accanl, true);
  3992. bool flag = false;
  3993. if (itemIndex[selectMaidIndex] == 12 || itemIndex[selectMaidIndex] == 13)
  3994. {
  3995. flag = true;
  3996. }
  3997. if (!flag)
  3998. {
  3999. maid.DelProp(MPN.kousoku_upper, true);
  4000. maid.DelProp(MPN.kousoku_lower, true);
  4001. }
  4002. if (strArray2[0] != "")
  4003. {
  4004. maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
  4005. }
  4006. if (itemIndex[selectMaidIndex] == 12)
  4007. {
  4008. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] - 1].Split(',');
  4009. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4010. }
  4011. if (itemIndex[selectMaidIndex] == 13)
  4012. {
  4013. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  4014. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4015. }
  4016. if (itemIndex[selectMaidIndex] == 23)
  4017. {
  4018. string[] strArray3 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  4019. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4020. cafeFlg[selectMaidIndex] = true;
  4021. }
  4022. maid.AllProcPropSeqStart();
  4023. itemCombo.selectedItemIndex = itemIndex[selectMaidIndex];
  4024. }
  4025. if (itemCombo.isClickedComboButton)
  4026. {
  4027. GUI.enabled = false;
  4028. }
  4029. int offsetTop = GetPix(240);
  4030. int UIHeight = GetPix(330);
  4031. Rect poseWindowScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  4032. Rect poseWindowScrollView = new Rect(0, offsetTop, rectWin.width - 20, UIHeight);
  4033. poseScrollPos = GUI.BeginScrollView(poseWindowScrollRect, poseScrollPos, poseWindowScrollView);
  4034. isWear = GUI.Toggle(new Rect(GetPix(5),
  4035. GetPix(248),
  4036. GetPix(70),
  4037. GetPix(20)),
  4038. isWear,
  4039. "トップス",
  4040. style4);
  4041. isSkirt = GUI.Toggle(new Rect(GetPix(90),
  4042. GetPix(248),
  4043. GetPix(70),
  4044. GetPix(20)),
  4045. isSkirt,
  4046. "ボトムス",
  4047. style4);
  4048. isBra = GUI.Toggle(new Rect(GetPix(5),
  4049. GetPix(273),
  4050. GetPix(80),
  4051. GetPix(20)),
  4052. isBra,
  4053. "ブラジャー",
  4054. style4);
  4055. isPanz = GUI.Toggle(new Rect(GetPix(90),
  4056. GetPix(273),
  4057. GetPix(60),
  4058. GetPix(20)),
  4059. isPanz,
  4060. "パンツ",
  4061. style4);
  4062. isHeadset = GUI.Toggle(new Rect(GetPix(5),
  4063. GetPix(298),
  4064. GetPix(70),
  4065. GetPix(20)),
  4066. isHeadset,
  4067. "ヘッド",
  4068. style4);
  4069. isMegane = GUI.Toggle(new Rect(GetPix(95),
  4070. GetPix(298),
  4071. GetPix(70),
  4072. GetPix(20)),
  4073. isMegane,
  4074. "メガネ",
  4075. style4);
  4076. isAccUde = GUI.Toggle(new Rect(GetPix(5),
  4077. GetPix(323),
  4078. GetPix(40),
  4079. GetPix(20)),
  4080. isAccUde,
  4081. "腕",
  4082. style4);
  4083. isGlove = GUI.Toggle(new Rect(GetPix(50),
  4084. GetPix(323),
  4085. GetPix(40),
  4086. GetPix(20)),
  4087. isGlove,
  4088. "手袋",
  4089. style4);
  4090. isAccSenaka = GUI.Toggle(new Rect(GetPix(95),
  4091. GetPix(323),
  4092. GetPix(40),
  4093. GetPix(20)),
  4094. isAccSenaka,
  4095. "背中",
  4096. style4);
  4097. isStkg = GUI.Toggle(new Rect(GetPix(5),
  4098. GetPix(348),
  4099. GetPix(40),
  4100. GetPix(20)),
  4101. isStkg,
  4102. "靴下",
  4103. style4);
  4104. isShoes = GUI.Toggle(new Rect(GetPix(50),
  4105. GetPix(348),
  4106. GetPix(40),
  4107. GetPix(20)),
  4108. isShoes,
  4109. "靴",
  4110. style4);
  4111. isMaid = GUI.Toggle(new Rect(GetPix(95),
  4112. GetPix(348),
  4113. GetPix(70),
  4114. GetPix(20)),
  4115. isMaid,
  4116. "メイド",
  4117. style4);
  4118. mekure1[selectMaidIndex] =
  4119. GUI.Toggle(new Rect(GetPix(5),
  4120. GetPix(373),
  4121. GetPix(62),
  4122. GetPix(20)),
  4123. mekure1[selectMaidIndex],
  4124. "めくれ前",
  4125. style4);
  4126. mekure2[selectMaidIndex] =
  4127. GUI.Toggle(new Rect(GetPix(67),
  4128. GetPix(373),
  4129. GetPix(40),
  4130. GetPix(20)),
  4131. mekure2[selectMaidIndex],
  4132. "後ろ",
  4133. style4);
  4134. zurasi[selectMaidIndex] =
  4135. GUI.Toggle(new Rect(GetPix(105),
  4136. GetPix(373),
  4137. GetPix(50),
  4138. GetPix(20)),
  4139. zurasi[selectMaidIndex],
  4140. "ずらし",
  4141. style4);
  4142. voice1[selectMaidIndex] =
  4143. GUI.Toggle(new Rect(GetPix(5),
  4144. GetPix(530),
  4145. GetPix(70),
  4146. GetPix(20)),
  4147. zFlg[selectMaidIndex],
  4148. "ボイス",
  4149. style4);
  4150. voice2[selectMaidIndex] =
  4151. GUI.Toggle(new Rect(GetPix(70),
  4152. GetPix(530),
  4153. GetPix(70),
  4154. GetPix(20)),
  4155. xFlg[selectMaidIndex],
  4156. "Hボイス",
  4157. style4);
  4158. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
  4159. GUI.DrawTexture(new Rect(GetPix(5), GetPix(402), GetPix(160), 2f), line1);
  4160. GUI.DrawTexture(new Rect(GetPix(5), GetPix(402), GetPix(160), 1f), line2);
  4161. isIK[selectMaidIndex] =
  4162. GUI.Toggle(new Rect(GetPix(5),
  4163. GetPix(411),
  4164. GetPix(30),
  4165. GetPix(20)),
  4166. isIK[selectMaidIndex],
  4167. "IK",
  4168. style4);
  4169. if (!isLock[selectMaidIndex])
  4170. {
  4171. GUI.enabled = false;
  4172. }
  4173. isLock[selectMaidIndex] =
  4174. GUI.Toggle(new Rect(GetPix(45),
  4175. GetPix(411),
  4176. GetPix(40),
  4177. GetPix(20)),
  4178. isLock[selectMaidIndex],
  4179. "解除",
  4180. style4);
  4181. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
  4182. if (!isIK[selectMaidIndex])
  4183. {
  4184. GUI.enabled = false;
  4185. }
  4186. isBone[selectMaidIndex] =
  4187. GUI.Toggle(new Rect(GetPix(100),
  4188. GetPix(411),
  4189. GetPix(60),
  4190. GetPix(20)),
  4191. isBone[selectMaidIndex],
  4192. "ボーン",
  4193. style4);
  4194. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  4195. if (isBone[selectMaidIndex] != isBoneN[selectMaidIndex])
  4196. {
  4197. isBoneN[selectMaidIndex] = isBone[selectMaidIndex];
  4198. isChange[selectMaidIndex] = true;
  4199. }
  4200. if (!isLock[selectMaidIndex] && unLockFlg != isLock[selectMaidIndex])
  4201. {
  4202. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  4203. isStop[selectMaidIndex] = false;
  4204. poseCount[selectMaidIndex] = 20;
  4205. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  4206. {
  4207. maid.body0.MuneYureL(0.0f);
  4208. maid.body0.MuneYureR(0.0f);
  4209. }
  4210. else
  4211. {
  4212. maid.body0.MuneYureL(1f);
  4213. maid.body0.MuneYureR(1f);
  4214. }
  4215. if (strArray2[0].Contains("MultipleMaidsPose"))
  4216. {
  4217. string path = strArray2[0].Split('/')[1];
  4218. byte[] numArray = new byte[0];
  4219. try
  4220. {
  4221. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  4222. {
  4223. numArray = new byte[fileStream.Length];
  4224. fileStream.Read(numArray, 0, numArray.Length);
  4225. }
  4226. }
  4227. catch { }
  4228. if (0 < numArray.Length)
  4229. {
  4230. long hashCode = Path.GetFileName(path).GetHashCode();
  4231. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  4232. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  4233. {
  4234. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  4235. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  4236. };
  4237. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  4238. {
  4239. maid.SetAutoTwist(f_eType, true);
  4240. }
  4241. }
  4242. }
  4243. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  4244. {
  4245. loadPose[selectMaidIndex] = strArray2[0];
  4246. }
  4247. else if (!strArray2[0].StartsWith("dance_"))
  4248. {
  4249. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  4250. }
  4251. else
  4252. {
  4253. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  4254. {
  4255. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  4256. }
  4257. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  4258. }
  4259. if (strArray2.Length > 1)
  4260. {
  4261. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  4262. isDanceStop = true;
  4263. if (strArray2.Length > 2)
  4264. {
  4265. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  4266. isPoseIti[selectMaidIndex] = true;
  4267. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  4268. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4269. }
  4270. }
  4271. mHandL[selectMaidIndex].initFlg = false;
  4272. mHandR[selectMaidIndex].initFlg = false;
  4273. mFootL[selectMaidIndex].initFlg = false;
  4274. mFootR[selectMaidIndex].initFlg = false;
  4275. pHandL[selectMaidIndex] = 0;
  4276. pHandR[selectMaidIndex] = 0;
  4277. hanten[selectMaidIndex] = false;
  4278. hantenn[selectMaidIndex] = false;
  4279. muneIKL[selectMaidIndex] = false;
  4280. muneIKR[selectMaidIndex] = false;
  4281. maid.body0.jbMuneL.enabled = true;
  4282. maid.body0.jbMuneR.enabled = true;
  4283. if (!GameMain.Instance.VRMode)
  4284. {
  4285. maidArray[selectMaidIndex].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[selectMaidIndex]];
  4286. maidArray[selectMaidIndex].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[selectMaidIndex]];
  4287. }
  4288. }
  4289. unLockFlg = isLock[selectMaidIndex];
  4290. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
  4291. if (!isIK[selectMaidIndex])
  4292. {
  4293. GUI.enabled = false;
  4294. }
  4295. hanten[selectMaidIndex] =
  4296. GUI.Toggle(new Rect(GetPix(5),
  4297. GetPix(479),
  4298. GetPix(70),
  4299. GetPix(20)),
  4300. hanten[selectMaidIndex],
  4301. "左右反転",
  4302. style4);
  4303. bool flag1 = GUI.Toggle(new Rect(GetPix(80),
  4304. GetPix(479),
  4305. GetPix(100),
  4306. GetPix(20)),
  4307. kotei[selectMaidIndex],
  4308. "スカート固定",
  4309. style4);
  4310. if (kotei[selectMaidIndex] != flag1)
  4311. {
  4312. kotei[selectMaidIndex] = flag1;
  4313. if (flag1)
  4314. {
  4315. SkirtListArray[selectMaidIndex] = new DynamicSkirtBone[100];
  4316. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  4317. {
  4318. DynamicSkirtBone fieldValue =
  4319. GetFieldValue<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3, "m_SkirtBone");
  4320. SkirtListArray[selectMaidIndex][index2] = fieldValue;
  4321. SetFieldValue<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3,
  4322. "m_SkirtBone",
  4323. null);
  4324. }
  4325. }
  4326. else
  4327. {
  4328. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  4329. {
  4330. SetFieldValue<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3,
  4331. "m_SkirtBone",
  4332. SkirtListArray[selectMaidIndex][index2]);
  4333. }
  4334. }
  4335. }
  4336. GUI.Label(new Rect(GetPix(29), GetPix(433), GetPix(100), GetPix(25)),
  4337. "右手",
  4338. style1);
  4339. GUI.Label(new Rect(GetPix(109), GetPix(433), GetPix(100), GetPix(25)),
  4340. "左手",
  4341. style1);
  4342. string text = "未選択";
  4343. if (copyIndex > 0)
  4344. {
  4345. text = copyIndex.ToString() + ":" + maidArray[copyIndex - 1].status.firstName;
  4346. }
  4347. if (maidCnt <= 1)
  4348. {
  4349. GUI.enabled = false;
  4350. }
  4351. GUI.Label(new Rect(GetPix(8), GetPix(505), GetPix(100), GetPix(25)),
  4352. "コピー",
  4353. style1);
  4354. GUI.Label(new Rect(GetPix(70), GetPix(505), GetPix(100), GetPix(25)),
  4355. text,
  4356. style1);
  4357. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton
  4358. && isIK[selectMaidIndex];
  4359. style1.fontSize = GetPix(13);
  4360. style1.alignment = TextAnchor.UpperCenter;
  4361. GUI.Label(new Rect(GetPix(-10), GetPix(449), GetPix(100), GetPix(25)),
  4362. pHandR[selectMaidIndex].ToString(),
  4363. style1);
  4364. GUI.Label(new Rect(GetPix(70), GetPix(449), GetPix(100), GetPix(25)),
  4365. pHandL[selectMaidIndex].ToString(),
  4366. style1);
  4367. style1.fontSize = GetPix(11);
  4368. style1.alignment = TextAnchor.UpperLeft;
  4369. if (GUI.Button(new Rect(GetPix(5), GetPix(448), GetPix(23), GetPix(23)),
  4370. "<",
  4371. style3))
  4372. {
  4373. --pHandR[selectMaidIndex];
  4374. if (pHandR[selectMaidIndex] < 1)
  4375. {
  4376. pHandR[selectMaidIndex] = fingerRArray.GetLength(0);
  4377. }
  4378. for (int index2 = 0; index2 < 20; ++index2)
  4379. {
  4380. string[] strArray2 = fingerRArray[pHandR[selectMaidIndex] - 1, index2].Split(',');
  4381. Finger[selectMaidIndex, index2 + 20].localEulerAngles =
  4382. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4383. }
  4384. isStop[selectMaidIndex] = true;
  4385. isLock[selectMaidIndex] = true;
  4386. for (int index2 = 0; index2 < 10; ++index2)
  4387. {
  4388. if ((index2 == 0 || index2 == 5) && mFinger[selectMaidIndex, index2 * 3])
  4389. {
  4390. mFinger[selectMaidIndex, index2 * 3].reset = true;
  4391. }
  4392. }
  4393. }
  4394. if (GUI.Button(new Rect(GetPix(55),
  4395. GetPix(448),
  4396. GetPix(23),
  4397. GetPix(23)),
  4398. ">",
  4399. style3))
  4400. {
  4401. ++pHandR[selectMaidIndex];
  4402. if (pHandR[selectMaidIndex] > fingerRArray.GetLength(0))
  4403. {
  4404. pHandR[selectMaidIndex] = 1;
  4405. }
  4406. for (int index2 = 0; index2 < 20; ++index2)
  4407. {
  4408. string[] strArray2 = fingerRArray[pHandR[selectMaidIndex] - 1, index2].Split(',');
  4409. Finger[selectMaidIndex, index2 + 20].localEulerAngles =
  4410. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4411. }
  4412. isStop[selectMaidIndex] = true;
  4413. isLock[selectMaidIndex] = true;
  4414. for (int index2 = 0; index2 < 10; ++index2)
  4415. {
  4416. if ((index2 == 0 || index2 == 5) && mFinger[selectMaidIndex, index2 * 3])
  4417. {
  4418. mFinger[selectMaidIndex, index2 * 3].reset = true;
  4419. }
  4420. }
  4421. }
  4422. if (GUI.Button(new Rect(GetPix(85),
  4423. GetPix(448),
  4424. GetPix(23),
  4425. GetPix(23)),
  4426. "<",
  4427. style3))
  4428. {
  4429. --pHandL[selectMaidIndex];
  4430. if (pHandL[selectMaidIndex] < 1)
  4431. {
  4432. pHandL[selectMaidIndex] = fingerLArray.GetLength(0);
  4433. }
  4434. for (int index2 = 0; index2 < 20; ++index2)
  4435. {
  4436. string[] strArray2 = fingerLArray[pHandL[selectMaidIndex] - 1, index2].Split(',');
  4437. Finger[selectMaidIndex, index2].localEulerAngles =
  4438. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4439. }
  4440. isStop[selectMaidIndex] = true;
  4441. isLock[selectMaidIndex] = true;
  4442. }
  4443. if (GUI.Button(new Rect(GetPix(135),
  4444. GetPix(448),
  4445. GetPix(23),
  4446. GetPix(23)),
  4447. ">",
  4448. style3))
  4449. {
  4450. ++pHandL[selectMaidIndex];
  4451. if (pHandL[selectMaidIndex] > fingerRArray.GetLength(0))
  4452. {
  4453. pHandL[selectMaidIndex] = 1;
  4454. }
  4455. for (int index2 = 0; index2 < 20; ++index2)
  4456. {
  4457. string[] strArray2 = fingerLArray[pHandL[selectMaidIndex] - 1, index2].Split(',');
  4458. Finger[selectMaidIndex, index2].localEulerAngles =
  4459. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4460. }
  4461. isStop[selectMaidIndex] = true;
  4462. isLock[selectMaidIndex] = true;
  4463. }
  4464. if (maidCnt <= 1)
  4465. {
  4466. GUI.enabled = false;
  4467. }
  4468. if (GUI.Button(new Rect(GetPix(45),
  4469. GetPix(504),
  4470. GetPix(22),
  4471. GetPix(20)),
  4472. ">",
  4473. style3))
  4474. {
  4475. ++copyIndex;
  4476. if (copyIndex - 1 == selectMaidIndex)
  4477. {
  4478. ++copyIndex;
  4479. }
  4480. if (copyIndex > maidCnt)
  4481. {
  4482. copyIndex = 0;
  4483. }
  4484. }
  4485. if (isCopy)
  4486. {
  4487. isCopy = false;
  4488. CopyIK2(maidArray[selectMaidIndex], selectMaidIndex, maidArray[copyIndex - 1], copyIndex - 1);
  4489. }
  4490. if (copyIndex == 0)
  4491. {
  4492. GUI.enabled = false;
  4493. }
  4494. if (GUI.Button(new Rect(GetPix(123),
  4495. GetPix(504),
  4496. GetPix(35),
  4497. GetPix(20)),
  4498. "決定",
  4499. style3))
  4500. {
  4501. CopyIK(maidArray[selectMaidIndex], selectMaidIndex, maidArray[copyIndex - 1], copyIndex - 1);
  4502. isCopy = true;
  4503. pHandL[selectMaidIndex] = pHandL[copyIndex - 1];
  4504. pHandR[selectMaidIndex] = pHandR[copyIndex - 1];
  4505. hanten[selectMaidIndex] = hanten[copyIndex - 1];
  4506. hantenn[selectMaidIndex] = hantenn[copyIndex - 1];
  4507. }
  4508. GUI.enabled = true;
  4509. if (poseCombo.isClickedComboButton || poseGroupCombo.isClickedComboButton)
  4510. {
  4511. GUI.enabled = false;
  4512. }
  4513. GUI.EndScrollView();
  4514. itemIndex2[selectMaidIndex] =
  4515. itemCombo.List(new Rect(GetPix(35),
  4516. GetPix(215),
  4517. GetPix(95),
  4518. GetPix(23)),
  4519. itemComboList[itemIndex[selectMaidIndex]].text,
  4520. itemComboList,
  4521. buttonStyle1,
  4522. "box",
  4523. listStyle3);
  4524. GUI.enabled = true;
  4525. if (poseGroupCombo.isClickedComboButton || isLock[selectMaidIndex])
  4526. {
  4527. GUI.enabled = false;
  4528. }
  4529. poseCombo.List(new Rect(GetPix(35),
  4530. GetPix(125),
  4531. GetPix(95),
  4532. GetPix(23)),
  4533. poseComboList[index6].text,
  4534. poseComboList,
  4535. buttonStyle1,
  4536. "box",
  4537. listStyle2);
  4538. if (!isLock[selectMaidIndex])
  4539. {
  4540. GUI.enabled = true;
  4541. }
  4542. int index7 = -1;
  4543. for (int index2 = 0; index2 < groupList.Count; ++index2)
  4544. {
  4545. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  4546. {
  4547. index7 = index2;
  4548. break;
  4549. }
  4550. }
  4551. if (index7 < 0)
  4552. {
  4553. index7 = groupList.Count;
  4554. }
  4555. if (GUI.Button(new Rect(GetPix(5), GetPix(95), GetPix(23), GetPix(23)),
  4556. "<",
  4557. style3))
  4558. {
  4559. isPoseInit = true;
  4560. if (!isLock[selectMaidIndex])
  4561. {
  4562. for (int index2 = 0; index2 < groupList.Count; ++index2)
  4563. {
  4564. if (index2 == 0 && poseIndex[selectMaidIndex] <= (int)groupList[index2])
  4565. {
  4566. poseIndex[selectMaidIndex] = poseIndex[selectMaidIndex] != 0 ? 0 : (int)groupList[groupList.Count - 1];
  4567. break;
  4568. }
  4569. if (index2 > 0 && poseIndex[selectMaidIndex] > (int)groupList[index2 - 1]
  4570. && poseIndex[selectMaidIndex] <= (int)groupList[index2])
  4571. {
  4572. poseIndex[selectMaidIndex] = (int)groupList[index2 - 1];
  4573. break;
  4574. }
  4575. }
  4576. if (poseIndex[selectMaidIndex] > (int)groupList[groupList.Count - 1])
  4577. {
  4578. poseIndex[selectMaidIndex] = (int)groupList[groupList.Count - 1];
  4579. }
  4580. if (maid && maid.Visible)
  4581. {
  4582. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  4583. isStop[selectMaidIndex] = false;
  4584. poseCount[selectMaidIndex] = 20;
  4585. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  4586. {
  4587. maid.body0.MuneYureL(0.0f);
  4588. maid.body0.MuneYureR(0.0f);
  4589. }
  4590. else
  4591. {
  4592. maid.body0.MuneYureL(1f);
  4593. maid.body0.MuneYureR(1f);
  4594. }
  4595. if (strArray2[0].Contains("MultipleMaidsPose"))
  4596. {
  4597. string path = strArray2[0].Split('/')[1];
  4598. byte[] numArray = new byte[0];
  4599. try
  4600. {
  4601. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  4602. {
  4603. numArray = new byte[fileStream.Length];
  4604. fileStream.Read(numArray, 0, numArray.Length);
  4605. }
  4606. }
  4607. catch { }
  4608. if (0 < numArray.Length)
  4609. {
  4610. long hashCode = Path.GetFileName(path).GetHashCode();
  4611. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  4612. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  4613. {
  4614. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  4615. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  4616. };
  4617. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  4618. {
  4619. maid.SetAutoTwist(f_eType, true);
  4620. }
  4621. }
  4622. }
  4623. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  4624. {
  4625. loadPose[selectMaidIndex] = strArray2[0];
  4626. }
  4627. else if (!strArray2[0].StartsWith("dance_"))
  4628. {
  4629. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  4630. }
  4631. else
  4632. {
  4633. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  4634. {
  4635. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  4636. }
  4637. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  4638. }
  4639. if (strArray2.Length > 1)
  4640. {
  4641. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  4642. isDanceStop = true;
  4643. if (strArray2.Length > 2)
  4644. {
  4645. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  4646. isPoseIti[selectMaidIndex] = true;
  4647. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  4648. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4649. }
  4650. }
  4651. }
  4652. }
  4653. int index3 = -1;
  4654. for (int index2 = 0; index2 < groupList.Count; ++index2)
  4655. {
  4656. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  4657. {
  4658. index3 = index2;
  4659. break;
  4660. }
  4661. }
  4662. int length2 = (int)groupList[0];
  4663. int num2 = 0;
  4664. if (index3 > 0)
  4665. {
  4666. length2 = (int)groupList[index3] - (int)groupList[index3 - 1];
  4667. num2 = (int)groupList[index3 - 1];
  4668. }
  4669. if (index3 < 0)
  4670. {
  4671. index3 = groupList.Count;
  4672. length2 = poseArray.Length - (int)groupList[index3 - 1];
  4673. num2 = (int)groupList[index3 - 1];
  4674. }
  4675. poseComboList = new GUIContent[length2];
  4676. int index4 = 0;
  4677. for (int index2 = num2; index2 < num2 + length2; ++index2)
  4678. {
  4679. bool flag2 = false;
  4680. foreach (IniKey key in Preferences["pose"].Keys)
  4681. {
  4682. if (poseArray[index2] == key.Key)
  4683. {
  4684. IniKey iniKey = Preferences["pose"][key.Key];
  4685. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  4686. {
  4687. poseComboList[index4] =
  4688. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  4689. + "                    " + key.Key);
  4690. flag2 = true;
  4691. }
  4692. }
  4693. }
  4694. if (!flag2)
  4695. {
  4696. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index2]);
  4697. }
  4698. ++index4;
  4699. }
  4700. poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
  4701. poseGroupCombo.selectedItemIndex = index3;
  4702. poseCombo.selectedItemIndex = 0;
  4703. }
  4704. if (GUI.Button(new Rect(GetPix(135),
  4705. GetPix(95),
  4706. GetPix(23),
  4707. GetPix(23)),
  4708. ">",
  4709. style3))
  4710. {
  4711. isPoseInit = true;
  4712. if (!isLock[selectMaidIndex])
  4713. {
  4714. int num2 = poseIndex[selectMaidIndex];
  4715. for (int index2 = 0; index2 < groupList.Count; ++index2)
  4716. {
  4717. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  4718. {
  4719. poseIndex[selectMaidIndex] = (int)groupList[index2];
  4720. break;
  4721. }
  4722. }
  4723. if (num2 == poseIndex[selectMaidIndex] && poseIndex[selectMaidIndex] >= (int)groupList[groupList.Count - 1])
  4724. {
  4725. poseIndex[selectMaidIndex] = 0;
  4726. }
  4727. if (maid && maid.Visible)
  4728. {
  4729. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  4730. isStop[selectMaidIndex] = false;
  4731. poseCount[selectMaidIndex] = 20;
  4732. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  4733. {
  4734. maid.body0.MuneYureL(0.0f);
  4735. maid.body0.MuneYureR(0.0f);
  4736. }
  4737. else
  4738. {
  4739. maid.body0.MuneYureL(1f);
  4740. maid.body0.MuneYureR(1f);
  4741. }
  4742. if (strArray2[0].Contains("MultipleMaidsPose"))
  4743. {
  4744. string path = strArray2[0].Split('/')[1];
  4745. byte[] numArray = new byte[0];
  4746. try
  4747. {
  4748. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  4749. {
  4750. numArray = new byte[fileStream.Length];
  4751. fileStream.Read(numArray, 0, numArray.Length);
  4752. }
  4753. }
  4754. catch { }
  4755. if (0 < numArray.Length)
  4756. {
  4757. long hashCode = Path.GetFileName(path).GetHashCode();
  4758. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  4759. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  4760. {
  4761. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  4762. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  4763. };
  4764. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  4765. {
  4766. maid.SetAutoTwist(f_eType, true);
  4767. }
  4768. }
  4769. }
  4770. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  4771. {
  4772. loadPose[selectMaidIndex] = strArray2[0];
  4773. }
  4774. else if (!strArray2[0].StartsWith("dance_"))
  4775. {
  4776. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  4777. }
  4778. else
  4779. {
  4780. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  4781. {
  4782. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  4783. }
  4784. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  4785. }
  4786. if (strArray2.Length > 1)
  4787. {
  4788. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  4789. isDanceStop = true;
  4790. if (strArray2.Length > 2)
  4791. {
  4792. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  4793. isPoseIti[selectMaidIndex] = true;
  4794. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  4795. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4796. }
  4797. }
  4798. }
  4799. }
  4800. int index3 = -1;
  4801. for (int index2 = 0; index2 < groupList.Count; ++index2)
  4802. {
  4803. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  4804. {
  4805. index3 = index2;
  4806. break;
  4807. }
  4808. }
  4809. int length2 = (int)groupList[0];
  4810. int num3 = 0;
  4811. if (index3 > 0)
  4812. {
  4813. length2 = (int)groupList[index3] - (int)groupList[index3 - 1];
  4814. num3 = (int)groupList[index3 - 1];
  4815. }
  4816. if (index3 < 0)
  4817. {
  4818. index3 = groupList.Count;
  4819. length2 = poseArray.Length - (int)groupList[index3 - 1];
  4820. num3 = (int)groupList[index3 - 1];
  4821. }
  4822. poseComboList = new GUIContent[length2];
  4823. int index4 = 0;
  4824. for (int index2 = num3; index2 < num3 + length2; ++index2)
  4825. {
  4826. bool flag2 = false;
  4827. foreach (IniKey key in Preferences["pose"].Keys)
  4828. {
  4829. if (poseArray[index2] == key.Key)
  4830. {
  4831. IniKey iniKey = Preferences["pose"][key.Key];
  4832. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  4833. {
  4834. poseComboList[index4] =
  4835. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  4836. + "                    " + key.Key);
  4837. flag2 = true;
  4838. }
  4839. }
  4840. }
  4841. if (!flag2)
  4842. {
  4843. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index2]);
  4844. }
  4845. ++index4;
  4846. }
  4847. poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
  4848. poseGroupCombo.selectedItemIndex = index3;
  4849. poseCombo.selectedItemIndex = 0;
  4850. }
  4851. poseGroupIndex =
  4852. poseGroupCombo.List(new Rect(GetPix(35),
  4853. GetPix(95),
  4854. GetPix(95),
  4855. GetPix(23)),
  4856. poseGroupComboList[index7].text,
  4857. poseGroupComboList,
  4858. buttonStyle2,
  4859. "box",
  4860. listStyle4);
  4861. if (poseGroupCombo.isClickedComboButton)
  4862. {
  4863. isCombo2 = true;
  4864. }
  4865. else if (isCombo2)
  4866. {
  4867. isCombo2 = false;
  4868. isPoseInit = true;
  4869. poseIndex[selectMaidIndex] = poseGroupIndex <= 0 ? 0 : (int)groupList[poseGroupIndex - 1];
  4870. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  4871. {
  4872. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  4873. isStop[selectMaidIndex] = false;
  4874. poseCount[selectMaidIndex] = 20;
  4875. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  4876. {
  4877. maid.body0.MuneYureL(0.0f);
  4878. maid.body0.MuneYureR(0.0f);
  4879. }
  4880. else
  4881. {
  4882. maid.body0.MuneYureL(1f);
  4883. maid.body0.MuneYureR(1f);
  4884. }
  4885. if (strArray2[0].Contains("MultipleMaidsPose"))
  4886. {
  4887. string path = strArray2[0].Split('/')[1];
  4888. byte[] numArray = new byte[0];
  4889. try
  4890. {
  4891. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  4892. {
  4893. numArray = new byte[fileStream.Length];
  4894. fileStream.Read(numArray, 0, numArray.Length);
  4895. }
  4896. }
  4897. catch { }
  4898. if (0 < numArray.Length)
  4899. {
  4900. long hashCode = Path.GetFileName(path).GetHashCode();
  4901. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  4902. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  4903. {
  4904. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  4905. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  4906. };
  4907. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  4908. {
  4909. maid.SetAutoTwist(f_eType, true);
  4910. }
  4911. }
  4912. }
  4913. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  4914. {
  4915. loadPose[selectMaidIndex] = strArray2[0];
  4916. }
  4917. else if (!strArray2[0].StartsWith("dance_"))
  4918. {
  4919. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  4920. }
  4921. else
  4922. {
  4923. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  4924. {
  4925. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  4926. }
  4927. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  4928. }
  4929. if (strArray2.Length > 1)
  4930. {
  4931. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  4932. isDanceStop = true;
  4933. if (strArray2.Length > 2)
  4934. {
  4935. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  4936. isPoseIti[selectMaidIndex] = true;
  4937. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  4938. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4939. }
  4940. }
  4941. }
  4942. int index2 = -1;
  4943. for (int index3 = 0; index3 < groupList.Count; ++index3)
  4944. {
  4945. if (poseIndex[selectMaidIndex] < (int)groupList[index3])
  4946. {
  4947. index2 = index3;
  4948. break;
  4949. }
  4950. }
  4951. int length2 = (int)groupList[0];
  4952. int num2 = 0;
  4953. if (index2 > 0)
  4954. {
  4955. length2 = (int)groupList[index2] - (int)groupList[index2 - 1];
  4956. num2 = (int)groupList[index2 - 1];
  4957. }
  4958. if (index2 < 0)
  4959. {
  4960. index2 = groupList.Count;
  4961. length2 = poseArray.Length - (int)groupList[index2 - 1];
  4962. num2 = (int)groupList[index2 - 1];
  4963. }
  4964. poseComboList = new GUIContent[length2];
  4965. int index4 = 0;
  4966. for (int index3 = num2; index3 < num2 + length2; ++index3)
  4967. {
  4968. bool flag2 = false;
  4969. foreach (IniKey key in Preferences["pose"].Keys)
  4970. {
  4971. if (poseArray[index3] == key.Key)
  4972. {
  4973. IniKey iniKey = Preferences["pose"][key.Key];
  4974. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  4975. {
  4976. poseComboList[index4] =
  4977. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  4978. + "                    " + key.Key);
  4979. flag2 = true;
  4980. }
  4981. }
  4982. }
  4983. if (!flag2)
  4984. {
  4985. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index3]);
  4986. }
  4987. ++index4;
  4988. }
  4989. poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
  4990. poseGroupCombo.selectedItemIndex = index2;
  4991. poseCombo.selectedItemIndex = 0;
  4992. }
  4993. if (poseCombo.isClickedComboButton)
  4994. {
  4995. isCombo = true;
  4996. }
  4997. else if (isCombo)
  4998. {
  4999. isCombo = false;
  5000. isPoseInit = true;
  5001. poseIndex[selectMaidIndex] = poseGroupIndex <= 0
  5002. ? poseCombo.selectedItemIndex
  5003. : (int)groupList[poseGroupIndex - 1] + poseCombo.selectedItemIndex;
  5004. if (poseIndex[selectMaidIndex] == poseArray.Length)
  5005. {
  5006. poseIndex[selectMaidIndex] = 0;
  5007. }
  5008. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  5009. {
  5010. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  5011. isStop[selectMaidIndex] = false;
  5012. poseCount[selectMaidIndex] = 20;
  5013. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  5014. {
  5015. maid.body0.MuneYureL(0.0f);
  5016. maid.body0.MuneYureR(0.0f);
  5017. }
  5018. else
  5019. {
  5020. maid.body0.MuneYureL(1f);
  5021. maid.body0.MuneYureR(1f);
  5022. }
  5023. if (strArray2[0].Contains("MultipleMaidsPose"))
  5024. {
  5025. string path = strArray2[0].Split('/')[1];
  5026. byte[] numArray = new byte[0];
  5027. try
  5028. {
  5029. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  5030. {
  5031. numArray = new byte[fileStream.Length];
  5032. fileStream.Read(numArray, 0, numArray.Length);
  5033. }
  5034. }
  5035. catch { }
  5036. if (0 < numArray.Length)
  5037. {
  5038. long hashCode = Path.GetFileName(path).GetHashCode();
  5039. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  5040. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  5041. {
  5042. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  5043. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  5044. };
  5045. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  5046. {
  5047. maid.SetAutoTwist(f_eType, true);
  5048. }
  5049. }
  5050. }
  5051. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  5052. {
  5053. loadPose[selectMaidIndex] = strArray2[0];
  5054. }
  5055. else if (!strArray2[0].StartsWith("dance_"))
  5056. {
  5057. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  5058. }
  5059. else
  5060. {
  5061. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  5062. {
  5063. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  5064. }
  5065. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  5066. }
  5067. if (strArray2.Length > 1)
  5068. {
  5069. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  5070. isDanceStop = true;
  5071. if (strArray2.Length > 2)
  5072. {
  5073. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  5074. isPoseIti[selectMaidIndex] = true;
  5075. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  5076. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  5077. }
  5078. }
  5079. }
  5080. }
  5081. if (itemCombo.isClickedComboButton)
  5082. {
  5083. isCombo3 = true;
  5084. }
  5085. else if (isCombo3)
  5086. {
  5087. isCombo3 = false;
  5088. strArray1 = new string[2];
  5089. string[] strArray2 = itemArray[itemIndex2[selectMaidIndex]].Split(',');
  5090. if (itemIndex2[selectMaidIndex] > 13)
  5091. {
  5092. strArray2 = itemArray[itemIndex2[selectMaidIndex] + 1].Split(',');
  5093. }
  5094. maid.DelProp(MPN.handitem, true);
  5095. bool flag2 = false;
  5096. if (itemIndex2[selectMaidIndex] == 0)
  5097. {
  5098. maid.DelProp(MPN.accvag, true);
  5099. maid.DelProp(MPN.accanl, true);
  5100. }
  5101. if (itemIndex2[selectMaidIndex] == 12 || itemIndex2[selectMaidIndex] == 13)
  5102. {
  5103. flag2 = true;
  5104. }
  5105. if (!flag2)
  5106. {
  5107. maid.DelProp(MPN.kousoku_upper, true);
  5108. maid.DelProp(MPN.kousoku_lower, true);
  5109. }
  5110. if (strArray2[0] != "")
  5111. {
  5112. maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
  5113. }
  5114. if (itemIndex2[selectMaidIndex] == 12)
  5115. {
  5116. string[] strArray3 = itemArray[itemIndex2[selectMaidIndex] - 1].Split(',');
  5117. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  5118. }
  5119. if (itemIndex2[selectMaidIndex] == 13)
  5120. {
  5121. string[] strArray3 = itemArray[itemIndex2[selectMaidIndex] + 1].Split(',');
  5122. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  5123. }
  5124. if (itemIndex2[selectMaidIndex] == 23)
  5125. {
  5126. string[] strArray3 = itemArray[itemIndex2[selectMaidIndex]].Split(',');
  5127. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  5128. cafeFlg[selectMaidIndex] = true;
  5129. }
  5130. maid.AllProcPropSeqStart();
  5131. itemCombo.selectedItemIndex = itemIndex2[selectMaidIndex];
  5132. itemIndex[selectMaidIndex] = itemIndex2[selectMaidIndex];
  5133. }
  5134. }
  5135. else
  5136. {
  5137. isWear = GUI.Toggle(new Rect(GetPix(5),
  5138. GetPix(98),
  5139. GetPix(70),
  5140. GetPix(20)),
  5141. isWear,
  5142. "トップス",
  5143. style4);
  5144. isSkirt = GUI.Toggle(new Rect(GetPix(90),
  5145. GetPix(98),
  5146. GetPix(70),
  5147. GetPix(20)),
  5148. isSkirt,
  5149. "ボトムス",
  5150. style4);
  5151. isBra = GUI.Toggle(new Rect(GetPix(5),
  5152. GetPix(123),
  5153. GetPix(80),
  5154. GetPix(20)),
  5155. isBra,
  5156. "ブラジャー",
  5157. style4);
  5158. isPanz = GUI.Toggle(new Rect(GetPix(90),
  5159. GetPix(123),
  5160. GetPix(60),
  5161. GetPix(20)),
  5162. isPanz,
  5163. "パンツ",
  5164. style4);
  5165. isHeadset = GUI.Toggle(new Rect(GetPix(5),
  5166. GetPix(148),
  5167. GetPix(70),
  5168. GetPix(20)),
  5169. isHeadset,
  5170. "ヘッド",
  5171. style4);
  5172. isMegane = GUI.Toggle(new Rect(GetPix(90),
  5173. GetPix(148),
  5174. GetPix(70),
  5175. GetPix(20)),
  5176. isMegane,
  5177. "メガネ",
  5178. style4);
  5179. isAccUde = GUI.Toggle(new Rect(GetPix(5),
  5180. GetPix(173),
  5181. GetPix(40),
  5182. GetPix(20)),
  5183. isAccUde,
  5184. "腕",
  5185. style4);
  5186. isGlove = GUI.Toggle(new Rect(GetPix(45),
  5187. GetPix(173),
  5188. GetPix(40),
  5189. GetPix(20)),
  5190. isGlove,
  5191. "手袋",
  5192. style4);
  5193. isAccSenaka = GUI.Toggle(new Rect(GetPix(97),
  5194. GetPix(173),
  5195. GetPix(40),
  5196. GetPix(20)),
  5197. isAccSenaka,
  5198. "背中",
  5199. style4);
  5200. isStkg = GUI.Toggle(new Rect(GetPix(5),
  5201. GetPix(198),
  5202. GetPix(70),
  5203. GetPix(20)),
  5204. isStkg,
  5205. "ソックス",
  5206. style4);
  5207. isShoes = GUI.Toggle(new Rect(GetPix(90),
  5208. GetPix(198),
  5209. GetPix(70),
  5210. GetPix(20)),
  5211. isShoes,
  5212. "シューズ",
  5213. style4);
  5214. mekure1[selectMaidIndex] =
  5215. GUI.Toggle(new Rect(GetPix(5),
  5216. GetPix(223),
  5217. GetPix(62),
  5218. GetPix(20)),
  5219. mekure1[selectMaidIndex],
  5220. "めくれ前",
  5221. style4);
  5222. mekure2[selectMaidIndex] =
  5223. GUI.Toggle(new Rect(GetPix(67),
  5224. GetPix(223),
  5225. GetPix(40),
  5226. GetPix(20)),
  5227. mekure2[selectMaidIndex],
  5228. "後ろ",
  5229. style4);
  5230. zurasi[selectMaidIndex] =
  5231. GUI.Toggle(new Rect(GetPix(105),
  5232. GetPix(223),
  5233. GetPix(50),
  5234. GetPix(20)),
  5235. zurasi[selectMaidIndex],
  5236. "ずらし",
  5237. style4);
  5238. }
  5239. bool state = GUI.enabled;
  5240. GUI.enabled = true;
  5241. GUI.DragWindow();
  5242. GUI.enabled = state;
  5243. }
  5244. private void FaceWindow(int winID)
  5245. {
  5246. GUIStyle style1 = "label";
  5247. style1.fontSize = GetPix(12);
  5248. style1.alignment = TextAnchor.UpperLeft;
  5249. GUIStyle style2 = "label";
  5250. style2.fontSize = GetPix(11);
  5251. style2.alignment = TextAnchor.UpperLeft;
  5252. GUIStyle style3 = "button";
  5253. style3.fontSize = GetPix(20);
  5254. GUIStyle buttonStyle = "button";
  5255. buttonStyle.fontSize = GetPix(12);
  5256. buttonStyle.alignment = TextAnchor.MiddleLeft;
  5257. GUIStyle style4 = new GUIStyle("toggle")
  5258. {
  5259. fontSize = GetPix(13)
  5260. };
  5261. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  5262. if (!faceInitFlg)
  5263. {
  5264. listStyle2.normal.textColor = Color.white;
  5265. listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  5266. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  5267. listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
  5268. listStyle2.fontSize = GetPix(12);
  5269. faceCombo.selectedItemIndex = 0;
  5270. List<string> stringList = new List<string>(300);
  5271. stringList.AddRange(faceArray);
  5272. for (int index = 1; index < 300; ++index)
  5273. {
  5274. IniKey iniKey = Preferences["face"]["f" + index];
  5275. if (iniKey.Value != null)
  5276. {
  5277. string[] strArray = iniKey.Value.Split(':');
  5278. if (strArray.Length > 1)
  5279. {
  5280. stringList.Add(strArray[0] + "               :" + index + ":" + strArray[1]);
  5281. }
  5282. }
  5283. else
  5284. {
  5285. break;
  5286. }
  5287. }
  5288. faceCombo.selectedItemIndex = 0;
  5289. faceComboList = new GUIContent[stringList.ToArray().Length];
  5290. for (int index = 0; index < stringList.ToArray().Length; ++index)
  5291. {
  5292. faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
  5293. }
  5294. faceInitFlg = true;
  5295. }
  5296. if (faceCombo.isClickedComboButton)
  5297. {
  5298. GUI.enabled = false;
  5299. }
  5300. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  5301. {
  5302. if (!isF6)
  5303. {
  5304. bool flag = true;
  5305. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  5306. {
  5307. flag = false;
  5308. }
  5309. if (GUI.Toggle(new Rect(GetPix(2),
  5310. GetPix(2),
  5311. GetPix(39),
  5312. GetPix(20)),
  5313. flag,
  5314. "配置",
  5315. style4))
  5316. {
  5317. faceFlg = false;
  5318. poseFlg = false;
  5319. // sceneFlg = false;
  5320. kankyoFlg = false;
  5321. kankyo2Flg = false;
  5322. bGui = true;
  5323. }
  5324. }
  5325. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
  5326. GetPix(2),
  5327. GetPix(39),
  5328. GetPix(20)),
  5329. poseFlg,
  5330. "操作",
  5331. style4))
  5332. {
  5333. poseFlg = true;
  5334. faceFlg = false;
  5335. // sceneFlg = false;
  5336. kankyoFlg = false;
  5337. kankyo2Flg = false;
  5338. }
  5339. if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
  5340. faceFlg,
  5341. "表情",
  5342. style4))
  5343. {
  5344. faceFlg = true;
  5345. poseFlg = false;
  5346. // sceneFlg = false;
  5347. kankyoFlg = false;
  5348. kankyo2Flg = false;
  5349. if (!faceFlg2)
  5350. {
  5351. isFaceInit = true;
  5352. faceFlg2 = true;
  5353. maidArray[selectMaidIndex].boMabataki = false;
  5354. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5355. }
  5356. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5357. }
  5358. if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
  5359. kankyoFlg,
  5360. "環境",
  5361. style4))
  5362. {
  5363. poseFlg = false;
  5364. faceFlg = false;
  5365. // sceneFlg = false;
  5366. kankyoFlg = true;
  5367. kankyo2Flg = false;
  5368. }
  5369. if (!line1)
  5370. {
  5371. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  5372. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  5373. }
  5374. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
  5375. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
  5376. style1.fontSize = GetPix(13);
  5377. style1.alignment = TextAnchor.MiddleCenter;
  5378. GUI.Label(new Rect(GetPix(125), GetPix(25), GetPix(40), GetPix(25)),
  5379. string.Concat(selectMaidIndex + 1),
  5380. style1);
  5381. style1.fontSize = GetPix(11);
  5382. style1.alignment = TextAnchor.UpperLeft;
  5383. }
  5384. if (sceneLevel > 0)
  5385. {
  5386. int selectMaidIndex = this.selectMaidIndex;
  5387. if (sceneLevel == 3 || sceneLevel == 5 && (isF7 || maidCnt > 1))
  5388. {
  5389. if (GUI.Button(new Rect(GetPix(5),
  5390. GetPix(53),
  5391. GetPix(23),
  5392. GetPix(32)),
  5393. "<",
  5394. style3))
  5395. {
  5396. --this.selectMaidIndex;
  5397. if (this.selectMaidIndex < 0)
  5398. {
  5399. this.selectMaidIndex = selectList.Count - 1;
  5400. }
  5401. isFaceInit = true;
  5402. faceFlg = true;
  5403. copyIndex = 0;
  5404. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  5405. }
  5406. if (GUI.Button(new Rect(GetPix(135),
  5407. GetPix(53),
  5408. GetPix(23),
  5409. GetPix(32)),
  5410. ">",
  5411. style3))
  5412. {
  5413. ++this.selectMaidIndex;
  5414. if (selectList.Count <= this.selectMaidIndex)
  5415. {
  5416. this.selectMaidIndex = 0;
  5417. }
  5418. isFaceInit = true;
  5419. faceFlg = true;
  5420. copyIndex = 0;
  5421. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  5422. }
  5423. }
  5424. if (maidArray[this.selectMaidIndex].GetThumIcon())
  5425. {
  5426. GUI.DrawTexture(new Rect(GetPix(30),
  5427. GetPix(25),
  5428. GetPix(60),
  5429. GetPix(60)),
  5430. maidArray[this.selectMaidIndex].GetThumIcon());
  5431. }
  5432. GUI.Label(new Rect(GetPix(90), GetPix(50), GetPix(140), GetPix(210)),
  5433. maidArray[this.selectMaidIndex].status.lastName + "\n" + maidArray[this.selectMaidIndex].status.firstName,
  5434. style1);
  5435. if (isFace[selectMaidIndex])
  5436. {
  5437. if (GUI.Button(new Rect(GetPix(5),
  5438. GetPix(25),
  5439. GetPix(23),
  5440. GetPix(23)),
  5441. "有",
  5442. style3))
  5443. {
  5444. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  5445. maidArray[selectMaidIndex].boMabataki = false;
  5446. isFace[selectMaidIndex] = false;
  5447. }
  5448. maidArray[selectMaidIndex].boMabataki = false;
  5449. }
  5450. else
  5451. {
  5452. if (GUI.Button(new Rect(GetPix(5),
  5453. GetPix(25),
  5454. GetPix(23),
  5455. GetPix(23)),
  5456. "無",
  5457. style3))
  5458. {
  5459. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  5460. maidArray[selectMaidIndex].boMabataki = false;
  5461. morph.EyeMabataki = 0.0f;
  5462. isFaceInit = true;
  5463. isFace[selectMaidIndex] = true;
  5464. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5465. }
  5466. GUI.enabled = false;
  5467. maidArray[selectMaidIndex].boMabataki = true;
  5468. }
  5469. }
  5470. if (GUI.Button(new Rect(GetPix(5), GetPix(95), GetPix(23), GetPix(23)),
  5471. "<",
  5472. style3))
  5473. {
  5474. --faceIndex[selectMaidIndex];
  5475. if (faceIndex[selectMaidIndex] <= -1)
  5476. {
  5477. faceIndex[selectMaidIndex] = faceComboList.Length - 1;
  5478. }
  5479. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  5480. maidArray[selectMaidIndex].boMabataki = false;
  5481. morph.EyeMabataki = 0.0f;
  5482. if (faceIndex[selectMaidIndex] < faceArray.Length)
  5483. {
  5484. morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
  5485. }
  5486. else
  5487. {
  5488. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  5489. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  5490. if (!isVR)
  5491. {
  5492. maidArray[selectMaidIndex].boMabataki = false;
  5493. }
  5494. string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
  5495. fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose")]] = float.Parse(strArray[0]);
  5496. fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose2")]] = float.Parse(strArray[1]);
  5497. fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
  5498. fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose6")]] = float.Parse(strArray[3]);
  5499. fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
  5500. fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
  5501. fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
  5502. fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
  5503. fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
  5504. fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
  5505. fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
  5506. fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
  5507. fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
  5508. fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
  5509. fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
  5510. fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
  5511. fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
  5512. fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose5")]] = float.Parse(strArray[17]);
  5513. fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
  5514. fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
  5515. fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
  5516. fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
  5517. fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
  5518. try
  5519. {
  5520. fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
  5521. }
  5522. catch { }
  5523. if (float.Parse(strArray[24]) == 1.0)
  5524. {
  5525. fieldValue1[(int)morph.hash["namida"]] = 1f;
  5526. }
  5527. else
  5528. {
  5529. fieldValue1[(int)morph.hash["namida"]] = 0.0f;
  5530. }
  5531. if (float.Parse(strArray[25]) == 1.0)
  5532. {
  5533. fieldValue1[(int)morph.hash["tear1"]] = 1f;
  5534. }
  5535. else
  5536. {
  5537. fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
  5538. }
  5539. if (float.Parse(strArray[26]) == 1.0)
  5540. {
  5541. fieldValue1[(int)morph.hash["tear2"]] = 1f;
  5542. }
  5543. else
  5544. {
  5545. fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
  5546. }
  5547. if (float.Parse(strArray[27]) == 1.0)
  5548. {
  5549. fieldValue1[(int)morph.hash["tear3"]] = 1f;
  5550. }
  5551. else
  5552. {
  5553. fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
  5554. }
  5555. if (float.Parse(strArray[28]) == 1.0)
  5556. {
  5557. fieldValue1[(int)morph.hash["shock"]] = 1f;
  5558. }
  5559. else
  5560. {
  5561. fieldValue1[(int)morph.hash["shock"]] = 0.0f;
  5562. }
  5563. if (float.Parse(strArray[29]) == 1.0)
  5564. {
  5565. fieldValue1[(int)morph.hash["yodare"]] = 1f;
  5566. }
  5567. else
  5568. {
  5569. fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
  5570. }
  5571. if (float.Parse(strArray[30]) == 1.0)
  5572. {
  5573. fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
  5574. }
  5575. else
  5576. {
  5577. fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
  5578. }
  5579. if (float.Parse(strArray[31]) == 1.0)
  5580. {
  5581. fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
  5582. }
  5583. else
  5584. {
  5585. fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
  5586. }
  5587. if (float.Parse(strArray[32]) == 1.0)
  5588. {
  5589. fieldValue1[(int)morph.hash["hohos"]] = 1f;
  5590. }
  5591. else
  5592. {
  5593. fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
  5594. }
  5595. if (float.Parse(strArray[33]) == 1.0)
  5596. {
  5597. fieldValue1[(int)morph.hash["hohol"]] = 1f;
  5598. }
  5599. else
  5600. {
  5601. fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
  5602. }
  5603. if (float.Parse(strArray[34]) == 1.0)
  5604. {
  5605. fieldValue1[(int)morph.hash["toothoff"]] = 1f;
  5606. }
  5607. else
  5608. {
  5609. fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
  5610. }
  5611. if (strArray.Length > 35)
  5612. {
  5613. morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
  5614. }
  5615. }
  5616. maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
  5617. isFaceInit = true;
  5618. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5619. }
  5620. if (GUI.Button(new Rect(GetPix(135), GetPix(95), GetPix(23), GetPix(23)),
  5621. ">",
  5622. style3))
  5623. {
  5624. ++faceIndex[selectMaidIndex];
  5625. if (faceIndex[selectMaidIndex] == faceComboList.Length)
  5626. {
  5627. faceIndex[selectMaidIndex] = 0;
  5628. }
  5629. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  5630. maidArray[selectMaidIndex].boMabataki = false;
  5631. morph.EyeMabataki = 0.0f;
  5632. if (faceIndex[selectMaidIndex] < faceArray.Length)
  5633. {
  5634. morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
  5635. }
  5636. else
  5637. {
  5638. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  5639. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  5640. if (!isVR)
  5641. {
  5642. maidArray[selectMaidIndex].boMabataki = false;
  5643. }
  5644. string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
  5645. fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose")]] = float.Parse(strArray[0]);
  5646. fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose2")]] = float.Parse(strArray[1]);
  5647. fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
  5648. fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose6")]] = float.Parse(strArray[3]);
  5649. fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
  5650. fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
  5651. fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
  5652. fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
  5653. fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
  5654. fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
  5655. fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
  5656. fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
  5657. fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
  5658. fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
  5659. fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
  5660. fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
  5661. fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
  5662. fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose5")]] = float.Parse(strArray[17]);
  5663. fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
  5664. fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
  5665. fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
  5666. fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
  5667. fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
  5668. try
  5669. {
  5670. fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
  5671. }
  5672. catch { }
  5673. if (float.Parse(strArray[24]) == 1.0)
  5674. {
  5675. fieldValue1[(int)morph.hash["namida"]] = 1f;
  5676. }
  5677. else
  5678. {
  5679. fieldValue1[(int)morph.hash["namida"]] = 0.0f;
  5680. }
  5681. if (float.Parse(strArray[25]) == 1.0)
  5682. {
  5683. fieldValue1[(int)morph.hash["tear1"]] = 1f;
  5684. }
  5685. else
  5686. {
  5687. fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
  5688. }
  5689. if (float.Parse(strArray[26]) == 1.0)
  5690. {
  5691. fieldValue1[(int)morph.hash["tear2"]] = 1f;
  5692. }
  5693. else
  5694. {
  5695. fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
  5696. }
  5697. if (float.Parse(strArray[27]) == 1.0)
  5698. {
  5699. fieldValue1[(int)morph.hash["tear3"]] = 1f;
  5700. }
  5701. else
  5702. {
  5703. fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
  5704. }
  5705. if (float.Parse(strArray[28]) == 1.0)
  5706. {
  5707. fieldValue1[(int)morph.hash["shock"]] = 1f;
  5708. }
  5709. else
  5710. {
  5711. fieldValue1[(int)morph.hash["shock"]] = 0.0f;
  5712. }
  5713. if (float.Parse(strArray[29]) == 1.0)
  5714. {
  5715. fieldValue1[(int)morph.hash["yodare"]] = 1f;
  5716. }
  5717. else
  5718. {
  5719. fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
  5720. }
  5721. if (float.Parse(strArray[30]) == 1.0)
  5722. {
  5723. fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
  5724. }
  5725. else
  5726. {
  5727. fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
  5728. }
  5729. if (float.Parse(strArray[31]) == 1.0)
  5730. {
  5731. fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
  5732. }
  5733. else
  5734. {
  5735. fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
  5736. }
  5737. if (float.Parse(strArray[32]) == 1.0)
  5738. {
  5739. fieldValue1[(int)morph.hash["hohos"]] = 1f;
  5740. }
  5741. else
  5742. {
  5743. fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
  5744. }
  5745. if (float.Parse(strArray[33]) == 1.0)
  5746. {
  5747. fieldValue1[(int)morph.hash["hohol"]] = 1f;
  5748. }
  5749. else
  5750. {
  5751. fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
  5752. }
  5753. if (float.Parse(strArray[34]) == 1.0)
  5754. {
  5755. fieldValue1[(int)morph.hash["toothoff"]] = 1f;
  5756. }
  5757. else
  5758. {
  5759. fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
  5760. }
  5761. if (strArray.Length > 35)
  5762. {
  5763. morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
  5764. }
  5765. }
  5766. maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
  5767. isFaceInit = true;
  5768. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5769. }
  5770. int offsetTop = GetPix(120);
  5771. int UIHeight = GetPix(510);
  5772. Rect faceWindowScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  5773. Rect faceWindowScrollView = new Rect(0, 0, rectWin.width - 20, UIHeight);
  5774. faceScrollPos = GUI.BeginScrollView(faceWindowScrollRect, faceScrollPos, faceWindowScrollView);
  5775. #region face sliders
  5776. int sliderWidth = GetPix(70);
  5777. int sliderHeight = GetPix(20);
  5778. int labelWidth = GetPix(100);
  5779. int labelHeight = GetPix(25);
  5780. int sliderLeft = 8;
  5781. int sliderRight = 88;
  5782. int labelPosition = 0;
  5783. int sliderPosition = 15;
  5784. int sliderOffset = 28;
  5785. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition),
  5786. labelWidth, labelHeight),
  5787. "目の開閉",
  5788. style2);
  5789. eyeclose = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5790. GetPix(sliderPosition),
  5791. sliderWidth, sliderHeight),
  5792. eyeclose,
  5793. 0.0f,
  5794. 1f);
  5795. GUI.Label(new Rect(GetPix(sliderRight), GetPix(labelPosition),
  5796. labelWidth, labelHeight),
  5797. "にっこり",
  5798. style2);
  5799. eyeclose2 = GUI.HorizontalSlider(new Rect(GetPix(sliderRight),
  5800. GetPix(sliderPosition),
  5801. sliderWidth, sliderHeight),
  5802. eyeclose2,
  5803. 0.0f,
  5804. 1f);
  5805. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset),
  5806. labelWidth, labelHeight),
  5807. "ジト目",
  5808. style2);
  5809. eyeclose3 = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5810. GetPix(sliderPosition + sliderOffset),
  5811. sliderWidth, sliderHeight),
  5812. eyeclose3,
  5813. 0.0f,
  5814. 1f);
  5815. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset),
  5816. labelWidth, labelHeight),
  5817. "見開く",
  5818. style2);
  5819. eyebig = GUI.HorizontalSlider(new Rect(GetPix(88),
  5820. GetPix(sliderPosition + sliderOffset),
  5821. sliderWidth, sliderHeight),
  5822. eyebig,
  5823. 0.0f,
  5824. 1f);
  5825. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 2),
  5826. labelWidth, labelHeight),
  5827. "ウインク1",
  5828. style2);
  5829. eyeclose6 = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5830. GetPix(sliderPosition + sliderOffset * 2),
  5831. sliderWidth, sliderHeight),
  5832. eyeclose6,
  5833. 0.0f,
  5834. 1f);
  5835. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 2),
  5836. labelWidth, labelHeight),
  5837. "ウインク2",
  5838. style2);
  5839. eyeclose5 = GUI.HorizontalSlider(new Rect(GetPix(88),
  5840. GetPix(sliderPosition + sliderOffset * 2),
  5841. sliderWidth, sliderHeight),
  5842. eyeclose5,
  5843. 0.0f,
  5844. 1f);
  5845. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 3),
  5846. labelWidth, labelHeight),
  5847. "ハイライト",
  5848. style2);
  5849. hitomih = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5850. GetPix(sliderPosition + sliderOffset * 3),
  5851. sliderWidth, sliderHeight),
  5852. hitomih,
  5853. 0.0f,
  5854. 2f);
  5855. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 3),
  5856. labelWidth, labelHeight),
  5857. "瞳サイズ",
  5858. style2);
  5859. hitomis = GUI.HorizontalSlider(new Rect(GetPix(88),
  5860. GetPix(sliderPosition + sliderOffset * 3),
  5861. sliderWidth, sliderHeight),
  5862. hitomis,
  5863. 0.0f,
  5864. 1f);
  5865. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 4),
  5866. labelWidth, labelHeight),
  5867. "眉角度1",
  5868. style2);
  5869. mayuha = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5870. GetPix(sliderPosition + sliderOffset * 4),
  5871. sliderWidth, sliderHeight),
  5872. mayuha,
  5873. 0.0f,
  5874. 1f);
  5875. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 4),
  5876. labelWidth, labelHeight),
  5877. "眉角度2",
  5878. style2);
  5879. mayuw = GUI.HorizontalSlider(new Rect(GetPix(88),
  5880. GetPix(sliderPosition + sliderOffset * 4),
  5881. sliderWidth, sliderHeight),
  5882. mayuw,
  5883. 0.0f,
  5884. 1f);
  5885. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 5),
  5886. labelWidth, labelHeight),
  5887. "眉上げ",
  5888. style2);
  5889. mayuup = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5890. GetPix(sliderPosition + sliderOffset * 5),
  5891. sliderWidth, sliderHeight),
  5892. mayuup,
  5893. 0.0f,
  5894. 0.8f);
  5895. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 5),
  5896. labelWidth, labelHeight),
  5897. "眉下げ1",
  5898. style2);
  5899. mayuv = GUI.HorizontalSlider(new Rect(GetPix(88),
  5900. GetPix(sliderPosition + sliderOffset * 5),
  5901. sliderWidth, sliderHeight),
  5902. mayuv,
  5903. 0.0f,
  5904. 0.8f);
  5905. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 6),
  5906. labelWidth, labelHeight),
  5907. "眉下げ2",
  5908. style2);
  5909. mayuvhalf = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5910. GetPix(sliderPosition + sliderOffset * 6),
  5911. sliderWidth, sliderHeight),
  5912. mayuvhalf,
  5913. 0.0f,
  5914. 0.9f);
  5915. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 7),
  5916. labelWidth, labelHeight),
  5917. "口開け1",
  5918. style2);
  5919. moutha = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5920. GetPix(sliderPosition + sliderOffset * 7),
  5921. sliderWidth, sliderHeight),
  5922. moutha,
  5923. 0.0f,
  5924. 1f);
  5925. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 7),
  5926. labelWidth, labelHeight),
  5927. "口開け2",
  5928. style2);
  5929. mouths = GUI.HorizontalSlider(new Rect(GetPix(88),
  5930. GetPix(sliderPosition + sliderOffset * 7),
  5931. sliderWidth, sliderHeight),
  5932. mouths,
  5933. 0.0f,
  5934. 0.9f);
  5935. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 8),
  5936. labelWidth, labelHeight),
  5937. "口幅狭く",
  5938. style2);
  5939. mouthc = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5940. GetPix(sliderPosition + sliderOffset * 8),
  5941. sliderWidth, sliderHeight),
  5942. mouthc,
  5943. 0.0f,
  5944. 1f);
  5945. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 8),
  5946. labelWidth, labelHeight),
  5947. "口幅広く",
  5948. style2);
  5949. mouthi = GUI.HorizontalSlider(new Rect(GetPix(88),
  5950. GetPix(sliderPosition + sliderOffset * 8),
  5951. sliderWidth, sliderHeight),
  5952. mouthi,
  5953. 0.0f,
  5954. 1f);
  5955. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 9),
  5956. labelWidth, labelHeight),
  5957. "口角上げ",
  5958. style2);
  5959. mouthup = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5960. GetPix(sliderPosition + sliderOffset * 9),
  5961. sliderWidth, sliderHeight),
  5962. mouthup,
  5963. 0.0f,
  5964. 1.4f);
  5965. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 9),
  5966. labelWidth, labelHeight),
  5967. "口角下げ",
  5968. style2);
  5969. mouthdw = GUI.HorizontalSlider(new Rect(GetPix(88),
  5970. GetPix(sliderPosition + sliderOffset * 9),
  5971. sliderWidth, sliderHeight),
  5972. mouthdw,
  5973. 0.0f,
  5974. 1f);
  5975. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 10),
  5976. labelWidth, labelHeight),
  5977. "口中央上げ",
  5978. style2);
  5979. mouthhe = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  5980. GetPix(sliderPosition + sliderOffset * 10),
  5981. sliderWidth, sliderHeight),
  5982. mouthhe,
  5983. 0.0f,
  5984. 1f);
  5985. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 10),
  5986. labelWidth, labelHeight),
  5987. "左口角上げ",
  5988. style2);
  5989. mouthuphalf = GUI.HorizontalSlider(new Rect(GetPix(88),
  5990. GetPix(sliderPosition + sliderOffset * 10),
  5991. sliderWidth, sliderHeight),
  5992. mouthuphalf,
  5993. 0.0f,
  5994. 2f);
  5995. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 11),
  5996. labelWidth, labelHeight),
  5997. "舌出し",
  5998. style2);
  5999. tangout = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6000. GetPix(sliderPosition + sliderOffset * 11),
  6001. sliderWidth, sliderHeight),
  6002. tangout,
  6003. 0.0f,
  6004. 1f);
  6005. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 11),
  6006. labelWidth, labelHeight),
  6007. "舌上げ",
  6008. style2);
  6009. tangup = GUI.HorizontalSlider(new Rect(GetPix(88),
  6010. GetPix(sliderPosition + sliderOffset * 11),
  6011. sliderWidth, sliderHeight),
  6012. tangup,
  6013. 0.0f,
  6014. 0.7f);
  6015. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 12),
  6016. labelWidth, labelHeight),
  6017. "舌根上げ",
  6018. style2);
  6019. tangopen = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6020. GetPix(sliderPosition + sliderOffset * 12),
  6021. sliderWidth, sliderHeight),
  6022. tangopen,
  6023. 0.0f,
  6024. 1f);
  6025. #endregion
  6026. #region face toggles
  6027. int togglePositionX = 5;
  6028. int togglePositionY = 370;
  6029. int toggleOffsetX = 55;
  6030. int toggleOffsetY = 22;
  6031. int toggleWidth = GetPix(55);
  6032. int toggleHeight = GetPix(16);
  6033. isHoho2 = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6034. GetPix(togglePositionY),
  6035. toggleWidth, toggleHeight),
  6036. isHoho2,
  6037. "赤面",
  6038. style4);
  6039. isShock = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6040. GetPix(togglePositionY),
  6041. toggleWidth, toggleHeight),
  6042. isShock,
  6043. "ショック",
  6044. style4);
  6045. isNosefook = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6046. GetPix(togglePositionY),
  6047. toggleWidth, toggleHeight),
  6048. isNosefook,
  6049. "鼻フック",
  6050. style4);
  6051. isNamida = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6052. GetPix(togglePositionY + toggleOffsetY * 1),
  6053. toggleWidth, toggleHeight),
  6054. isNamida,
  6055. "涙",
  6056. style4);
  6057. isYodare = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6058. GetPix(togglePositionY + toggleOffsetY * 1),
  6059. toggleWidth, toggleHeight),
  6060. isYodare,
  6061. "涎",
  6062. style4);
  6063. isToothoff = !GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6064. GetPix(togglePositionY + toggleOffsetY * 1),
  6065. toggleWidth, toggleHeight),
  6066. !isToothoff,
  6067. "歯",
  6068. style4);
  6069. isTear1 = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6070. GetPix(togglePositionY + toggleOffsetY * 2),
  6071. toggleWidth, toggleHeight),
  6072. isTear1,
  6073. "涙1",
  6074. style4);
  6075. isTear2 = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6076. GetPix(togglePositionY + toggleOffsetY * 2),
  6077. toggleWidth, toggleHeight),
  6078. isTear2,
  6079. "涙2",
  6080. style4);
  6081. isTear3 = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6082. GetPix(togglePositionY + toggleOffsetY * 2),
  6083. toggleWidth, toggleHeight),
  6084. isTear3,
  6085. "涙3",
  6086. style4);
  6087. isHohos = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6088. GetPix(togglePositionY + toggleOffsetY * 3),
  6089. toggleWidth, toggleHeight),
  6090. isHohos,
  6091. "頬1",
  6092. style4);
  6093. isHoho = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6094. GetPix(togglePositionY + toggleOffsetY * 3),
  6095. toggleWidth, toggleHeight),
  6096. isHoho,
  6097. "頬2",
  6098. style4);
  6099. isHohol = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6100. GetPix(togglePositionY + toggleOffsetY * 3),
  6101. toggleWidth, toggleHeight),
  6102. isHohol,
  6103. "頬3",
  6104. style4);
  6105. #endregion
  6106. int faceSaveToggleY = togglePositionY + toggleOffsetY * 4;
  6107. int faceSaveInputY = faceSaveToggleY + 20;
  6108. isFaceEdit = GUI.Toggle(new Rect(GetPix(5),
  6109. GetPix(faceSaveToggleY),
  6110. toggleWidth, toggleHeight),
  6111. isFaceEdit,
  6112. "登録",
  6113. style4);
  6114. if (isFaceEdit)
  6115. {
  6116. inName4 = GUI.TextField(new Rect(GetPix(5),
  6117. GetPix(faceSaveInputY),
  6118. GetPix(100),
  6119. GetPix(20)),
  6120. inName4);
  6121. if (GUI.Button(new Rect(GetPix(107),
  6122. GetPix(faceSaveInputY),
  6123. GetPix(35),
  6124. GetPix(20)),
  6125. "追加",
  6126. style3))
  6127. {
  6128. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  6129. GUI.FocusControl("");
  6130. int num2 = 1;
  6131. for (int index = 1; index < 1000; ++index)
  6132. {
  6133. if (Preferences["face"]["f" + index].Value == null)
  6134. {
  6135. num2 = index;
  6136. break;
  6137. }
  6138. }
  6139. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  6140. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  6141. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  6142. string str1 = inName4 + ":"
  6143. + fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose")]] + ","
  6144. + fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose2")]] + ","
  6145. + fieldValue2[(int)morph.hash["eyeclose3"]] + ","
  6146. + fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose6")]] + ","
  6147. + fieldValue1[(int)morph.hash["hitomih"]] + ","
  6148. + fieldValue1[(int)morph.hash["hitomis"]] + ","
  6149. + fieldValue1[(int)morph.hash["mayuha"]] + ","
  6150. + fieldValue1[(int)morph.hash["mayuup"]] + ","
  6151. + fieldValue1[(int)morph.hash["mayuv"]] + ","
  6152. + fieldValue1[(int)morph.hash["mayuvhalf"]] + ","
  6153. + fieldValue1[(int)morph.hash["moutha"]] + ","
  6154. + fieldValue1[(int)morph.hash["mouths"]] + ","
  6155. + fieldValue1[(int)morph.hash["mouthdw"]] + ","
  6156. + fieldValue1[(int)morph.hash["mouthup"]] + ","
  6157. + fieldValue1[(int)morph.hash["tangout"]] + ","
  6158. + fieldValue1[(int)morph.hash["tangup"]] + ","
  6159. + fieldValue1[(int)morph.hash["eyebig"]] + ","
  6160. + fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose5")]] + ","
  6161. + fieldValue1[(int)morph.hash["mayuw"]] + ","
  6162. + fieldValue1[(int)morph.hash["mouthhe"]] + ","
  6163. + fieldValue1[(int)morph.hash["mouthc"]] + ","
  6164. + fieldValue1[(int)morph.hash["mouthi"]] + ","
  6165. + fieldValue1[(int)morph.hash["mouthuphalf"]] + ",";
  6166. string str2;
  6167. try
  6168. {
  6169. str2 = str1 + fieldValue1[(int)morph.hash["tangopen"]] + ",";
  6170. }
  6171. catch
  6172. {
  6173. str2 = str1 + "0,";
  6174. }
  6175. string str3 = fieldValue1[(int)morph.hash["namida"]] <= 0.0
  6176. ? str2 + 0 + ","
  6177. : str2 + 1 + ",";
  6178. string str4 = fieldValue1[(int)morph.hash["tear1"]] <= 0.0
  6179. ? str3 + 0 + ","
  6180. : str3 + 1 + ",";
  6181. string str5 = fieldValue1[(int)morph.hash["tear2"]] <= 0.0
  6182. ? str4 + 0 + ","
  6183. : str4 + 1 + ",";
  6184. string str6 = fieldValue1[(int)morph.hash["tear3"]] <= 0.0
  6185. ? str5 + 0 + ","
  6186. : str5 + 1 + ",";
  6187. string str7 = fieldValue1[(int)morph.hash["shock"]] <= 0.0
  6188. ? str6 + 0 + ","
  6189. : str6 + 1 + ",";
  6190. string str8 = fieldValue1[(int)morph.hash["yodare"]] <= 0.0
  6191. ? str7 + 0 + ","
  6192. : str7 + 1 + ",";
  6193. string str9 = fieldValue1[(int)morph.hash["hoho"]] <= 0.0
  6194. ? str8 + 0 + ","
  6195. : str8 + 1 + ",";
  6196. string str10 = fieldValue1[(int)morph.hash["hoho2"]] <= 0.0
  6197. ? str9 + 0 + ","
  6198. : str9 + 1 + ",";
  6199. string str11 = fieldValue1[(int)morph.hash["hohos"]] <= 0.0
  6200. ? str10 + 0 + ","
  6201. : str10 + 1 + ",";
  6202. string str12 = fieldValue1[(int)morph.hash["hohol"]] <= 0.0
  6203. ? str11 + 0 + ","
  6204. : str11 + 1 + ",";
  6205. string str13 = fieldValue1[(int)morph.hash["toothoff"]] <= 0.0
  6206. ? str12 + 0 + ","
  6207. : str12 + 1 + ",";
  6208. string str14 = fieldValue1[(int)morph.hash["nosefook"]] <= 0.0
  6209. ? str13 + 0 + ":"
  6210. : str13 + 1 + ":";
  6211. Preferences["face"]["f" + num2].Value = str14;
  6212. SaveConfig();
  6213. List<string> stringList = new List<string>(300);
  6214. stringList.AddRange(faceArray);
  6215. for (int index = 1; index < 300; ++index)
  6216. {
  6217. IniKey iniKey = Preferences["face"]["f" + index];
  6218. if (iniKey.Value != null)
  6219. {
  6220. string[] strArray = iniKey.Value.Split(':');
  6221. if (strArray.Length > 1)
  6222. {
  6223. stringList.Add(strArray[0] + "               :" + index + ":" + strArray[1]);
  6224. }
  6225. }
  6226. else
  6227. {
  6228. break;
  6229. }
  6230. }
  6231. faceCombo.selectedItemIndex = 0;
  6232. faceComboList = new GUIContent[stringList.ToArray().Length];
  6233. for (int index = 0; index < stringList.ToArray().Length; ++index)
  6234. {
  6235. faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
  6236. }
  6237. faceCombo.selectedItemIndex = stringList.ToArray().Length - 1;
  6238. inName4 = "";
  6239. }
  6240. if (faceIndex[selectMaidIndex] < faceArray.Length)
  6241. {
  6242. GUI.enabled = false;
  6243. }
  6244. if (GUI.Button(new Rect(GetPix(144),
  6245. GetPix(faceSaveInputY),
  6246. GetPix(24),
  6247. GetPix(20)),
  6248. "削",
  6249. style3))
  6250. {
  6251. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  6252. Preferences["face"]["f" + faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[1]].Value = "del";
  6253. SaveConfig();
  6254. List<string> stringList = new List<string>(300);
  6255. stringList.AddRange(faceArray);
  6256. for (int index = 1; index < 300; ++index)
  6257. {
  6258. IniKey iniKey = Preferences["face"]["f" + index];
  6259. if (iniKey.Value != null)
  6260. {
  6261. string[] strArray = iniKey.Value.Split(':');
  6262. if (strArray.Length > 1)
  6263. {
  6264. stringList.Add(strArray[0] + "               :" + index + ":" + strArray[1]);
  6265. }
  6266. }
  6267. else
  6268. {
  6269. break;
  6270. }
  6271. }
  6272. faceCombo.selectedItemIndex = 0;
  6273. faceComboList = new GUIContent[stringList.ToArray().Length];
  6274. for (int index = 0; index < stringList.ToArray().Length; ++index)
  6275. {
  6276. faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
  6277. }
  6278. faceCombo.selectedItemIndex = 0;
  6279. for (int index = 0; index < maidCnt; ++index)
  6280. {
  6281. if (maidArray[index] && maidArray[index].Visible
  6282. && stringList.ToArray().Length <= faceIndex[index])
  6283. {
  6284. faceIndex[index] = 0;
  6285. }
  6286. }
  6287. }
  6288. GUI.enabled = true;
  6289. }
  6290. GUI.EndScrollView();
  6291. if (faceCombo.isClickedComboButton)
  6292. {
  6293. GUI.enabled = true;
  6294. }
  6295. if (isFace[selectMaidIndex])
  6296. {
  6297. faceIndex[selectMaidIndex] =
  6298. faceCombo.List(new Rect(GetPix(35),
  6299. GetPix(95),
  6300. GetPix(95),
  6301. GetPix(23)),
  6302. faceComboList[faceIndex[selectMaidIndex]].text,
  6303. faceComboList,
  6304. buttonStyle,
  6305. "box",
  6306. listStyle2);
  6307. }
  6308. else
  6309. {
  6310. faceCombo.List(new Rect(GetPix(35), GetPix(95), GetPix(95), GetPix(23)),
  6311. faceComboList[faceIndex[selectMaidIndex]].text,
  6312. faceComboList,
  6313. buttonStyle,
  6314. "box",
  6315. listStyle2);
  6316. }
  6317. if (faceCombo.isClickedComboButton)
  6318. {
  6319. isCombo = true;
  6320. }
  6321. else if (isCombo)
  6322. {
  6323. isCombo = false;
  6324. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  6325. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  6326. morph.EyeMabataki = 0.0f;
  6327. if (faceIndex[selectMaidIndex] < faceArray.Length)
  6328. {
  6329. morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
  6330. }
  6331. else
  6332. {
  6333. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  6334. if (!isVR)
  6335. {
  6336. maidArray[selectMaidIndex].boMabataki = false;
  6337. }
  6338. string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
  6339. fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose")]] = float.Parse(strArray[0]);
  6340. fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose2")]] = float.Parse(strArray[1]);
  6341. fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
  6342. fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose6")]] = float.Parse(strArray[3]);
  6343. fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
  6344. fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
  6345. fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
  6346. fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
  6347. fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
  6348. fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
  6349. fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
  6350. fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
  6351. fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
  6352. fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
  6353. fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
  6354. fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
  6355. fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
  6356. fieldValue2[(int)morph.hash[EyeCloseFaceKey(morph.bodyskin, "eyeclose5")]] = float.Parse(strArray[17]);
  6357. fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
  6358. fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
  6359. fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
  6360. fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
  6361. fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
  6362. try
  6363. {
  6364. fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
  6365. }
  6366. catch { }
  6367. if (float.Parse(strArray[24]) == 1.0)
  6368. {
  6369. fieldValue1[(int)morph.hash["namida"]] = 1f;
  6370. }
  6371. else
  6372. {
  6373. fieldValue1[(int)morph.hash["namida"]] = 0.0f;
  6374. }
  6375. if (float.Parse(strArray[25]) == 1.0)
  6376. {
  6377. fieldValue1[(int)morph.hash["tear1"]] = 1f;
  6378. }
  6379. else
  6380. {
  6381. fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
  6382. }
  6383. if (float.Parse(strArray[26]) == 1.0)
  6384. {
  6385. fieldValue1[(int)morph.hash["tear2"]] = 1f;
  6386. }
  6387. else
  6388. {
  6389. fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
  6390. }
  6391. if (float.Parse(strArray[27]) == 1.0)
  6392. {
  6393. fieldValue1[(int)morph.hash["tear3"]] = 1f;
  6394. }
  6395. else
  6396. {
  6397. fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
  6398. }
  6399. if (float.Parse(strArray[28]) == 1.0)
  6400. {
  6401. fieldValue1[(int)morph.hash["shock"]] = 1f;
  6402. }
  6403. else
  6404. {
  6405. fieldValue1[(int)morph.hash["shock"]] = 0.0f;
  6406. }
  6407. if (float.Parse(strArray[29]) == 1.0)
  6408. {
  6409. fieldValue1[(int)morph.hash["yodare"]] = 1f;
  6410. }
  6411. else
  6412. {
  6413. fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
  6414. }
  6415. if (float.Parse(strArray[30]) == 1.0)
  6416. {
  6417. fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
  6418. }
  6419. else
  6420. {
  6421. fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
  6422. }
  6423. if (float.Parse(strArray[31]) == 1.0)
  6424. {
  6425. fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
  6426. }
  6427. else
  6428. {
  6429. fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
  6430. }
  6431. if (float.Parse(strArray[32]) == 1.0)
  6432. {
  6433. fieldValue1[(int)morph.hash["hohos"]] = 1f;
  6434. }
  6435. else
  6436. {
  6437. fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
  6438. }
  6439. if (float.Parse(strArray[33]) == 1.0)
  6440. {
  6441. fieldValue1[(int)morph.hash["hohol"]] = 1f;
  6442. }
  6443. else
  6444. {
  6445. fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
  6446. }
  6447. if (float.Parse(strArray[34]) == 1.0)
  6448. {
  6449. fieldValue1[(int)morph.hash["toothoff"]] = 1f;
  6450. }
  6451. else
  6452. {
  6453. fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
  6454. }
  6455. if (strArray.Length > 35)
  6456. {
  6457. morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
  6458. }
  6459. }
  6460. maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
  6461. isFaceInit = true;
  6462. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  6463. }
  6464. GUI.enabled = !faceCombo.isClickedComboButton;
  6465. bool state = GUI.enabled;
  6466. GUI.enabled = true;
  6467. GUI.DragWindow();
  6468. GUI.enabled = state;
  6469. yotogiFlg = false;
  6470. if (sceneLevel != 14
  6471. || !GameObject
  6472. .Find("/UI Root/YotogiPlayPanel/CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit"))
  6473. {
  6474. return;
  6475. }
  6476. yotogiFlg = true;
  6477. }
  6478. private void MaidCallWindow(int winID)
  6479. {
  6480. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  6481. GUIStyle style1 = "label";
  6482. style1.fontSize = GetPix(14);
  6483. style1.alignment = TextAnchor.UpperLeft;
  6484. GUIStyle style2 = "button";
  6485. style2.fontSize = GetPix(16);
  6486. style2.alignment = TextAnchor.MiddleCenter;
  6487. GUIStyle style3 = new GUIStyle("toggle")
  6488. {
  6489. fontSize = GetPix(13)
  6490. };
  6491. float pix = GetPix(70);
  6492. if (comboBoxList == null)
  6493. {
  6494. comboBoxControl.selectedItemIndex = 0;
  6495. comboBoxList = new GUIContent[11];
  6496. comboBoxList[0] = new GUIContent("通常");
  6497. comboBoxList[1] = new GUIContent("横一列");
  6498. comboBoxList[2] = new GUIContent("縦一列");
  6499. comboBoxList[3] = new GUIContent("斜め");
  6500. comboBoxList[4] = new GUIContent("円(外向き)");
  6501. comboBoxList[5] = new GUIContent("円(内向き)");
  6502. comboBoxList[6] = new GUIContent("扇");
  6503. comboBoxList[7] = new GUIContent("V");
  6504. comboBoxList[8] = new GUIContent("^");
  6505. comboBoxList[9] = new GUIContent("M");
  6506. comboBoxList[10] = new GUIContent("W");
  6507. }
  6508. bool flag1 = true;
  6509. if (faceFlg || poseFlg || /*sceneFlg ||*/ kankyoFlg || kankyo2Flg)
  6510. {
  6511. flag1 = false;
  6512. }
  6513. if (!isF6 && GUI.Toggle(new Rect(GetPix(2),
  6514. GetPix(2),
  6515. GetPix(39),
  6516. GetPix(20)),
  6517. flag1,
  6518. "配置",
  6519. style3))
  6520. {
  6521. faceFlg = false;
  6522. poseFlg = false;
  6523. // sceneFlg = false;
  6524. kankyoFlg = false;
  6525. kankyo2Flg = false;
  6526. bGui = true;
  6527. }
  6528. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
  6529. GetPix(2),
  6530. GetPix(39),
  6531. GetPix(20)),
  6532. poseFlg,
  6533. "操作",
  6534. style3))
  6535. {
  6536. poseFlg = true;
  6537. faceFlg = false;
  6538. // sceneFlg = false;
  6539. kankyoFlg = false;
  6540. kankyo2Flg = false;
  6541. }
  6542. if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
  6543. faceFlg,
  6544. "表情",
  6545. style3))
  6546. {
  6547. faceFlg = true;
  6548. poseFlg = false;
  6549. // sceneFlg = false;
  6550. kankyoFlg = false;
  6551. kankyo2Flg = false;
  6552. if (!faceFlg2)
  6553. {
  6554. isFaceInit = true;
  6555. faceFlg2 = true;
  6556. maidArray[selectMaidIndex].boMabataki = false;
  6557. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  6558. }
  6559. }
  6560. if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
  6561. kankyoFlg,
  6562. "環境",
  6563. style3))
  6564. {
  6565. poseFlg = false;
  6566. faceFlg = false;
  6567. // sceneFlg = false;
  6568. kankyoFlg = true;
  6569. kankyo2Flg = false;
  6570. }
  6571. if (!line1)
  6572. {
  6573. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  6574. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  6575. }
  6576. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
  6577. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
  6578. int stockMaidCount1 = characterMgr.GetStockMaidCount();
  6579. Rect position;
  6580. Rect viewRect;
  6581. if (sceneLevel != 5)
  6582. {
  6583. position = new Rect(GetPix(7),
  6584. GetPix(110),
  6585. rectWin.width - GetPix(14),
  6586. rectWin.height * 0.83f);
  6587. viewRect = new Rect(0.0f,
  6588. 0.0f,
  6589. position.width * 0.85f,
  6590. (pix + GetPix(5)) * stockMaidCount1 + GetPix(15));
  6591. }
  6592. else
  6593. {
  6594. position = new Rect(GetPix(7),
  6595. GetPix(110),
  6596. rectWin.width - GetPix(14),
  6597. (float)(rectWin.height * 0.829999983310699 * 0.980000019073486));
  6598. viewRect = new Rect(0.0f,
  6599. 0.0f,
  6600. position.width * 0.85f,
  6601. (float)((pix + (double)GetPix(5)) * stockMaidCount1
  6602. + GetPix(15) * 0.920000016689301));
  6603. }
  6604. float y = 0.0f;
  6605. if (comboBoxControl.isClickedComboButton)
  6606. {
  6607. GUI.enabled = false;
  6608. }
  6609. if (GUI.Button(new Rect(GetPix(10), GetPix(78), rectWin.width * 0.85f, GetPix(28)),
  6610. "呼び出す",
  6611. style2))
  6612. {
  6613. isYobidashi = true;
  6614. selectMaidIndex = 0;
  6615. copyIndex = 0;
  6616. for (int index = 0; index < maxMaidCnt; ++index)
  6617. {
  6618. if (!isLock[index] && maidArray[index] && maidArray[index].Visible)
  6619. {
  6620. maidArray[index].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  6621. maidArray[index].SetAutoTwistAll(true);
  6622. }
  6623. maidArray[index] = null;
  6624. }
  6625. for (int index = 0; index < maxMaidCnt; ++index)
  6626. {
  6627. isStop[index] = false;
  6628. }
  6629. bGui = false;
  6630. isFadeOut = true;
  6631. GameMain.Instance.MainCamera.FadeOut(0.0f, false, null, true, new Color());
  6632. for (int index = 0; index < characterMgr.GetStockMaidCount(); ++index)
  6633. {
  6634. characterMgr.GetStockMaidList()[index].Visible = false;
  6635. }
  6636. }
  6637. GUIStyle style4 = "button";
  6638. style4.fontSize = GetPix(13);
  6639. GUIStyleState guiStyleState = new GUIStyleState();
  6640. if (GUI.Button(new Rect(GetPix(10), GetPix(52), rectWin.width * 0.4f, GetPix(23)),
  6641. "7人選択",
  6642. style4))
  6643. {
  6644. if (sceneLevel != 5)
  6645. {
  6646. selectList = new ArrayList
  6647. {
  6648. 0,
  6649. 1,
  6650. 2,
  6651. 3,
  6652. 4,
  6653. 5,
  6654. 6
  6655. };
  6656. }
  6657. else
  6658. {
  6659. int stockMaidCount2 = characterMgr.GetStockMaidCount();
  6660. selectList = new ArrayList
  6661. {
  6662. editMaid
  6663. };
  6664. if (stockMaidCount2 > 1)
  6665. {
  6666. if (editMaid >= 1)
  6667. {
  6668. selectList.Add(0);
  6669. }
  6670. else if (stockMaidCount2 > 2)
  6671. {
  6672. selectList.Add(1);
  6673. }
  6674. }
  6675. if (stockMaidCount2 > 2)
  6676. {
  6677. if (editMaid >= 2)
  6678. {
  6679. selectList.Add(1);
  6680. }
  6681. else if (stockMaidCount2 > 3)
  6682. {
  6683. selectList.Add(2);
  6684. }
  6685. }
  6686. if (stockMaidCount2 > 3)
  6687. {
  6688. if (editMaid >= 3)
  6689. {
  6690. selectList.Add(2);
  6691. }
  6692. else if (stockMaidCount2 > 4)
  6693. {
  6694. selectList.Add(3);
  6695. }
  6696. }
  6697. if (stockMaidCount2 > 4)
  6698. {
  6699. if (editMaid >= 4)
  6700. {
  6701. selectList.Add(3);
  6702. }
  6703. else if (stockMaidCount2 > 5)
  6704. {
  6705. selectList.Add(4);
  6706. }
  6707. }
  6708. if (stockMaidCount2 > 5)
  6709. {
  6710. if (editMaid >= 5)
  6711. {
  6712. selectList.Add(4);
  6713. }
  6714. else if (stockMaidCount2 > 6)
  6715. {
  6716. selectList.Add(5);
  6717. }
  6718. }
  6719. if (stockMaidCount2 > 6)
  6720. {
  6721. if (editMaid >= 6)
  6722. {
  6723. selectList.Add(5);
  6724. }
  6725. else if (stockMaidCount2 > 7)
  6726. {
  6727. selectList.Add(6);
  6728. }
  6729. }
  6730. }
  6731. }
  6732. if (GUI.Button(new Rect(rectWin.width * 0.5f, GetPix(52), rectWin.width * 0.4f, GetPix(23)),
  6733. "選択解除",
  6734. style4))
  6735. {
  6736. selectList = new ArrayList();
  6737. if (sceneLevel == 5)
  6738. {
  6739. selectList.Add(editMaid);
  6740. }
  6741. }
  6742. GUI.enabled = true;
  6743. maidCallScrollPos = GUI.BeginScrollView(position, maidCallScrollPos, viewRect);
  6744. for (int nStockNo = 0; nStockNo < characterMgr.GetStockMaidCount(); ++nStockNo)
  6745. {
  6746. GUI.enabled = true;
  6747. GUI.DrawTexture(new Rect(2f, y + 2f, (float)(rectWin.width * 0.829999983310699 - 4.0), pix - 4f),
  6748. Texture2D.whiteTexture);
  6749. bool flag2 = false;
  6750. for (int index = 0; index < selectList.Count; ++index)
  6751. {
  6752. if ((int)selectList[index] == nStockNo)
  6753. {
  6754. flag2 = true;
  6755. break;
  6756. }
  6757. }
  6758. if (comboBoxControl.isClickedComboButton)
  6759. {
  6760. GUI.enabled = false;
  6761. GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2);
  6762. GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2);
  6763. }
  6764. if (GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2))
  6765. {
  6766. if (flag2)
  6767. {
  6768. for (int index = 0; index < selectList.Count; ++index)
  6769. {
  6770. if ((int)selectList[index] == nStockNo && (sceneLevel != 5 || (int)selectList[index] != editMaid))
  6771. {
  6772. selectList.Remove(nStockNo);
  6773. break;
  6774. }
  6775. }
  6776. }
  6777. else
  6778. {
  6779. if (selectList.Count > maxMaidCnt - 1)
  6780. {
  6781. selectList.Remove(selectList[maxMaidCnt - 1]);
  6782. }
  6783. selectList.Add(nStockNo);
  6784. }
  6785. }
  6786. GUI.enabled = true;
  6787. if (flag2)
  6788. {
  6789. GUI.DrawTexture(new Rect(5f, y + 5f, (float)(rectWin.width * 0.829999983310699 - 10.0), pix - 10f),
  6790. Texture2D.whiteTexture);
  6791. }
  6792. if (characterMgr.GetStockMaid(nStockNo).GetThumIcon())
  6793. {
  6794. GUI.DrawTexture(new Rect(0.0f, y - 5f, pix, pix), characterMgr.GetStockMaid(nStockNo).GetThumIcon());
  6795. }
  6796. string text = characterMgr.GetStockMaid(nStockNo).status.lastName + "\n"
  6797. + characterMgr.GetStockMaid(nStockNo).status.firstName;
  6798. guiStyleState.textColor = Color.black;
  6799. style1.normal = guiStyleState;
  6800. GUI.Label(new Rect(GetPix(65), y + pix / 4f, pix * 2f, pix * 3f), text, style1);
  6801. if (flag2)
  6802. {
  6803. for (int index = 0; index < selectList.Count; ++index)
  6804. {
  6805. if ((int)selectList[index] == nStockNo)
  6806. {
  6807. GUI.Label(new Rect(rectWin.width * 0.7f, y + 6f, pix, pix), (index + 1).ToString(), style1);
  6808. break;
  6809. }
  6810. }
  6811. }
  6812. y += pix + GetPix(5);
  6813. }
  6814. GUI.EndScrollView();
  6815. guiStyleState.textColor = Color.white;
  6816. style1.normal = guiStyleState;
  6817. comboBoxControl.List(new Rect(GetPix(10), GetPix(25), rectWin.width * 0.56f, GetPix(24)),
  6818. comboBoxList[comboBoxControl.GetSelectedItemIndex()].text,
  6819. comboBoxList,
  6820. listStyle);
  6821. bool OKButton = GUI.Button(new Rect(rectWin.width * 0.66f, GetPix(25), rectWin.width * 0.24f, GetPix(24)),
  6822. "決定",
  6823. style4);
  6824. GUI.DragWindow();
  6825. if (!OKButton)
  6826. {
  6827. return;
  6828. }
  6829. for (int index = 0; index < maxMaidCnt; ++index)
  6830. {
  6831. isStop[index] = false;
  6832. }
  6833. switch (comboBoxControl.GetSelectedItemIndex())
  6834. {
  6835. case 0:
  6836. for (int index = 0; index < maidCnt; ++index)
  6837. {
  6838. Vector3 zero1 = Vector3.zero;
  6839. Vector3 zero2 = Vector3.zero;
  6840. if (selectList.Count <= 7)
  6841. {
  6842. if (selectList.Count % 2 == 1)
  6843. {
  6844. switch (index)
  6845. {
  6846. case 0:
  6847. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f));
  6848. break;
  6849. case 1:
  6850. maidArray[index].SetPos(new Vector3(-0.6f, 0.0f, 0.26f));
  6851. break;
  6852. case 2:
  6853. maidArray[index].SetPos(new Vector3(0.6f, 0.0f, 0.26f));
  6854. break;
  6855. case 3:
  6856. maidArray[index].SetPos(new Vector3(-1.1f, 0.0f, 0.69f));
  6857. break;
  6858. case 4:
  6859. maidArray[index].SetPos(new Vector3(1.1f, 0.0f, 0.69f));
  6860. break;
  6861. case 5:
  6862. maidArray[index].SetPos(new Vector3(-1.47f, 0.0f, 1.1f));
  6863. break;
  6864. case 6:
  6865. maidArray[index].SetPos(new Vector3(1.47f, 0.0f, 1.1f));
  6866. break;
  6867. }
  6868. }
  6869. else
  6870. {
  6871. switch (index)
  6872. {
  6873. case 0:
  6874. maidArray[index].SetPos(new Vector3(0.3f, 0.0f, 0.0f));
  6875. break;
  6876. case 1:
  6877. maidArray[index].SetPos(new Vector3(-0.3f, 0.0f, 0.0f));
  6878. break;
  6879. case 2:
  6880. maidArray[index].SetPos(new Vector3(0.7f, 0.0f, 0.4f));
  6881. break;
  6882. case 3:
  6883. maidArray[index].SetPos(new Vector3(-0.7f, 0.0f, 0.4f));
  6884. break;
  6885. case 4:
  6886. maidArray[index].SetPos(new Vector3(1f, 0.0f, 0.9f));
  6887. break;
  6888. case 5:
  6889. maidArray[index].SetPos(new Vector3(-1f, 0.0f, 0.9f));
  6890. break;
  6891. }
  6892. }
  6893. }
  6894. else
  6895. {
  6896. float num1 = 0.0f;
  6897. if (selectList.Count >= 11)
  6898. {
  6899. float num2 = -0.4f;
  6900. if (selectList.Count % 2 == 1)
  6901. {
  6902. switch (index)
  6903. {
  6904. case 0:
  6905. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f + num2));
  6906. break;
  6907. case 1:
  6908. maidArray[index].SetPos(new Vector3(-0.5f, 0.0f, 0.2f + num2));
  6909. break;
  6910. case 2:
  6911. maidArray[index].SetPos(new Vector3(0.5f, 0.0f, 0.2f + num2));
  6912. break;
  6913. case 3:
  6914. maidArray[index].SetPos(new Vector3(-0.9f, 0.0f, 0.55f + num2));
  6915. break;
  6916. case 4:
  6917. maidArray[index].SetPos(new Vector3(0.9f, 0.0f, 0.55f + num2));
  6918. break;
  6919. case 5:
  6920. maidArray[index].SetPos(new Vector3(-1.25f, 0.0f, 0.9f + num2));
  6921. break;
  6922. case 6:
  6923. maidArray[index].SetPos(new Vector3(1.25f, 0.0f, 0.9f + num2));
  6924. break;
  6925. case 7:
  6926. maidArray[index].SetPos(new Vector3(-1.57f, 0.0f, 1.3f + num2));
  6927. break;
  6928. case 8:
  6929. maidArray[index].SetPos(new Vector3(1.57f, 0.0f, 1.3f + num2));
  6930. break;
  6931. case 9:
  6932. maidArray[index].SetPos(new Vector3(-1.77f, 0.0f, 1.72f + num2));
  6933. break;
  6934. case 10:
  6935. maidArray[index].SetPos(new Vector3(1.77f, 0.0f, 1.72f + num2));
  6936. break;
  6937. case 11:
  6938. maidArray[index].SetPos(new Vector3(-1.85f, 0.0f, 2.17f + num2));
  6939. break;
  6940. case 12:
  6941. maidArray[index].SetPos(new Vector3(1.85f, 0.0f, 2.17f + num2));
  6942. break;
  6943. default:
  6944. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f + num2));
  6945. break;
  6946. }
  6947. }
  6948. else
  6949. {
  6950. switch (index)
  6951. {
  6952. case 0:
  6953. maidArray[index].SetPos(new Vector3(0.25f, 0.0f, 0.0f + num2));
  6954. break;
  6955. case 1:
  6956. maidArray[index].SetPos(new Vector3(-0.25f, 0.0f, 0.0f + num2));
  6957. break;
  6958. case 2:
  6959. maidArray[index].SetPos(new Vector3(0.7f, 0.0f, 0.25f + num2));
  6960. break;
  6961. case 3:
  6962. maidArray[index].SetPos(new Vector3(-0.7f, 0.0f, 0.25f + num2));
  6963. break;
  6964. case 4:
  6965. maidArray[index].SetPos(new Vector3(1.05f, 0.0f, 0.6f + num2));
  6966. break;
  6967. case 5:
  6968. maidArray[index].SetPos(new Vector3(-1.05f, 0.0f, 0.6f + num2));
  6969. break;
  6970. case 6:
  6971. maidArray[index].SetPos(new Vector3(1.35f, 0.0f, 0.9f + num2));
  6972. break;
  6973. case 7:
  6974. maidArray[index].SetPos(new Vector3(-1.35f, 0.0f, 0.9f + num2));
  6975. break;
  6976. case 8:
  6977. maidArray[index].SetPos(new Vector3(1.6f, 0.0f, 1.3f + num2));
  6978. break;
  6979. case 9:
  6980. maidArray[index].SetPos(new Vector3(-1.6f, 0.0f, 1.3f + num2));
  6981. break;
  6982. case 10:
  6983. maidArray[index].SetPos(new Vector3(1.8f, 0.0f, 1.72f + num2));
  6984. break;
  6985. case 11:
  6986. maidArray[index].SetPos(new Vector3(-1.8f, 0.0f, 1.72f + num2));
  6987. break;
  6988. case 12:
  6989. maidArray[index].SetPos(new Vector3(1.9f, 0.0f, 2.17f + num2));
  6990. break;
  6991. case 13:
  6992. maidArray[index].SetPos(new Vector3(-1.9f, 0.0f, 2.17f + num2));
  6993. break;
  6994. default:
  6995. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f + num2));
  6996. break;
  6997. }
  6998. }
  6999. }
  7000. else if (selectList.Count >= 8)
  7001. {
  7002. if (selectList.Count >= 9)
  7003. {
  7004. num1 = -0.2f;
  7005. }
  7006. if (selectList.Count % 2 == 1)
  7007. {
  7008. switch (index)
  7009. {
  7010. case 0:
  7011. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f + num1));
  7012. break;
  7013. case 1:
  7014. maidArray[index].SetPos(new Vector3(-0.55f, 0.0f, 0.2f + num1));
  7015. break;
  7016. case 2:
  7017. maidArray[index].SetPos(new Vector3(0.55f, 0.0f, 0.2f + num1));
  7018. break;
  7019. case 3:
  7020. maidArray[index].SetPos(new Vector3(-1f, 0.0f, 0.6f + num1));
  7021. break;
  7022. case 4:
  7023. maidArray[index].SetPos(new Vector3(1f, 0.0f, 0.6f + num1));
  7024. break;
  7025. case 5:
  7026. maidArray[index].SetPos(new Vector3(-1.35f, 0.0f, 1f + num1));
  7027. break;
  7028. case 6:
  7029. maidArray[index].SetPos(new Vector3(1.35f, 0.0f, 1f + num1));
  7030. break;
  7031. case 7:
  7032. maidArray[index].SetPos(new Vector3(-1.6f, 0.0f, 1.4f + num1));
  7033. break;
  7034. case 8:
  7035. maidArray[index].SetPos(new Vector3(1.6f, 0.0f, 1.4f + num1));
  7036. break;
  7037. }
  7038. }
  7039. else
  7040. {
  7041. switch (index)
  7042. {
  7043. case 0:
  7044. maidArray[index].SetPos(new Vector3(0.28f, 0.0f, 0.0f + num1));
  7045. break;
  7046. case 1:
  7047. maidArray[index].SetPos(new Vector3(-0.28f, 0.0f, 0.0f + num1));
  7048. break;
  7049. case 2:
  7050. maidArray[index].SetPos(new Vector3(0.78f, 0.0f, 0.3f + num1));
  7051. break;
  7052. case 3:
  7053. maidArray[index].SetPos(new Vector3(-0.78f, 0.0f, 0.3f + num1));
  7054. break;
  7055. case 4:
  7056. maidArray[index].SetPos(new Vector3(1.22f, 0.0f, 0.7f + num1));
  7057. break;
  7058. case 5:
  7059. maidArray[index].SetPos(new Vector3(-1.22f, 0.0f, 0.7f + num1));
  7060. break;
  7061. case 6:
  7062. maidArray[index].SetPos(new Vector3(1.55f, 0.0f, 1.1f + num1));
  7063. break;
  7064. case 7:
  7065. maidArray[index].SetPos(new Vector3(-1.55f, 0.0f, 1.1f + num1));
  7066. break;
  7067. case 8:
  7068. maidArray[index].SetPos(new Vector3(1.77f, 0.0f, 1.58f + num1));
  7069. break;
  7070. case 9:
  7071. maidArray[index].SetPos(new Vector3(-1.77f, 0.0f, 1.58f + num1));
  7072. break;
  7073. }
  7074. }
  7075. }
  7076. }
  7077. zero2.y = (float)(Math.Atan2(maidArray[index].transform.position.x,
  7078. maidArray[index].transform.position.z - 1.5) * 180.0 / Math.PI) + 180f;
  7079. maidArray[index].SetRot(zero2);
  7080. }
  7081. break;
  7082. case 1:
  7083. for (int index = 0; index < maidCnt; ++index)
  7084. {
  7085. Vector3 zero1 = Vector3.zero;
  7086. Vector3 zero2 = Vector3.zero;
  7087. if (maidCnt < 9)
  7088. {
  7089. switch (index)
  7090. {
  7091. case 1:
  7092. zero1.x = -0.6f;
  7093. break;
  7094. case 2:
  7095. zero1.x = 0.6f;
  7096. break;
  7097. case 3:
  7098. zero1.x = -1.2f;
  7099. break;
  7100. case 4:
  7101. zero1.x = 1.2f;
  7102. break;
  7103. case 5:
  7104. zero1.x = -1.8f;
  7105. break;
  7106. case 6:
  7107. zero1.x = 1.8f;
  7108. break;
  7109. case 7:
  7110. zero1.x = -2.4f;
  7111. break;
  7112. case 8:
  7113. zero1.x = 2.4f;
  7114. break;
  7115. case 9:
  7116. zero1.x = -3f;
  7117. break;
  7118. case 10:
  7119. zero1.x = 3f;
  7120. break;
  7121. }
  7122. }
  7123. else
  7124. {
  7125. switch (index)
  7126. {
  7127. case 1:
  7128. zero1.x = -0.5f;
  7129. break;
  7130. case 2:
  7131. zero1.x = 0.5f;
  7132. break;
  7133. case 3:
  7134. zero1.x = -1f;
  7135. break;
  7136. case 4:
  7137. zero1.x = 1f;
  7138. break;
  7139. case 5:
  7140. zero1.x = -1.5f;
  7141. break;
  7142. case 6:
  7143. zero1.x = 1.5f;
  7144. break;
  7145. case 7:
  7146. zero1.x = -2f;
  7147. break;
  7148. case 8:
  7149. zero1.x = 2f;
  7150. break;
  7151. case 9:
  7152. zero1.x = -2.5f;
  7153. break;
  7154. case 10:
  7155. zero1.x = 2.5f;
  7156. break;
  7157. case 11:
  7158. zero1.x = -3f;
  7159. break;
  7160. case 12:
  7161. zero1.x = 3f;
  7162. break;
  7163. case 13:
  7164. zero1.x = -3.5f;
  7165. break;
  7166. }
  7167. }
  7168. maidArray[index].SetPos(zero1);
  7169. maidArray[index].SetRot(zero2);
  7170. if (index >= 14)
  7171. {
  7172. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7173. }
  7174. }
  7175. break;
  7176. case 2:
  7177. for (int index = 0; index < maidCnt; ++index)
  7178. {
  7179. Vector3 zero1 = Vector3.zero;
  7180. Vector3 zero2 = Vector3.zero;
  7181. if (maidCnt < 9)
  7182. {
  7183. switch (index)
  7184. {
  7185. case 1:
  7186. zero1.z = 0.6f;
  7187. break;
  7188. case 2:
  7189. zero1.z = -0.6f;
  7190. break;
  7191. case 3:
  7192. zero1.z = 1.2f;
  7193. break;
  7194. case 4:
  7195. zero1.z = -1.2f;
  7196. break;
  7197. case 5:
  7198. zero1.z = 1.8f;
  7199. break;
  7200. case 6:
  7201. zero1.z = -1.8f;
  7202. break;
  7203. case 7:
  7204. zero1.z = 2.4f;
  7205. break;
  7206. case 8:
  7207. zero1.z = -2.4f;
  7208. break;
  7209. case 9:
  7210. zero1.z = 3f;
  7211. break;
  7212. case 10:
  7213. zero1.z = -3f;
  7214. break;
  7215. }
  7216. }
  7217. else
  7218. {
  7219. switch (index)
  7220. {
  7221. case 1:
  7222. zero1.z = 0.5f;
  7223. break;
  7224. case 2:
  7225. zero1.z = -0.5f;
  7226. break;
  7227. case 3:
  7228. zero1.z = 1f;
  7229. break;
  7230. case 4:
  7231. zero1.z = -1f;
  7232. break;
  7233. case 5:
  7234. zero1.z = 1.5f;
  7235. break;
  7236. case 6:
  7237. zero1.z = -1.5f;
  7238. break;
  7239. case 7:
  7240. zero1.z = 2f;
  7241. break;
  7242. case 8:
  7243. zero1.z = -2f;
  7244. break;
  7245. case 9:
  7246. zero1.z = 2.5f;
  7247. break;
  7248. case 10:
  7249. zero1.z = -2.5f;
  7250. break;
  7251. case 11:
  7252. zero1.z = 3f;
  7253. break;
  7254. case 12:
  7255. zero1.z = -3f;
  7256. break;
  7257. case 13:
  7258. zero1.z = 3.5f;
  7259. break;
  7260. }
  7261. }
  7262. maidArray[index].SetPos(zero1);
  7263. maidArray[index].SetRot(zero2);
  7264. if (index >= 14)
  7265. {
  7266. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7267. }
  7268. }
  7269. break;
  7270. case 3:
  7271. for (int index = 0; index < maidCnt; ++index)
  7272. {
  7273. Vector3 zero1 = Vector3.zero;
  7274. Vector3 zero2 = Vector3.zero;
  7275. float num = 0.5f;
  7276. if (maidCnt > 11)
  7277. {
  7278. num = 0.25f;
  7279. }
  7280. else if (maidCnt > 9)
  7281. {
  7282. num = 0.32f;
  7283. }
  7284. else if (maidCnt > 7)
  7285. {
  7286. num = 0.4f;
  7287. }
  7288. switch (index)
  7289. {
  7290. case 1:
  7291. zero1.x = -num;
  7292. zero1.z = num;
  7293. break;
  7294. case 2:
  7295. zero1.x = num;
  7296. zero1.z = -num;
  7297. break;
  7298. case 3:
  7299. zero1.x = (float)(-num * 2.0);
  7300. zero1.z = num * 2f;
  7301. break;
  7302. case 4:
  7303. zero1.x = num * 2f;
  7304. zero1.z = (float)(-num * 2.0);
  7305. break;
  7306. case 5:
  7307. zero1.x = (float)(-num * 3.0);
  7308. zero1.z = num * 3f;
  7309. break;
  7310. case 6:
  7311. zero1.x = num * 3f;
  7312. zero1.z = (float)(-num * 3.0);
  7313. break;
  7314. case 7:
  7315. zero1.x = (float)(-num * 4.0);
  7316. zero1.z = num * 4f;
  7317. break;
  7318. case 8:
  7319. zero1.x = num * 4f;
  7320. zero1.z = (float)(-num * 4.0);
  7321. break;
  7322. case 9:
  7323. zero1.x = (float)(-num * 5.0);
  7324. zero1.z = num * 5f;
  7325. break;
  7326. case 10:
  7327. zero1.x = num * 5f;
  7328. zero1.z = (float)(-num * 5.0);
  7329. break;
  7330. case 11:
  7331. zero1.x = (float)(-num * 6.0);
  7332. zero1.z = num * 6f;
  7333. break;
  7334. case 12:
  7335. zero1.x = num * 6f;
  7336. zero1.z = (float)(-num * 6.0);
  7337. break;
  7338. case 13:
  7339. zero1.x = (float)(-num * 7.0);
  7340. zero1.z = num * 7f;
  7341. break;
  7342. }
  7343. maidArray[index].SetPos(zero1);
  7344. maidArray[index].SetRot(zero2);
  7345. if (index >= 14)
  7346. {
  7347. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7348. }
  7349. }
  7350. break;
  7351. case 4:
  7352. for (int index = 0; index < maidCnt; ++index)
  7353. {
  7354. Vector3 zero1 = Vector3.zero;
  7355. Vector3 zero2 = Vector3.zero;
  7356. float num = (float)(0.400000005960464 + 0.0799999982118607 * maidCnt);
  7357. zero1.x = num * (float)Math.Cos(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7358. zero1.z = num * (float)Math.Sin(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7359. maidArray[index].SetPos(zero1);
  7360. zero2.y = (float)(Math.Atan2(zero1.x, zero1.z) * 180.0 / Math.PI);
  7361. maidArray[index].SetRot(zero2);
  7362. }
  7363. break;
  7364. case 5:
  7365. for (int index = 0; index < maidCnt; ++index)
  7366. {
  7367. Vector3 zero1 = Vector3.zero;
  7368. Vector3 zero2 = Vector3.zero;
  7369. float num = (float)(0.400000005960464 + 0.0799999982118607 * maidCnt);
  7370. zero1.x = num * (float)Math.Cos(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7371. zero1.z = num * (float)Math.Sin(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7372. maidArray[index].SetPos(zero1);
  7373. zero2.y = (float)(Math.Atan2(zero1.x, zero1.z) * 180.0 / Math.PI) + 180f;
  7374. maidArray[index].SetRot(zero2);
  7375. }
  7376. break;
  7377. case 6:
  7378. for (int index = 0; index < maidCnt; ++index)
  7379. {
  7380. Vector3 zero1 = Vector3.zero;
  7381. Vector3 zero2 = Vector3.zero;
  7382. float num = 0.0f;
  7383. if (maidCnt > 9)
  7384. {
  7385. num = -0.4f;
  7386. }
  7387. else if (maidCnt > 7)
  7388. {
  7389. num = -0.2f;
  7390. }
  7391. switch (index)
  7392. {
  7393. case 0:
  7394. zero1.z = 0.3f;
  7395. break;
  7396. case 1:
  7397. zero1.x = -0.9f;
  7398. zero1.z = -0.4f;
  7399. zero2.y = 40f;
  7400. break;
  7401. case 2:
  7402. zero1.x = 0.9f;
  7403. zero1.z = -0.4f;
  7404. zero2.y = -40f;
  7405. break;
  7406. case 3:
  7407. zero1.x = -0.4f;
  7408. zero1.z = -0.8f;
  7409. zero2.y = 20f;
  7410. break;
  7411. case 4:
  7412. zero1.x = 0.4f;
  7413. zero1.z = -0.8f;
  7414. zero2.y = -20f;
  7415. break;
  7416. case 5:
  7417. zero1.x = -1.2f;
  7418. zero1.z = 0.1f;
  7419. zero2.y = 60f;
  7420. break;
  7421. case 6:
  7422. zero1.x = 1.2f;
  7423. zero1.z = 0.1f;
  7424. zero2.y = -60f;
  7425. break;
  7426. case 7:
  7427. zero1.x = -1.5f;
  7428. zero1.z = 0.6f;
  7429. zero2.y = 80f;
  7430. break;
  7431. case 8:
  7432. zero1.x = 1.5f;
  7433. zero1.z = 0.6f;
  7434. zero2.y = -80f;
  7435. break;
  7436. case 9:
  7437. zero1.x = -1.6f;
  7438. zero1.z = 1.15f;
  7439. zero2.y = 100f;
  7440. break;
  7441. case 10:
  7442. zero1.x = 1.6f;
  7443. zero1.z = 1.15f;
  7444. zero2.y = -100f;
  7445. break;
  7446. case 11:
  7447. zero1.x = -1.6f;
  7448. zero1.z = 1.65f;
  7449. zero2.y = 110f;
  7450. break;
  7451. case 12:
  7452. zero1.x = 1.65f;
  7453. zero1.z = 1.65f;
  7454. zero2.y = -110f;
  7455. break;
  7456. case 13:
  7457. zero1.x = -1.65f;
  7458. zero1.z = 2.15f;
  7459. zero2.y = 120f;
  7460. break;
  7461. }
  7462. if (index > 0)
  7463. {
  7464. zero1.z += num;
  7465. }
  7466. else
  7467. {
  7468. zero1.z -= num;
  7469. }
  7470. maidArray[index].SetPos(zero1);
  7471. maidArray[index].SetRot(zero2);
  7472. if (index >= 14)
  7473. {
  7474. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7475. }
  7476. }
  7477. break;
  7478. case 7:
  7479. for (int index = 0; index < maidCnt; ++index)
  7480. {
  7481. Vector3 zero1 = Vector3.zero;
  7482. Vector3 zero2 = Vector3.zero;
  7483. float num = 0.0f;
  7484. if (maidCnt > 11)
  7485. {
  7486. num = 0.6f;
  7487. }
  7488. else if (maidCnt > 9)
  7489. {
  7490. num = 0.4f;
  7491. }
  7492. else if (maidCnt > 7)
  7493. {
  7494. num = 0.2f;
  7495. }
  7496. switch (index)
  7497. {
  7498. case 0:
  7499. zero1.z = 0.8f;
  7500. break;
  7501. case 1:
  7502. zero1.x = -0.45f;
  7503. zero1.z = 0.3f;
  7504. zero2.y = -10f;
  7505. break;
  7506. case 2:
  7507. zero1.x = 0.45f;
  7508. zero1.z = 0.3f;
  7509. zero2.y = 10f;
  7510. break;
  7511. case 3:
  7512. zero1.x = -0.8f;
  7513. zero1.z = -0.2f;
  7514. zero2.y = -20f;
  7515. break;
  7516. case 4:
  7517. zero1.x = 0.8f;
  7518. zero1.z = -0.2f;
  7519. zero2.y = 20f;
  7520. break;
  7521. case 5:
  7522. zero1.x = -1.2f;
  7523. zero1.z = -0.75f;
  7524. zero2.y = -30f;
  7525. break;
  7526. case 6:
  7527. zero1.x = 1.2f;
  7528. zero1.z = -0.75f;
  7529. zero2.y = 30f;
  7530. break;
  7531. case 7:
  7532. zero1.x = -1.6f;
  7533. zero1.z = -1.25f;
  7534. zero2.y = -40f;
  7535. break;
  7536. case 8:
  7537. zero1.x = 1.6f;
  7538. zero1.z = -1.25f;
  7539. zero2.y = 40f;
  7540. break;
  7541. case 9:
  7542. zero1.x = -2f;
  7543. zero1.z = -1.75f;
  7544. zero2.y = -50f;
  7545. break;
  7546. case 10:
  7547. zero1.x = 2f;
  7548. zero1.z = -1.75f;
  7549. zero2.y = 50f;
  7550. break;
  7551. case 11:
  7552. zero1.x = -2.4f;
  7553. zero1.z = -2.25f;
  7554. zero2.y = -60f;
  7555. break;
  7556. case 12:
  7557. zero1.x = 2.4f;
  7558. zero1.z = -2.25f;
  7559. zero2.y = 60f;
  7560. break;
  7561. case 13:
  7562. zero1.x = -2.8f;
  7563. zero1.z = -2.75f;
  7564. zero2.y = -70f;
  7565. break;
  7566. }
  7567. zero1.z += num;
  7568. maidArray[index].SetPos(zero1);
  7569. maidArray[index].SetRot(zero2);
  7570. if (index >= 14)
  7571. {
  7572. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7573. }
  7574. }
  7575. break;
  7576. case 8:
  7577. for (int index = 0; index < maidCnt; ++index)
  7578. {
  7579. Vector3 zero1 = Vector3.zero;
  7580. Vector3 zero2 = Vector3.zero;
  7581. float num = 0.0f;
  7582. if (maidCnt > 11)
  7583. {
  7584. num = -0.6f;
  7585. }
  7586. else if (maidCnt > 9)
  7587. {
  7588. num = -0.4f;
  7589. }
  7590. else if (maidCnt > 7)
  7591. {
  7592. num = -0.2f;
  7593. }
  7594. switch (index)
  7595. {
  7596. case 0:
  7597. zero1.z = -0.75f;
  7598. break;
  7599. case 1:
  7600. zero1.x = -0.45f;
  7601. zero1.z = -0.2f;
  7602. zero2.y = 20f;
  7603. break;
  7604. case 2:
  7605. zero1.x = 0.45f;
  7606. zero1.z = -0.2f;
  7607. zero2.y = -20f;
  7608. break;
  7609. case 3:
  7610. zero1.x = -0.8f;
  7611. zero1.z = 0.3f;
  7612. zero2.y = 35f;
  7613. break;
  7614. case 4:
  7615. zero1.x = 0.8f;
  7616. zero1.z = 0.3f;
  7617. zero2.y = -35f;
  7618. break;
  7619. case 5:
  7620. zero1.x = -1.2f;
  7621. zero1.z = 0.8f;
  7622. zero2.y = 50f;
  7623. break;
  7624. case 6:
  7625. zero1.x = 1.2f;
  7626. zero1.z = 0.8f;
  7627. zero2.y = -50f;
  7628. break;
  7629. case 7:
  7630. zero1.x = -1.6f;
  7631. zero1.z = 1.3f;
  7632. zero2.y = 65f;
  7633. break;
  7634. case 8:
  7635. zero1.x = 1.6f;
  7636. zero1.z = 1.3f;
  7637. zero2.y = -65f;
  7638. break;
  7639. case 9:
  7640. zero1.x = -2f;
  7641. zero1.z = 1.8f;
  7642. zero2.y = 80f;
  7643. break;
  7644. case 10:
  7645. zero1.x = 2f;
  7646. zero1.z = 1.8f;
  7647. zero2.y = -80f;
  7648. break;
  7649. case 11:
  7650. zero1.x = -2.4f;
  7651. zero1.z = 2.3f;
  7652. zero2.y = 90f;
  7653. break;
  7654. case 12:
  7655. zero1.x = 2.4f;
  7656. zero1.z = 2.3f;
  7657. zero2.y = -90f;
  7658. break;
  7659. case 13:
  7660. zero1.x = -2.8f;
  7661. zero1.z = 2.8f;
  7662. zero2.y = 100f;
  7663. break;
  7664. }
  7665. zero1.z += num;
  7666. maidArray[index].SetPos(zero1);
  7667. maidArray[index].SetRot(zero2);
  7668. if (index >= 14)
  7669. {
  7670. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7671. }
  7672. }
  7673. break;
  7674. case 9:
  7675. for (int index = 0; index < maidCnt; ++index)
  7676. {
  7677. Vector3 zero1 = Vector3.zero;
  7678. Vector3 zero2 = Vector3.zero;
  7679. float num = 1f;
  7680. if (maidCnt > 9)
  7681. {
  7682. num = 0.84f;
  7683. }
  7684. else if (maidCnt > 7)
  7685. {
  7686. num = 0.92f;
  7687. }
  7688. switch (index)
  7689. {
  7690. case 0:
  7691. zero1.z = 0.0f;
  7692. break;
  7693. case 1:
  7694. zero1.x = -0.5f;
  7695. zero1.z = -0.5f;
  7696. break;
  7697. case 2:
  7698. zero1.x = 0.5f;
  7699. zero1.z = -0.5f;
  7700. break;
  7701. case 3:
  7702. zero1.x = -1f;
  7703. zero1.z = 0.2f;
  7704. break;
  7705. case 4:
  7706. zero1.x = 1f;
  7707. zero1.z = 0.2f;
  7708. break;
  7709. case 5:
  7710. zero1.x = -1.5f;
  7711. zero1.z = -0.5f;
  7712. break;
  7713. case 6:
  7714. zero1.x = 1.5f;
  7715. zero1.z = -0.5f;
  7716. break;
  7717. case 7:
  7718. zero1.x = -2f;
  7719. zero1.z = 0.2f;
  7720. break;
  7721. case 8:
  7722. zero1.x = 2f;
  7723. zero1.z = 0.2f;
  7724. break;
  7725. case 9:
  7726. zero1.x = -2.5f;
  7727. zero1.z = -0.5f;
  7728. break;
  7729. case 10:
  7730. zero1.x = 2.5f;
  7731. zero1.z = -0.5f;
  7732. break;
  7733. case 11:
  7734. zero1.x = -3f;
  7735. zero1.z = 0.2f;
  7736. break;
  7737. case 12:
  7738. zero1.x = 3f;
  7739. zero1.z = 0.2f;
  7740. break;
  7741. case 13:
  7742. zero1.x = -3.5f;
  7743. zero1.z = -0.5f;
  7744. break;
  7745. }
  7746. zero1.x *= num;
  7747. maidArray[index].SetPos(zero1);
  7748. maidArray[index].SetRot(zero2);
  7749. if (index >= 14)
  7750. {
  7751. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7752. }
  7753. }
  7754. break;
  7755. case 10:
  7756. for (int index = 0; index < maidCnt; ++index)
  7757. {
  7758. Vector3 zero1 = Vector3.zero;
  7759. Vector3 zero2 = Vector3.zero;
  7760. float num = 1f;
  7761. if (maidCnt > 9)
  7762. {
  7763. num = 0.84f;
  7764. }
  7765. else if (maidCnt > 7)
  7766. {
  7767. num = 0.92f;
  7768. }
  7769. switch (index)
  7770. {
  7771. case 0:
  7772. zero1.z = -0.4f;
  7773. break;
  7774. case 1:
  7775. zero1.x = -0.5f;
  7776. zero1.z = 0.2f;
  7777. break;
  7778. case 2:
  7779. zero1.x = 0.5f;
  7780. zero1.z = 0.2f;
  7781. break;
  7782. case 3:
  7783. zero1.x = -1f;
  7784. zero1.z = -0.5f;
  7785. break;
  7786. case 4:
  7787. zero1.x = 1f;
  7788. zero1.z = -0.5f;
  7789. break;
  7790. case 5:
  7791. zero1.x = -1.5f;
  7792. zero1.z = 0.2f;
  7793. break;
  7794. case 6:
  7795. zero1.x = 1.5f;
  7796. zero1.z = 0.2f;
  7797. break;
  7798. case 7:
  7799. zero1.x = -2f;
  7800. zero1.z = -0.5f;
  7801. break;
  7802. case 8:
  7803. zero1.x = 2f;
  7804. zero1.z = -0.5f;
  7805. break;
  7806. case 9:
  7807. zero1.x = -2.5f;
  7808. zero1.z = 0.2f;
  7809. break;
  7810. case 10:
  7811. zero1.x = 2.5f;
  7812. zero1.z = 0.2f;
  7813. break;
  7814. case 11:
  7815. zero1.x = -3f;
  7816. zero1.z = -0.5f;
  7817. break;
  7818. case 12:
  7819. zero1.x = 3f;
  7820. zero1.z = -0.5f;
  7821. break;
  7822. case 13:
  7823. zero1.x = -3.5f;
  7824. zero1.z = 0.2f;
  7825. break;
  7826. }
  7827. zero1.x *= num;
  7828. maidArray[index].SetPos(zero1);
  7829. maidArray[index].SetRot(zero2);
  7830. if (index >= 14)
  7831. {
  7832. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7833. }
  7834. }
  7835. break;
  7836. }
  7837. for (int index = 0; index < maxMaidCnt; ++index)
  7838. {
  7839. if (!isLock[index] && maidArray[index] != null && maidArray[index].Visible)
  7840. {
  7841. maidArray[index].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  7842. maidArray[index].SetAutoTwistAll(true);
  7843. }
  7844. }
  7845. }
  7846. private void MessageWindow(int winID)
  7847. {
  7848. GUIStyle style1 = "label";
  7849. style1.fontSize = GetPix(12);
  7850. style1.alignment = TextAnchor.UpperLeft;
  7851. GUIStyle style2 = "button";
  7852. style2.fontSize = GetPix(16);
  7853. GUI.Label(new Rect(GetPix(8), GetPix(4), GetPix(80), GetPix(25)),
  7854. "名前",
  7855. style1);
  7856. inName = GUI.TextField(new Rect(GetPix(35),
  7857. GetPix(4),
  7858. GetPix(120),
  7859. GetPix(20)),
  7860. inName);
  7861. GUI.Label(new Rect(GetPix(180), GetPix(4), GetPix(100), GetPix(25)),
  7862. "サイズ",
  7863. style1);
  7864. fontSize = (int)GUI.HorizontalSlider(new Rect(GetPix(220),
  7865. GetPix(9),
  7866. GetPix(100),
  7867. GetPix(20)),
  7868. fontSize,
  7869. 25f,
  7870. 60f);
  7871. if (fontSize != mFontSize)
  7872. {
  7873. mFontSize = fontSize;
  7874. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  7875. //MessageClass messageClass = new MessageClass(gameObject, GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr);
  7876. SetFieldValue<UILabel, int>(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false)
  7877. .GetComponent<UILabel>(),
  7878. "mFontSize",
  7879. fontSize);
  7880. }
  7881. GUI.Label(new Rect(GetPix(325), GetPix(4), GetPix(100), GetPix(25)),
  7882. fontSize.ToString() + "pt",
  7883. style1);
  7884. inText = GUI.TextArea(new Rect(GetPix(8),
  7885. GetPix(26),
  7886. rectWin2.width - GetPix(15),
  7887. GetPix(52)),
  7888. inText,
  7889. 300);
  7890. if (GUI.Button(new Rect(GetPix(8), GetPix(82), GetPix(60), GetPix(20)),
  7891. "決定",
  7892. style2))
  7893. {
  7894. isMessage = true;
  7895. bGuiMessage = false;
  7896. GameObject gameObject1 = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  7897. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  7898. messageWindowMgr.OpenMessageWindowPanel();
  7899. UILabel component = UTY.GetChildObject(gameObject1, "MessageViewer/MsgParent/Message", false).GetComponent<UILabel>();
  7900. UILabel nameComponent = UTY.GetChildObject(gameObject1, "MessageViewer/MsgParent/SpeakerName/Name", false).GetComponent<UILabel>();
  7901. MessageClass inst = new MessageClass(gameObject1, messageWindowMgr);
  7902. // Fix for ENG version: reconfigure MessageClass to behave as in JP game
  7903. if (inst.subtitles_manager_ != null)
  7904. {
  7905. inst.subtitles_manager_.visible = false;
  7906. inst.subtitles_manager_ = null;
  7907. }
  7908. component.gameObject.SetActive(true);
  7909. nameComponent.gameObject.SetActive(true);
  7910. UTY.GetChildObject(gameObject1, "MessageViewer/MsgParent/MessageBox", false).SetActive(true);
  7911. SetFieldValue<MessageClass, UILabel>(inst, "message_label_", component);
  7912. SetFieldValue<MessageClass, UILabel>(inst, "name_label_", nameComponent);
  7913. component.ProcessText();
  7914. SetFieldValue<UILabel, int>(component, "mFontSize", fontSize);
  7915. inst.SetText(inName, inText, "", 0, AudioSourceMgr.Type.System);
  7916. inst.FinishChAnime();
  7917. }
  7918. GUI.DragWindow();
  7919. }
  7920. private void SceneManagerWindow(int winID)
  7921. {
  7922. GUIStyle labelStyle = new GUIStyle("label");
  7923. labelStyle.fontSize = GetPix(15);
  7924. labelStyle.alignment = TextAnchor.MiddleCenter;
  7925. GUIStyle newSaveStyle = new GUIStyle("button");
  7926. newSaveStyle.alignment = TextAnchor.MiddleCenter;
  7927. newSaveStyle.fontSize = GetPix(90);
  7928. GUIStyle saveImageStyle = new GUIStyle("label");
  7929. saveImageStyle.fontSize = GetPix(12);
  7930. saveImageStyle.alignment = TextAnchor.MiddleCenter;
  7931. saveImageStyle.padding = new RectOffset(0, 0, 0, 0);
  7932. GUIStyle saveControlStyle = new GUIStyle("button");
  7933. saveControlStyle.fontSize = GetPix(12);
  7934. saveControlStyle.alignment = TextAnchor.MiddleCenter;
  7935. GUIStyle listStyle = new GUIStyle("button");
  7936. listStyle.fontSize = selectedButtonStyle.fontSize = GetPix(12);
  7937. listStyle.alignment = TextAnchor.MiddleLeft;
  7938. selectedButtonStyle.alignment = TextAnchor.MiddleLeft;
  7939. GUIStyle textFieldStyle = new GUIStyle("textfield");
  7940. textFieldStyle.alignment = TextAnchor.MiddleLeft;
  7941. GUIStyle resizeHandleStyle = new GUIStyle("label");
  7942. resizeHandleStyle.fontSize = GetPix(25);
  7943. resizeHandleStyle.alignment = TextAnchor.MiddleCenter;
  7944. sceneSortComboStyle.fontSize = GetPix(13);
  7945. // Window variables
  7946. int windowPadding = GetPix(10);
  7947. int windowPaddingY = GetPix(20);
  7948. int buttonSize = GetPix(25);
  7949. int saveGridOffset = GetPix(200);
  7950. if (createSceneFlag || loadSceneFlag || manageSceneFlag || deleteDirectoryFlag || deleteSceneFlag)
  7951. {
  7952. GUI.enabled = false;
  7953. }
  7954. #region Titlebar
  7955. if (GUI.Button(new Rect(
  7956. sceneManagerRect.width - windowPadding - buttonSize,
  7957. windowPadding,
  7958. buttonSize,
  7959. buttonSize
  7960. ), "X", saveControlStyle))
  7961. {
  7962. sceneFlg = false;
  7963. bGui = true;
  7964. copyIndex = 0;
  7965. SaveSceneSortPreferences();
  7966. }
  7967. int refreshButtonWidth = GetPix(70);
  7968. if (GUI.Button(new Rect(
  7969. saveGridOffset - refreshButtonWidth + windowPadding,
  7970. windowPadding,
  7971. refreshButtonWidth,
  7972. buttonSize
  7973. ), "Refresh", saveControlStyle))
  7974. {
  7975. RefreshSceneManager();
  7976. }
  7977. Color originalColor = GUI.backgroundColor;
  7978. if (kankyoToggle) GUI.backgroundColor = Color.green;
  7979. kankyoToggle = GUI.Toggle(new Rect(
  7980. windowPadding,
  7981. windowPadding,
  7982. GetPix(85),
  7983. buttonSize
  7984. ), kankyoToggle, "Backgrounds", saveControlStyle);
  7985. GUI.backgroundColor = originalColor;
  7986. // GUI.Label(new Rect(
  7987. // windowPadding,
  7988. // windowPadding,
  7989. // sceneManagerRect.width - windowPadding,
  7990. // buttonSize
  7991. // ), directoryList[selectedDirectory], labelStyle);
  7992. #endregion
  7993. int saveGridX = windowPaddingY + saveGridOffset;
  7994. int saveGridY = windowPaddingY + buttonSize;
  7995. float saveGridWidth = sceneManagerRect.width - saveGridX - windowPadding;
  7996. float saveGridHeight = sceneManagerRect.height - saveGridY;
  7997. int numImages = scenes.Count;
  7998. #region Directory List
  7999. Rect dirListScrollRect = new Rect(
  8000. windowPadding,
  8001. windowPaddingY + buttonSize,
  8002. saveGridOffset,
  8003. saveGridHeight - windowPaddingY - buttonSize
  8004. );
  8005. Rect dirListScrollView = new Rect(0, 0,
  8006. saveGridOffset - 50,
  8007. GetPix(22) * (directoryList.Length + 1) + buttonSize + windowPadding
  8008. );
  8009. GUI.Box(dirListScrollRect, "");
  8010. dirListScrollPos = GUI.BeginScrollView(dirListScrollRect, dirListScrollPos, dirListScrollView);
  8011. for (int i = 0; i < directoryList.Length; i++)
  8012. {
  8013. int listEntrySize = GetPix(30);
  8014. if (GUI.Button(new Rect(0,
  8015. i * listEntrySize,
  8016. saveGridOffset,
  8017. listEntrySize), directoryList[i],
  8018. i == selectedDirectory ? selectedButtonStyle : listStyle))
  8019. {
  8020. SwitchDirectory(directoryList[i]);
  8021. }
  8022. }
  8023. GUI.EndScrollView();
  8024. if (!createDirectoryFlag)
  8025. {
  8026. if (GUI.Button(new Rect(
  8027. windowPadding,
  8028. saveGridHeight + windowPadding,
  8029. GetPix(110),
  8030. buttonSize
  8031. ), "New Folder", saveControlStyle))
  8032. {
  8033. createDirectoryFlag = true;
  8034. }
  8035. bool enabled = GUI.enabled;
  8036. GUI.enabled = selectedDirectory != 0;
  8037. if (GUI.Button(new Rect(
  8038. saveGridOffset - GetPix(80) + windowPadding,
  8039. saveGridHeight + windowPadding,
  8040. GetPix(80),
  8041. buttonSize
  8042. ), "Delete", saveControlStyle))
  8043. {
  8044. deleteDirectoryFlag = true;
  8045. }
  8046. GUI.enabled = enabled;
  8047. }
  8048. else
  8049. {
  8050. float textFieldWidth = saveGridOffset - buttonSize;
  8051. Rect cancelRect = new Rect(
  8052. textFieldWidth + windowPadding,
  8053. saveGridHeight + windowPadding,
  8054. buttonSize,
  8055. buttonSize
  8056. );
  8057. bool cancel = GUI.Button(cancelRect, "X", saveControlStyle);
  8058. GUI.SetNextControlName("textEntry");
  8059. GUI.FocusControl("textEntry");
  8060. if (cancel)
  8061. {
  8062. textFieldValue = "";
  8063. createDirectoryFlag = false;
  8064. }
  8065. else if (Event.current.Equals(Event.KeyboardEvent("return")) && GUI.GetNameOfFocusedControl() == "textEntry")
  8066. {
  8067. CreateDirectory(textFieldValue);
  8068. textFieldValue = "";
  8069. createDirectoryFlag = false;
  8070. }
  8071. else
  8072. {
  8073. textFieldValue = GUI.TextField(new Rect(
  8074. windowPadding,
  8075. saveGridHeight + windowPadding,
  8076. textFieldWidth,
  8077. buttonSize
  8078. ), textFieldValue, 30, textFieldStyle);
  8079. }
  8080. }
  8081. #endregion
  8082. #region Save Grid
  8083. float scale = 0.55f;
  8084. float imageWidth = 480f * scale;
  8085. float imageHeight = 270f * scale;
  8086. float imagePadding = GetPix(9);
  8087. int maxColumns = Mathf.Max(1, (int)(saveGridWidth / (imageWidth + imagePadding)));
  8088. float imageGridWidth = maxColumns * (imageWidth + imagePadding);
  8089. float imageGridX = saveGridX + (saveGridWidth / 2f - imageGridWidth / 2f) - windowPadding;
  8090. float imageGridOffset = (saveGridWidth - imageGridWidth) / 2f - windowPadding;
  8091. Rect saveGridScrollRect = new Rect(
  8092. saveGridX + windowPadding
  8093. , saveGridY
  8094. , saveGridWidth - windowPadding
  8095. , saveGridHeight - windowPadding
  8096. );
  8097. Rect saveGridScrollView = new Rect(0, 0
  8098. , saveGridWidth - 50
  8099. , (scenes.Count / maxColumns + 1) * (imageHeight + imagePadding) + imagePadding
  8100. );
  8101. GUI.Box(new Rect(
  8102. saveGridX
  8103. , saveGridY
  8104. , saveGridWidth
  8105. , saveGridHeight - windowPadding
  8106. ), ""
  8107. );
  8108. GUI.enabled = !sceneSortCombo.isClickedComboButton;
  8109. sceneManagerScrollPos = GUI.BeginScrollView(saveGridScrollRect, sceneManagerScrollPos, saveGridScrollView);
  8110. if (GUI.Button(new Rect(
  8111. imageGridOffset
  8112. , imagePadding
  8113. , imageWidth
  8114. , imageHeight)
  8115. , "+", newSaveStyle))
  8116. {
  8117. createSceneFlag = true;
  8118. TakeScreenshot();
  8119. }
  8120. if (scenes.Count > 0)
  8121. {
  8122. int j = 1;
  8123. int i = scenes.Count - 1;
  8124. while (i >= 0)
  8125. {
  8126. float imageX = (j % maxColumns) * imageWidth + (j % maxColumns) * imagePadding + imageGridOffset;
  8127. float imageY = (j / maxColumns) * imageHeight + (j / maxColumns + 1) * imagePadding;
  8128. if (GUI.Button(new Rect(
  8129. imageX
  8130. , imageY
  8131. , imageWidth
  8132. , imageHeight), scenes[i].screenshot, saveImageStyle))
  8133. {
  8134. selectedScene = i;
  8135. ReadScene();
  8136. if (sceneData != null)
  8137. {
  8138. if (kankyoScene)
  8139. {
  8140. infoString = new GUIContent("Background");
  8141. }
  8142. else
  8143. {
  8144. int numMaids = int.Parse(sceneData.Split(',')[1]);
  8145. string maids = numMaids == 1 ? "Maid" : "Maids";
  8146. infoString = new GUIContent($"{numMaids} {maids}");
  8147. }
  8148. manageSceneFlag = true;
  8149. }
  8150. }
  8151. i--;
  8152. j++;
  8153. }
  8154. }
  8155. GUI.EndScrollView();
  8156. GUI.enabled = true;
  8157. #endregion
  8158. #region Sort Options
  8159. int sceneSortComboWidth = GetPix(85);
  8160. bool ascending = GUI.Toggle(
  8161. new Rect(saveGridX + sceneSortComboWidth + windowPadding, windowPadding, sceneSortComboWidth, GetPix(20)),
  8162. sceneSortAscending,
  8163. "Ascending"
  8164. );
  8165. if (ascending != sceneSortAscending)
  8166. {
  8167. SetSceneSortAscending(ascending);
  8168. }
  8169. int sceneSortMode = sceneSortCombo.List(
  8170. new Rect(saveGridX, windowPadding, sceneSortComboWidth, buttonSize),
  8171. sceneSortComboList[selectedSceneSortMode].text,
  8172. sceneSortComboList,
  8173. saveControlStyle,
  8174. "box",
  8175. sceneSortComboStyle
  8176. );
  8177. if (sceneSortMode != selectedSceneSortMode)
  8178. {
  8179. SetSceneSortMode(sceneSortMode);
  8180. }
  8181. #endregion
  8182. GUI.Label(new Rect(
  8183. sceneManagerRect.width - GetPix(15),
  8184. sceneManagerRect.height - GetPix(17),
  8185. GetPix(20),
  8186. GetPix(20)
  8187. ), "□", resizeHandleStyle);
  8188. if (createSceneFlag)
  8189. {
  8190. if (File.Exists(thum_file_path_))
  8191. {
  8192. try
  8193. {
  8194. if (overwriteFlag)
  8195. {
  8196. OverwriteScene();
  8197. }
  8198. SaveScene();
  8199. }
  8200. catch { }
  8201. finally
  8202. {
  8203. overwriteFlag = false;
  8204. createSceneFlag = false;
  8205. }
  8206. }
  8207. }
  8208. if (kankyoModeFlag != kankyoToggle)
  8209. {
  8210. kankyoModeFlag = kankyoToggle;
  8211. currentDirectory = kankyoModeFlag ? kankyoDirectoryName : sceneDirectoryName;
  8212. RefreshSceneManager();
  8213. }
  8214. if (!resizeManager)
  8215. {
  8216. GUI.DragWindow(new Rect(0, 0,
  8217. sceneManagerRect.width - windowPaddingY,
  8218. sceneManagerRect.height - windowPaddingY));
  8219. }
  8220. }
  8221. private void SceneManagerModal(int winID)
  8222. {
  8223. GUIStyle titleStyle = new GUIStyle("label");
  8224. titleStyle.fontSize = GetPix(12);
  8225. titleStyle.alignment = TextAnchor.UpperCenter;
  8226. GUIStyle infoLabelStyle = new GUIStyle("label");
  8227. infoLabelStyle.fontSize = GetPix(13);
  8228. infoLabelStyle.alignment = TextAnchor.MiddleCenter;
  8229. // infoLabelStyle.normal.textColor = new Color(1f, 0.44f, 0f);
  8230. GUIStyle infoLabelShadow = new GUIStyle(infoLabelStyle);
  8231. infoLabelShadow.normal.textColor = new Color(0f, 0f, 0f, 0.55f);
  8232. GUIStyle saveControlStyle = new GUIStyle("button");
  8233. saveControlStyle.fontSize = GetPix(12);
  8234. saveControlStyle.alignment = TextAnchor.MiddleCenter;
  8235. GUIStyle infoHighlightStyle = new GUIStyle("box");
  8236. infoHighlightStyle.normal.background = infoHighlight;
  8237. int index = deleteDirectoryFlag ? scenes.Count - 1 : selectedScene;
  8238. Texture2D previewImage = scenes.ElementAtOrDefault(index)?.screenshot;
  8239. int windowPadding = GetPix(10);
  8240. int windowPaddingY = GetPix(20);
  8241. float previewWindowWidth = sceneModalRect.width - windowPaddingY;
  8242. float previewWindowHeight = Mathf.Min(270 - windowPadding, sceneModalRect.height - GetPix(70));
  8243. int texWidth = previewImage?.width ?? 480;
  8244. int texHeight = previewImage?.height ?? 270;
  8245. float scale = Mathf.Min(previewWindowWidth / texWidth, previewWindowHeight / texHeight);
  8246. float previewWidth = (texWidth * scale) - windowPaddingY;
  8247. float previewHeight = (texHeight * scale) - windowPaddingY;
  8248. float previewX = (sceneModalRect.width / 2 - previewWidth / 2);
  8249. float previewY = windowPaddingY;
  8250. GUI.DrawTexture(new Rect(
  8251. previewX - GetPix(6)
  8252. , previewY - GetPix(6)
  8253. , previewWidth + GetPix(12)
  8254. , previewHeight + GetPix(12))
  8255. , frame
  8256. );
  8257. if (previewImage != null)
  8258. {
  8259. GUI.DrawTexture(new Rect(
  8260. previewX,
  8261. previewY,
  8262. previewWidth,
  8263. previewHeight
  8264. ), previewImage);
  8265. }
  8266. if (!deleteDirectoryFlag)
  8267. {
  8268. Vector2 infoLabelSize = infoLabelStyle.CalcSize(infoString);
  8269. GUI.Box(new Rect(
  8270. previewX + GetPix(7),
  8271. previewY + previewHeight - infoLabelSize.y - GetPix(7),
  8272. infoLabelSize.x + GetPix(8),
  8273. infoLabelSize.y
  8274. ), "", infoHighlightStyle);
  8275. GUI.Label(new Rect(
  8276. previewX + GetPix(10),
  8277. previewY + previewHeight - infoLabelSize.y - GetPix(8),
  8278. infoLabelSize.x,
  8279. infoLabelSize.y
  8280. ), infoString, infoLabelStyle);
  8281. }
  8282. string title = deleteDirectoryFlag
  8283. ? $"Are you sure you want to delete \"{directoryList[selectedDirectory]}\" and all of its files?"
  8284. : deleteSceneFlag
  8285. ? $"Are you sure you want to delete \"{scenes[index].info.Name}\"?"
  8286. : scenes[selectedScene].info.Name;
  8287. float labelY = previewY + previewHeight + windowPadding;
  8288. GUI.Label(new Rect(
  8289. windowPadding,
  8290. labelY,
  8291. sceneModalRect.width - windowPaddingY,
  8292. sceneModalRect.height - labelY - windowPadding
  8293. ), title, titleStyle);
  8294. int buttonHeight = GetPix(25);
  8295. int buttonWidth = GetPix(80);
  8296. float buttonY = sceneModalRect.height - windowPadding - buttonHeight;
  8297. if (GUI.Button(new Rect(
  8298. windowPadding,
  8299. buttonY,
  8300. buttonWidth,
  8301. buttonHeight
  8302. ), deleteDirectoryFlag || deleteSceneFlag ? "Delete" : "Overwrite", saveControlStyle))
  8303. {
  8304. if (deleteDirectoryFlag)
  8305. {
  8306. DeleteDirectory();
  8307. }
  8308. else if (deleteSceneFlag)
  8309. {
  8310. DeleteScene();
  8311. }
  8312. else
  8313. {
  8314. overwriteFlag = true;
  8315. createSceneFlag = true;
  8316. TakeScreenshot();
  8317. }
  8318. deleteSceneFlag = false;
  8319. deleteDirectoryFlag = false;
  8320. manageSceneFlag = false;
  8321. }
  8322. if (!(deleteDirectoryFlag || deleteSceneFlag))
  8323. {
  8324. if (GUI.Button(new Rect(
  8325. windowPaddingY + buttonWidth,
  8326. buttonY,
  8327. buttonWidth,
  8328. buttonHeight
  8329. ), "Load", saveControlStyle))
  8330. {
  8331. manageSceneFlag = false;
  8332. loadSceneFlag = true;
  8333. kankyoLoadFlg = kankyoScene;
  8334. loadScene = 1;
  8335. FileSystemInfo info = scenes[selectedScene].info;
  8336. info.LastAccessTime = DateTime.Now;
  8337. }
  8338. if (GUI.Button(new Rect(
  8339. windowPaddingY + 2 * buttonWidth + windowPadding,
  8340. buttonY,
  8341. buttonWidth,
  8342. buttonHeight
  8343. ), "Delete", saveControlStyle))
  8344. {
  8345. deleteSceneFlag = true;
  8346. }
  8347. }
  8348. if (GUI.Button(new Rect(
  8349. sceneModalRect.width - buttonWidth - windowPadding,
  8350. buttonY,
  8351. buttonWidth,
  8352. buttonHeight
  8353. ), "Cancel", saveControlStyle))
  8354. {
  8355. manageSceneFlag = false;
  8356. deleteSceneFlag = false;
  8357. deleteDirectoryFlag = false;
  8358. }
  8359. GUI.DragWindow();
  8360. }
  8361. public void TakeScreenshot()
  8362. {
  8363. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  8364. isScreen2 = true;
  8365. if (!isMessage)
  8366. {
  8367. ui_cam_hide_list_.Clear();
  8368. foreach (UICamera uiCamera in NGUITools.FindActive<UICamera>())
  8369. {
  8370. if (uiCamera.GetComponent<Camera>().enabled)
  8371. {
  8372. uiCamera.GetComponent<Camera>().enabled = false;
  8373. ui_cam_hide_list_.Add(uiCamera);
  8374. }
  8375. }
  8376. }
  8377. else
  8378. {
  8379. editUI = GameObject.Find("/UI Root/Camera");
  8380. if (editUI != null)
  8381. {
  8382. editUI.SetActive(false);
  8383. }
  8384. if (GameMain.Instance.CMSystem.ViewFps)
  8385. {
  8386. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false).SetActive(false);
  8387. }
  8388. GameObject childObject1 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  8389. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  8390. childObject1.SetActive(false);
  8391. childObject2.SetActive(false);
  8392. }
  8393. isGui = bGui;
  8394. bGui = false;
  8395. try
  8396. {
  8397. thum_byte_to_base64_ = string.Empty;
  8398. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  8399. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, true);
  8400. }
  8401. catch { }
  8402. }
  8403. }
  8404. }