MultipleMaids.Gui.cs 431 KB

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