MultipleMaids.Gui.cs 410 KB

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